I can't see this has been asked/answered elsewhere although a couple of posts come close, so here goes.....
I currently use a black magic probe (bmp) to debug my ChibiOS creations and that is an excellent setup, however going forward I want to have my applications relocated to make room for a boot loader and run from there.
However what I can't figure out is how to debug an application who's reset vector is not 0 and whose VTOR vectors have been relocated. Loading the elf in gdb still ends up with gdb trying to run the boot loader and of course it has no symbols for that.
I'm sure this is just me being stupid and there's a simple answer, so could someone explain how to do this please?
Bootloader and gdb Topic is solved
Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Bootloader and gdb Topic is solved
Hi,
I think you need to put the first breakpoint past the bootloader and into the application code, once it stops there you should see symbols and all.
Giovanni
I think you need to put the first breakpoint past the bootloader and into the application code, once it stops there you should see symbols and all.
Giovanni
Re: Bootloader and gdb
Giovanni wrote:I think you need to put the first breakpoint past the bootloader and into the application code, once it stops there you should see symbols and all.
Giovanni
Yep that's exactly it. I loaded the application without doing a full erase so the bootloader was still in place then used 'start' in gdb which places a breakpoint at main() and it worked perfectly. Did a reset, hit the bootloader, ran that through to the point it started the application and when it go to the main() in the application it was in gdb prompt exactly as if no bootloader.
Seems obvious now you've said it and I've tried it, but was puzzling me until now
Thanks!
-
- Posts: 483
- Joined: Sat Nov 19, 2011 6:47 pm
- Location: Le Mans, France
- Has thanked: 21 times
- Been thanked: 30 times
Re: Bootloader and gdb
You should have no problem debugging the target app if you enter the correct address in gdb.
It will jump to the correct vector directly without running the bootloader.
It works fine for me, but I'm using stlink.
It will jump to the correct vector directly without running the bootloader.
It works fine for me, but I'm using stlink.
Who is online
Users browsing this forum: Baidu [Spider] and 41 guests