cancel
Showing results for 
Search instead for 
Did you mean: 

how to build a hex that with external section data?

QGuo.1
Associate

In STM32L4R9AI discovery board, the project includes const variables of graphical data.

the data is placed as a separate section and will be flashed in the external flash.

but after build, the variables are not inclued in the hex file.

how to add the extern flash data into the hex file?

2 REPLIES 2

One way is to use tools for hex files manipulation such as srecord; but the real question is, which tool will you use to read such a combined hex file and program it into both the internal and external FLASH, and what is the hex file format that tool expects.

JW

The linker should be able to get the data in the file unless you have some NOLOAD / NOINIT type sector, or you fail to unpack with startup.s code.

Getting .HEX files from different sections of a .ELF should be a matter of just running the command line tools to cherry pick the one you want.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..