Skip to main content
Visitor II
August 28, 2020
Solved

Custom Bootloader STM32H750

  • August 28, 2020
  • 1 reply
  • 1176 views

Hello,

I am developing a simple GUI for a custom board based STM32H750 MCU.

My requirements are the following:

  • Both application code/data and touchGFX images/fonts are stored in and external QSPI (0x90000000)
  • The entire application must be executed in the internal SRAM (0x24000000)

For these reasons I modified the ExtMem_Boot example to devolop a bootloader that copy only the application and data in SRAM and jump in APP_ADDRESS 0x24000000:

MEMORY

{

 DTCMRAM  (xrw)  : ORIGIN = 0x20000000,  LENGTH = 128K

 ITCMRAM  (xrw)  : ORIGIN = 0x00000000,  LENGTH = 64K

 RAM   (xrw)  : ORIGIN = 0x24000000,  LENGTH = 256K

 RAMFB   (xrw)  : ORIGIN = 0xD0000000,  LENGTH = 768K

 OSPI_DATA    (xrw)  : ORIGIN = 0x90040000,  LENGTH = 64M - 256K

}

/* Sections */

SECTIONS

{

  /* The startup code into "FLASH" Rom type memory */

 .isr_vector :

 {

  . = ALIGN(4);

  KEEP(*(.isr_vector)) /* Startup code */

  . = ALIGN(4);

 } >RAM /*FLASH*/

 /* The program code and other data into "FLASH" Rom type memory */

 .text :

 {

  . = ALIGN(4);

  *(.text)      /* .text sections (code) */

  *(.text*)     /* .text* sections (code) */

  *(.glue_7)     /* glue arm to thumb code */

  *(.glue_7t)    /* glue thumb to arm code */

  *(.eh_frame)

  KEEP (*(.init))

  KEEP (*(.fini))

  . = ALIGN(4);

  _etext = .;    /* define a global symbols at end of code */

 } >RAM /*FLASH*/

For small application this works fine. But since I have graphical data generated by touchGFX the compiled binary file (.bin) is huge (1.7GB most of the data are zeros) and I cannot flash the binary in 0x90000000

Is there a way to split application and graphics in two different bin files?

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    You get a huge monolithic BIN file because it tries to describe multiple different memory regions.

    The Keil FromELF tool can break different sections into their own binary file.

    Probably selective functionality in objcopy, check the man file, or command line help.

    The ELF/HEX files aren't so complicated, one could just process and decompose those.

    1 reply

    Graduate II
    August 28, 2020

    You get a huge monolithic BIN file because it tries to describe multiple different memory regions.

    The Keil FromELF tool can break different sections into their own binary file.

    Probably selective functionality in objcopy, check the man file, or command line help.

    The ELF/HEX files aren't so complicated, one could just process and decompose those.