Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


builtin lib make executable file bigger

Hi STworld:

There are some functions in builtin lib that I don’t use but they takes about 10KB in my executable bin file. They are
function size(hex) size(dec)
_dtoa_r 0xea8 3752
_malloc_r 0x524 1316
_realloc_r 0x3ec 1004
_svfprintf_r 0x14d0 5328

I see them in output.map as functions in libc.a.
If I don’t use them, can I remove them out from my bin file? And how to do that?

By the way, I am uisng STM32F427ZI on AC6 IDE. Additional, I check on -ffunction-sections and -fdata-sections for MCU GCC Compiler. I also discard unused section (-WI,-gc-sections)

in linkerscript.ld file, I see the section:
DISCARD :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}

I try to remove that section but isn’t successfull to reduce my bin file size.

Everyone, please help.

Best regards,
Hung Phan

France

Hi Hung,

If these functions are included in your executable it’s because some other function that you call need them; it’s not always simple to know which is the responsible function but you should be able by carefully looking at the content of the map file; currently I regretfully can’t help you more. There’s quite a lot of functions in the C library that need malloc for example and I don’t know which one you called...

Bernard


Thanks Bernard. I will look at all functions I used to figure out which are using those lib function.

Hung Phan