Can not debug source code

5 posts / 0 new
Last post
ogulcan.matchx
Offline
Last seen: 4 days 21 hours ago
Joined: 2018-12-07 13:22
Can not debug source code

Hi,

We are developing our firmware on the device DA1468x in a custom board with SDK 1.0.8. We are using our own Makefile and successfully flashing the firmware on to the board with the scripts provided. I'm using SmartSnippets Studio for development and the firmware works fine after flashing which I can confirm through the connection over serial port. The problem is at the debugging stage. When I try to debug after flashing the firmware, I get the "No source available for "main() at 0x8031af4"" error. I can see the disassembly lines and function names but it's not linked to the source code. I'm using the default QSPI settings for the debugging with the previously built .elf file. I tried to add "Source Lookup Path" in debugger configuration but I still have the same error. You can see the error in the pdf file attached. I tried using Ozone V2.60 for debugging as well, but the problem remains the same. I can connect, run, reset and see the disassembly but when I try to open the source code which invokes "View.Source();" I get the response "no source info". I tried to add Source Lookup Path there as well but no result.

Can someone help me what I'm missing here. Maybe I'm missing some commands in the Makefile while building the project. Thank you very much for the help.

All the best,

Ogulcan

Attachment: 
Device: 
PM_Dialog
Offline
Last seen: 19 hours 50 min ago
Staff
Joined: 2018-02-08 11:03
Hi ogulcan.matchx,

Hi ogulcan.matchx,

Firstly, the version 1.0.8 is an old version of SDK and we don’t support it anymore. I would strongly recommend you to download form our support portal and use our latest version of the SDK, which is version 1.0.14. In the latest SDK, most of the bugs have been fixed and this version is currently supported. I don’t know if this error is due to the old version of the SDK or due to your custom make file, but I suggest you to try it again with SDK1.0.14. Secondly, since you have made a custom make file, it’s your responsibly to try to find what it gets wrong with that. Probably, a file is missing or some commands, as you mentioned in you post. My recommendation is to use our provided make files and scripts, because we don’t support custom make files as well. Could you please let me know if there is any specific reason of creating your own make file?

Thanks, PM_Dialog

ogulcan.matchx
Offline
Last seen: 4 days 21 hours ago
Joined: 2018-12-07 13:22
Hello again,

Hello again,

Firstly, thank you very much for the response. I tried all your suggestions step by step to fix the issue. First, I used the latest SDK and ble_peripheral project to check debug. Even though I was able to start debugging I didn't receive the breakpoints as smooth as I wanted. I was having random breakpoints when I tried to connect to the peripheral device with an Android phone. I was able to connect without debugging but with debugging I had this error:
---
Failed to execute MI command:
-data-disassemble -s 0 -e 92 -- 3
Error message from debugger back end:
Cannot access memory at address 0x0
---
Secondly, it surprises me that you are saying you don't support custom make files because SmartSnippets Studio supports importing projects with an existing make file. Our reason to create our own make file is because we want our developers to have the freedom to choose using SmartSnippets Studio or not. Having a custom make file simplifies this and assures consistent application on every operating system and development environment.

Later, I checked our make file with a senior developer and in the end we found the missing piece to debug our application. There was a missing command in the "LDFLAGS" which caused the problem. After adding those commands I can debug our code even with the old SDK now.

In the end, I am able to debug our source code as I wanted now. But I would like to know the reason why I can't do it with the new SDK and your debug options? Why do I get the above error when I try to connect to the peripheral device?

Thank you for your help.

Ogulcan

PM_Dialog
Offline
Last seen: 19 hours 50 min ago
Staff
Joined: 2018-02-08 11:03
Hi ogulcan.matchx,

Hi ogulcan.matchx,

Glad that you are able to debug your source as you want. You mentioned that you are not able to do it with the new SDK (VERSION 1.014). So, this works only when using SDK 1.0.8?

Thanks, PM_Dialog

ogulcan.matchx
Offline
Last seen: 4 days 21 hours ago
Joined: 2018-12-07 13:22
Hi again,

Hi again,

Yes it works with the old SDK. But I didn't try our own makefile on our application with the new SDK. I just used the ble_peripheral project of SDK 1.014 and tried to debug it which caused this problem when trying to connect. Thanks.