This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil uVision program not starting when flashed to other flash memory address

Hi, I am using Keil uVision V5.37.0.0. free version with uC STM32G041C8T6 and ULINK-ME programmer/debugger. Flash memory starts at 0x08000.00000. I would like the application to get stored into flash memory address 0x0800.1000. So I changed the Linker R/O Base to 0x0800.1000 and build and download it without any error saying 'Application running...'. If I look in the .map file I see the program resides in 0x0800.1000. But, it does not start. (Blinking Led)

Parents
  • Presuming that MCUs internal bootloader checks if there is anything valid at address 0x0800 0000 and if it finds valid first 2 32-bit entries 1-st initial stack pointer (address in RAM), 2-nd valid reset handler address (address in flash) it will then continue by loading SP and jumping to reset handler.
    If 0x0800 0000 contains erased value (0xFF) or some other invalid values then internal bootloader will probably stay in a loop forever.

    You should consult documentation on STM32G0 internal bootloader to understand how the excution of your application starts.

Reply
  • Presuming that MCUs internal bootloader checks if there is anything valid at address 0x0800 0000 and if it finds valid first 2 32-bit entries 1-st initial stack pointer (address in RAM), 2-nd valid reset handler address (address in flash) it will then continue by loading SP and jumping to reset handler.
    If 0x0800 0000 contains erased value (0xFF) or some other invalid values then internal bootloader will probably stay in a loop forever.

    You should consult documentation on STM32G0 internal bootloader to understand how the excution of your application starts.

Children
No data