Adding .elf files to debug context when using multiple binaries?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Adding .elf files to debug context when using multiple binaries?

跳至解决方案
3,843 次查看
gearhead1107
Contributor IV

I'm working on a "mini" bootloader which pulls in a bootloader .bin from another project in S32DS. After making the jump to the application, I naturally don't have any source code to step through since it's not part of the project.

I poked around at a few guides, namely this one (“No source available”, or how to Debug Multiple Binaries with GDB and Eclipse | MCU on Eclipse ) and in Debug Configurations-> Startup -> GDB run commands I added the following (where 0x10410 is the .text space according to the map file)
add-symbol-file "[file path]Bootloader_A00.elf" 0x10410

 

In my debugger console I see the following;

add-symbol-file "[file path]Bootloader_A00.elf" 0x10410
add symbol table from file "[file path]Bootloader_A00.elf" at
.text_addr = 0x10410
(y or n) [answered Y; input not from terminal]
Reading symbols from [file path]Bootloader_A00.elf...done.


however after the jump to Bootloader, I still get the "no source available for "_binary_C__Users_[myname]_workspaceS32DS_ARM... at [location in bootloader]" "

I've made sure I'm building in debug, but still can't see my code from the bootloader... any commands that I'm missing here?

1 解答
2,436 次查看
stanish
NXP Employee
NXP Employee

Hello Andrew,

Thanks for your question. I've tested this and I've basically reached the same point.

I'd suggest you to rather switch the symbol files via "Debugger Console" / GDB client console as a workaround.

e.g. to load bootloader symbols type the command below into GDB client console:

symbol-file <Path_to_your_BL_elf>\S32K144_bootloader.elf -readnow

pastedImage_14.png

* refresh the IDE (menu File -> 

pastedImage_13.png

and now the bootloader sources/symbols are available:

pastedImage_20.png

repeat the steps for the application symbol-file:

pastedImage_21.png

In the meantime I'll check with our debugger team what might be wrong with add-symbol-file.

Regards,

Stan

在原帖中查看解决方案

2 回复数
2,437 次查看
stanish
NXP Employee
NXP Employee

Hello Andrew,

Thanks for your question. I've tested this and I've basically reached the same point.

I'd suggest you to rather switch the symbol files via "Debugger Console" / GDB client console as a workaround.

e.g. to load bootloader symbols type the command below into GDB client console:

symbol-file <Path_to_your_BL_elf>\S32K144_bootloader.elf -readnow

pastedImage_14.png

* refresh the IDE (menu File -> 

pastedImage_13.png

and now the bootloader sources/symbols are available:

pastedImage_20.png

repeat the steps for the application symbol-file:

pastedImage_21.png

In the meantime I'll check with our debugger team what might be wrong with add-symbol-file.

Regards,

Stan

2,436 次查看
gearhead1107
Contributor IV

Thanks, Stan - this definitely works as a temporary solution.

One important note for anyone following along is that you have to refresh the debug context - not the file explorer context.

0 项奖励
回复