- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
using imx rt 1024, for my position independent code experiment I am trying to debug my "offsetted" application, but gdb isn't loading the symbols.
What am I doing wrong?
For background:
- my bootloader sits at 0x60000000
- app1 (not uploaded) normally sits at 0x60020000
- app2 is uploaded with above offsets of 0x10000
When I debug the app with above configuration, when I press suspend debugger I can analyze the memory. I can see that my app is properly uploaded to 0x6003000. But the debugger (gdb) is not able to locate the symbols
(memory shows my app is in memory on desired offset location)
PS: vector table and .got are both in sram. in my startup code I properly patch the ISR vector addresses, so that's not the problem. When I put a breakpoint in the first line of my ResetHandler, it doesn't hit. When I pause my application once started, it can't find symbols.
Many thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Managed to get it working after all. Using gdb command `add-symbol-file <path-to-elf> <address-to-text-section> just before I jump from my bootloader to the relocated app fixed it.
Well, to be fair, I didn't test it in MCUxresso, I migrated my projects to VScode instead (compiling with CMake). But I am sure it works all the same in MCUxpresso


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @bp1979 ,
Which APP you want to debug now?
Talk about my experience with the secondary bootloader+application debug.
As you know, the application debug have the offset, and the code running normally determined by the boot entry point, and that is normally from ROM BOOT+secondary boot+ app.
So, if I need to debug the application, I will download the secondary bootloader which can jump to the application at first, then the application will works.
Another way, test the application without the offset at first, after the code function totally works, then I do the offset, and download to the related offset area, test the function directly when + bootloader.
So, to your situation, I suggest you can try to test the application without offset and debug it, it will make things easy.
Best Regrads,
Kerry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Managed to get it working after all. Using gdb command `add-symbol-file <path-to-elf> <address-to-text-section> just before I jump from my bootloader to the relocated app fixed it.
Well, to be fair, I didn't test it in MCUxresso, I migrated my projects to VScode instead (compiling with CMake). But I am sure it works all the same in MCUxpresso
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear nxp,
any solution for this? using an incredible cumbersome way to debug my position independent app this way.
