Skip to main content
SMako
Associate II
December 3, 2019
Solved

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

  • December 3, 2019
  • 3 replies
  • 3101 views

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.
Best answer by Ethan HUANG

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

3 replies

waclawek.jan
Super User
December 3, 2019
Tesla DeLorean
Guru
December 3, 2019

.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
December 4, 2019

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
December 4, 2019

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