Skip to main content
AKypa
Associate
September 20, 2019
Question

CubeIDE generating 400MB binary files for example applications with BLE

  • September 20, 2019
  • 3 replies
  • 1917 views

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. :grimacing_face:

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
September 20, 2019

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 VenmoUp vote any posts that you find helpful, it shows what's working..
SMako
Associate II
December 3, 2019

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

waclawek.jan
Super User
December 3, 2019

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

SMako
Associate II
December 3, 2019

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 II
December 3, 2019