cancel
Showing results for 
Search instead for 
Did you mean: 

IAR "download and debug" reset registers ?

ranran
Senior II

Hello,

I am using a Bootloader which jump to operational application.

the Bootloader configures SRAM, so that operational does not need to do it again.

Bootloader is baremetal , and operational is freeRTOS.

I use IAR.

Everything works well if I reset the board, and "Attach debugger to running application".

But If I try to: reset board and debug&download the operational application it hangs. It seems that the problem is that on debug&downloading the application all FMC register are set to zeros.

But I don't understand who is responsible for setting registers to zero. where in IAR did I configure such reset of registers ?

 I did not find anything in IAR debugger configuration which explains me this reset of registers values (which were set in bootloader).

Thanks for any idea,

ranran

1 ACCEPTED SOLUTION

Accepted Solutions

The debugger is entirely short circuiting the boot loader operation, and places the start of execution at the front of the app. The debugger likely resets the processor as a means to gain control, it doesn't know you've created external dependencies.

The app could detect this, and execute some code to bring up the FMC properly, perhaps via a clean entry point function in the loader if you don't want to replicate the code, or you could code a debugger script file to poke the registers

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

View solution in original post

1 REPLY 1

The debugger is entirely short circuiting the boot loader operation, and places the start of execution at the front of the app. The debugger likely resets the processor as a means to gain control, it doesn't know you've created external dependencies.

The app could detect this, and execute some code to bring up the FMC properly, perhaps via a clean entry point function in the loader if you don't want to replicate the code, or you could code a debugger script file to poke the registers

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