Skip to main content
Visitor II
July 27, 2022
Solved

I am trying to download a bootloader .elf and an application .elf on my stm32h753. Even though I add both images on debug configuration -> Startup, only the one persists.

  • July 27, 2022
  • 2 replies
  • 1925 views

Hello,

I am attaching the programmer console from the IDE. It looks like both .elf are programmed in the specified region but ultimately only the one that gets loaded last persists. Does this happen because during the download of the last .elf the whole FLASH gets erased? Is there a setting to prevent that?

I have also attached screenshots of the memory regions and a screenshot of the debug configurations.

It might be useful to mention that if set the debug settings so that the start up is from the application, region 0x8008000 holds firmware and 0x8000000 is empty, which in my eyes enforces the hypothesis that flash gets wiped out before the second .elf is programmed.

Any thoughts?

Thank you!

0693W00000QMI3uQAH.png0693W00000QMI3aQAH.png

Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a56820.srec
 File : ST-LINK_GDB_server_a56820.srec
 Size : 4554488 Bytes
 Address : 0x08008000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 2]
Erasing memory corresponding to segment 1:
Erasing external memory sectors [0 1028]
Download in Progress:
 
 
File download complete
Time elapsed during download operation: 00:00:50.620
 
 
 
Verifying ...
 
 
 
 
Download verified successfully 
 
 
 -------------------------------------------------------------------
 STM32CubeProgrammer v2.8.0 
 -------------------------------------------------------------------
 
Warning: Wrong connect parameter: speed=fast
ST-LINK SN : 003D00213156501920323443
ST-LINK FW : V3J9M3B5S1
Board : STLINK-V3SET
Voltage : 3.26V
SWD freq : 24000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x450
Revision ID : Rev V
Device name : STM32H7xx
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M7
BL Version : 0x90
 
 
 
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a56820.srec
 File : ST-LINK_GDB_server_a56820.srec
 Size : 21880 Bytes
 Address : 0x08000000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sector 0
Download in Progress:
 
 
File download complete
Time elapsed during download operation: 00:00:00.950
 
 
 
Verifying ...
 
 
 
 
Download verified successfully 

0693W00000QMI3QQAX.png

    This topic has been closed for replies.
    Best answer by alister

    Sector size is 128k bytes. Your bootloader and app must reside in different sectors, else an erase of the app will erase the bootloader too.

    2 replies

    Super User
    July 29, 2022

    Try this:

    build both projects, then load the application (don't debug or run).

    Edit the launch config, uncheck build and download of the app. Only load its symbols.

    Then start debugging the bootloader.

    alisterAnswer
    Explorer
    July 29, 2022

    Sector size is 128k bytes. Your bootloader and app must reside in different sectors, else an erase of the app will erase the bootloader too.

    Graduate II
    July 29, 2022

    THIS