cancel
Showing results for 
Search instead for 
Did you mean: 

What did i miss? How to change application boot address correctly? I want to use my application with bootloader. MinGW + VS Code + openocd + make. STM32L452CC

SBond.3
Associate

Most time i use IAR to create an application. But want to use mingw and vs code instead iar. I`m already have a bootloader which is working fine with my IAR applications.

Here is the sequence for IAR:

  1. I generate project for IAR via CubeIDE
  2. In IAR i go to options->linker and change vector table and memory regions
  3. Insert this code in main():

  __disable_irq();

 SCB->VTOR = 0x8005000;

 __enable_irq();

4.download app with bootloader and everything working fine. Even i can debug my application

Here is the sequence for VS Code:

  1. generate the same project for makefile via CubeIDE
  2. change address in linker script FLASH (rx)     : ORIGIN = 0x8005000, LENGTH = 118K
  3. Insert this code in main():

 __disable_irq();

 SCB->VTOR = 0x8005000;

 __enable_irq();

4.download app with bootloader. The bootloader succsessfully called application but app is not started. maybe it is hard fault but i`m not sure because gebugger is also not working(because of non standart address 0x8005000).

What did i miss? What i have to do to run app?

0693W00000Lw0JSQAZ.png0693W00000Lw0IjQAJ.png

1 REPLY 1
Pavel A.
Evangelist III

> but app is not started. maybe it is hard fault but i`m not sure because gebugger is also not working

Then you need to get a debugger working by any means.

Install the old new good CubeIDE. It can debug .elf files built outside of it.

It can also load both images at once, with debug symbols, or only the debug symbols.

See the user manual for instructions.