Bootloader and gdb Topic is solved

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

avrhack
Posts: 140
Joined: Tue Dec 24, 2013 1:42 pm
Has thanked: 17 times
Been thanked: 3 times

Bootloader and gdb

Postby avrhack » Wed Jun 01, 2016 8:21 pm

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?

User avatar
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

Postby Giovanni » Wed Jun 01, 2016 8:24 pm

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

avrhack
Posts: 140
Joined: Tue Dec 24, 2013 1:42 pm
Has thanked: 17 times
Been thanked: 3 times

Re: Bootloader and gdb

Postby avrhack » Sat Sep 10, 2016 6:46 pm

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!

mobyfab
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

Postby mobyfab » Wed Oct 05, 2016 3:30 pm

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.


Return to “General Support”

Who is online

Users browsing this forum: Baidu [Spider] and 41 guests