Can not debug source code

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
奥古尔坎.matchx
Offline
Last seen:6 months 3 weeks 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.

有人能帮我一下吗。可能我在构建项目时缺少Makefile中的一些命令。非常感谢你的帮助。

All the best,

Ogulcan

Attachment:
Device:
PM\U对话框
Offline
Last seen:16 hours 52 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

奥古尔坎.matchx
Offline
Last seen:6 months 3 weeks 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.

后来,我和一位高级开发人员检查了make文件,最后我们找到了缺失的部分来调试我们的应用程序。“LDFLAGS”中缺少导致问题的命令。添加这些命令后,我现在甚至可以用旧的SDK调试代码了。

最后,我可以调试我们的源代码,因为我想现在。但是我想知道为什么我不能用新的SDK和你的调试选项来完成它?为什么我在尝试连接到外围设备时会出现上述错误?

Thank you for your help.

Ogulcan

PM\U对话框
Offline
Last seen:16 hours 52 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

奥古尔坎.matchx
Offline
Last seen:6 months 3 weeks ago
Joined:2018-12-07 13:22
嗨,又来了,

嗨,又来了,

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.

PM\U对话框
Offline
Last seen:16 hours 52 min ago
Staff
Joined:2018-02-08 11:03
Hi ogulcan.matchx,

Hi ogulcan.matchx,

你能请让我知道如果你能戴吗bug your firmware with our make file and using the latest SDK? Do you still have the same error (attached picture from your initial post) when using SDK1.0.14?

Thanks, PM_Dialog