STM32F303VB: How to debug Boot loader + Application?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-03 11:19 PM
Hi,
I'm working on my custom hardware based on STM32F303VB
I'm trying to make a CAN based boot loader.
I can jump from boot loader to application but the application just hangs some where.
How can I debug boot loader + application using AC6 System Work bench?
Is it even possible to debug 2 projects together?
Or is there a special method to debug?
Any inputs will be of help.
Thanks & regards, Pj
#stm32f303 #stm32f303vb #bootloaderSolved! Go to Solution.
- Labels:
-
Bootloader
-
STM32F3 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-04 8:03 AM
In Keil and IAR you can debug either the app or the loader with source, You can step across the transition, and follow the assembler code, if it gets hung up some place, a) see if you recognize the code/function, b) look at the .MAP file to determine what you're in, and how deep, ie 40% into SystemInit(), etc.
I'd expect any debugger worth a damn to be able to step into ANY code, might not show you 'source' but again this should not preclude a reasonable understanding of what's going on.
Have a proper Hard Fault handler so you catch gross failure. Make sure SystemInit() or whatever sets the correct Vector Table via (SCB->VTOR), especially important for an app not at the base of flash.
Instrument your code, or add check points, so you know what's going on, where the flow goes, where it gets stuck.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-04 1:19 AM
GCC does not allow you to debug two parts of the project at once. He needs to have solid ground under his feet while debugging the application.
During the debugging of the bootloader - the degree of availability of the application is not important, it's just a load.I wanted to have such a magic button, but it does not exist.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-04 7:21 AM
Hello
J.Prasant
,CAN bootloaderis not applicable for STM32F
I recommend that you have a look to the application note ''STM32 microcontroller system memory boot mode''
and you find related information to the STM32F303 bootloader . You can refer to this ''CAN protocol used in the STM32 bootloader'' and checkApplicable products.Regards
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-04 8:03 AM
In Keil and IAR you can debug either the app or the loader with source, You can step across the transition, and follow the assembler code, if it gets hung up some place, a) see if you recognize the code/function, b) look at the .MAP file to determine what you're in, and how deep, ie 40% into SystemInit(), etc.
I'd expect any debugger worth a damn to be able to step into ANY code, might not show you 'source' but again this should not preclude a reasonable understanding of what's going on.
Have a proper Hard Fault handler so you catch gross failure. Make sure SystemInit() or whatever sets the correct Vector Table via (SCB->VTOR), especially important for an app not at the base of flash.
Instrument your code, or add check points, so you know what's going on, where the flow goes, where it gets stuck.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-04 9:58 AM
Assume his own boot loader, not system loader
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-18 1:11 AM
Hi guys,
I found the problem.. the jump was working fine but systick interrupts were not working.
I had missed using __enable_irq() at the beginning on the application firmware.
Thanks for valuable inputs!
Regards, Pj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-30 8:08 AM
@Prasant J​ can you please share you code with me? I wish to write a can based bootlaoder for my STM32F042K6 but I have some difficulties. It will be very kind of yours if you could give me some help. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-30 8:27 AM
Look at the assorted IAP examples for the platform. The CM0 parts have some different considerations when you can't program the vector table.​
Up vote any posts that you find helpful, it shows what's working..
