cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE generating 400MB binary files for example applications with BLE

AKypa
Associate

I started using STM32wb55rgv6 nucleo board recently and I have been doing my early development in CubeIDE 1.0.2. [converted SW4STM32 project files].

I've trying to replicate the OTA + BLE_p2pserver example and I hit the following snug:

As part of the OTA procedure, one has to generate the .bin file for the application. CubeIDE consistently creates huge .bin files (~400Mb) from the BLE_p2pserver example as well as from other examples with BLE; it seems unrelated to OTA.

The same step works just fine on IAR; I get the expected 32Kb binary file.

As mentioned elsewhere, it's probably because of some high memory location included in the non-sparse binary, but I don't seem to be able to find a way around it.

Enumerating all the sections in the linker file does not give a working app:

arm-none-eabi-objcopy.exe -v --output-target=binary -j .isr_vector -j .text -j .rodata -j .ARM.extab -j .ARM -j .preinit_array -j .init_array -j .fini_array -j .data -j .bss -j .user_heap_stack BLE_p2pServer.elf "BLE_p2pServer.bin"

Any ideas?

Thanks,

Athanasios

P.S. Given that this is example code, I would expect it to work out-of-the-box as described. 😬

5 REPLIES 5

If your tools make a large binary, then you're going to need to selectively extract the sections.

Keil tools do this properly. Others you'll need to drive through the command line.

Make sure the .MAP describes the sections correctly.

Perhaps you can take the .HEX file and separate the sections from that, the format has low complexity.​

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

Hi, can you please help to fix this issue? I have exactly the same issue.

Is the hex continuous? If not, what address areas does it cover? To which sections do they correspond in .elf (maybe look at mapfile)?

JW

Hi,

thanks for the answer - as i can see - hex is not continuous. I am not an expert in map files, can you please help with it? I have attached it

--

best regards,

Sergii

SMako
Associate III