cancel
Showing results for 
Search instead for 
Did you mean: 

Debug bootloader and application

AKoek.1
Associate

I am trying to create a custom bootloader and having trouble debugging where in the application it jumps to.

Both projects are in the IDE.

If needed. The MCU I use is a STM32F103RET6

3 REPLIES 3
Piranha
Chief II

Better do it with a much simpler and better approach compared to a typical one from ST's examples. Look for my comment here:

https://community.st.com/s/question/0D50X0000AFpTmUSQV/using-nvicsystemreset-in-bootloaderapplication-jumps

I have seen the example but I cannot figure out how to implement it myself.

My experience with assembly is none

Not using CubeIDE here, but should be able to at least step across the transition in a disassembly view. Make sure it is getting to the right place. Use the .MAP file from the linker to understand where Reset_Handler, main, etc are situated in the application image.

Perhaps look at IAP (In-App Programming) examples.

If the clocks and PLL are already up, I would not perform that step again. Make sure the vector table is set in SCB->VTOR correctly, check SystemInit(). Ideally have a UART working so you can output some telemetry as you leave loader and enter application.

>>My experience with assembly is none

Might want to get a better understanding of how the MCUs work, it will help with the implementational detail, and following what's happening.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..