Skip to main content
SMako
Associate II
Dec 3, 2019 9:10 PM UTC
Solved

CubeIDE generate Too Big BIN file for STM32WB55 (402MByte)

Hi,

i am building the code for STM32WB55. I have enabled "Convert to binary file (-O binary)" and "Convert to Intel Hex file (-O hex)".

I got 2 files:

-bin file - 402MByte size

-hex file - 183kByte

As i can see, bin file has 62kByte of real data and rest of data are "0x00". How i can make just normal BIN file? Please help to find out :)

--

Best regards,

Sergii

This topic has been closed for replies.
Ethan HUANG
Ethan HUANGBest answer
ST Employee
Dec 4, 2019 3:10 AM UTC

Hi Sergii,

I also ran into similar issue a while ago. Could you help check if your linker script contains MB_MEM2 with (NOLOAD)? If not, please add (NOLOAD) right after MB_MEM2 just like what you have for MAPPING_TABLE and MB_MEM1. Here is my record for your reference.

Regards,

Ethan

4 replies

Tesla DeLorean
Guru
Dec 3, 2019 11:53 PM UTC

.HEX files can be sparse, .BIN files cannot.

Keil's tools will break this into multiple files under different directories if you have separate sections in the .ELF/.AXF

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Ethan HUANG
Ethan HUANGBest answer
ST Employee
Dec 4, 2019 3:10 AM UTC

Hi Sergii,

I also ran into similar issue a while ago. Could you help check if your linker script contains MB_MEM2 with (NOLOAD)? If not, please add (NOLOAD) right after MB_MEM2 just like what you have for MAPPING_TABLE and MB_MEM1. Here is my record for your reference.

Regards,

Ethan

SMako
SMakoAuthor
Associate II
Dec 4, 2019 9:12 PM UTC

Hi Ethan Huang,

thanks a lot! Excellent =) ! Now i have OK binary as well!

My linker scrip had no "NO LOAD" statement. I have added it and now file is 63kB