2022-08-06 08:23 PM
I have a project that contained UI design using TouchGFX. Almost the code auto-generated by TouchGFX for STM32CubeIDE is lay on QSPI external flash. And after built in CubeIDE, I saw .bin file of project around ~2GB
So, I try to relocate all the section pointed to QSPI external Flash to Flash region by using Linker file. After that, .bin file have been built around 900KB
So what is the problem here? why the code lay on QSPI ExtFlash made the ".bin" file too large?
Solved! Go to Solution.
2022-08-07 02:16 PM
It's a topic that's been covered on forum several time.
I think objcopy has a command line option to check pick particular sections to extract.
.HEX files are sparse, describing addresses related to data lines.
In Keil one can use FROMELF tools, and this can extracts multiple binaries into different directories.
https://community.st.com/s/question/0D53W00000PpuUgSAJ/split-bin-in-multiple-regions
https://www.google.com/search?q=sym32+objcopy+multiple+sections
2022-08-06 08:36 PM
Because the different memory regions described to the linker span vast distances.
You need to keep it in an object form, or split into multiple binaries.
2022-08-06 09:04 PM
How can I build 2 binary file in STM32CubeIDE, thanks.
2022-08-07 01:34 PM
You can run objcopy two times to produce a .bin, one time remove the section that holds the external memory; another time extract only that section.
You can also produce a hex file.
2022-08-07 02:16 PM
It's a topic that's been covered on forum several time.
I think objcopy has a command line option to check pick particular sections to extract.
.HEX files are sparse, describing addresses related to data lines.
In Keil one can use FROMELF tools, and this can extracts multiple binaries into different directories.
https://community.st.com/s/question/0D53W00000PpuUgSAJ/split-bin-in-multiple-regions
https://www.google.com/search?q=sym32+objcopy+multiple+sections
2022-08-08 03:28 PM
And IAR has ielftool, it can extract all spans of an ELF file at once. with option --bin-multi. This is handy if you don't remember section names, or if a section is sparse.