cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476: MainApp code offset 0x08008000, flash/debug work but debug only did not

Riscy
Senior

Using STM32CubeIDE (1.13.1) and STM32L476RG Nucleo board.

The MainApp code has modified start address 0x08008000 via linker file and system_stm32l4xx.c file so VTOC point to interrupt vector from 0x08008000 with start code from 0x08008190. Under the debug mode (including flashing) the UART working and led flashes, so MainApp working fine at this address. 

Just to note: it did not run without debug, ie from power up reset. This is because there are no MSP/PC value (both 0xFFFF.FFFF) from 0x0800.0000 which normally start.

The main topic here is to debug the MainApp without flashing from 0x0800.8000 (the code is there via previous flashes). In debug configuration I have unchecked <program>, I then run the debug which stop 0xFFFF.FFFE, it did not work.  

I have reverted the MainApp back to 0x0800.0000 and the debug without flashing do work fine.

Do I missing something else to make MainApp work from 0x0800.8000 (without any code from 0x0800.000 to 0x0800.7FFF), I wonder if anyone suggest? 

NB: I erase the flash each time before flashing.  

NB: Between 0x0800.0000 to 0x0800.7FFF is blank (0xFFFF.FFFF) which later will be filled with bootloader.

Why I'm doing this, just for fun :-). 

 

 

2 REPLIES 2
Pavel A.
Evangelist III

>Do I missing something else to make MainApp work from 0x0800.8000 (without any code from 0x0800.000 to 0x0800.7FFF),

Of course you do. There must be some code flashed at 0x08000000 to jump to your app at 0x08008000. The debugger is smart and does this for you.

> Between 0x0800.0000 to 0x0800.7FFF is blank (0xFFFF.FFFF) which later will be filled with bootloader

So it's the time to put there something.

You'll need something in there, even if it's the first two words of you Vector Table from 0x08008000

Otherwise the processor has no idea how to proceed.

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