2020-08-28 05:48 AM
Hello,
I am developing a simple GUI for a custom board based STM32H750 MCU.
My requirements are the following:
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?
Solved! Go to Solution.
2020-08-28 05:58 AM
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.
2020-08-28 05:58 AM
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.