cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE Bootloader setup and debugging

xrstokes
Associate III

I’m trying to have a project in eclipse that is in 2 parts, both generated with cube ide.

The small part at 0x08000000 is just a boot loader that can load file from SD card. [Mustang 2.2 Boot]

The APP part is at 0x08008000 is where the app is that can be flashed. [Mustang 2.2]

I followed this guide and had no luck. https://github.com/ethanhuanginst/STM32CubeIDE-Workshop-2019/tree/master/hands-on/09_BOOT-APP

Then I followed an official guide that was for Attolic and had no luck either. I think things have changed a bit since then.

I can’t even find the right wording in order to search for guides on how to do this. Can someone point me in the right direction.

My tree looks like that.

0693W000003RmguQAC.png

And my debug config looks like this.

0693W000003RmgkQAC.png

other than that i have changed the addresses in the .Id files and set the vector offset as in the guide. Any help would be appreciated.

I should add that it builds and debugs fine as either app. But i want to launch one and follow it into the other. at the moment it just freezes instead of jumping over.

3 REPLIES 3
EJOHA
Senior

Good to hear you can debug each program individually.

When debugging both programs I just have one question. Did you set a breakpoint in the app so the program can stop for instance in app main()?

Another help to understand whats going on is to step in assembler mode when boot program will call the app.

There is also a user guide for STM32CubeIDE. It does not say so much about boot/app programming but you can found it here.

xrstokes
Associate III

Update. I can now get it to jump over and run the app. but if i put a breakpoint in the app it freezes at it and won't continue.

My app code executes fine until i pause or hit breakpoint. then it freezes.

xrstokes
Associate III

I have it mostly working now.

The guide is correct except before jumping to the next app you need to call HAL_Deinit().

The only problem now is that the CPU freezes after debugging and i have to power cycle it.

Otherwise everything appears to be fine so far.