2016-11-21 04:38 PM
Hello
I'm developing code for a STM32F031G6 on System Workbench. This microcontroller has 4KB of SRAM but after compiling my code (even with a empty main loop and nothing else declared) I get the following code size as output of my Build process:make --no-print-directory post-buildGenerating binary and Printing size information:arm-none-eabi-objcopy -O binary ''teste.elf'' ''teste.bin''arm-none-eabi-size ''teste.elf'' text data bss dec hex filename 984 1076 1056 3116 c2c teste.elfWhy are the DATA and BSS sections filling more than 2KB of my ram if my source code has just an empty main() function?I've been trying to find something about this matter with no success for a couple days. #stm322016-11-21 07:44 PM
Could you review the .MAP file? Or a disassembly?
Is there any heap allocation?2016-11-21 11:04 PM
Semihosting? RTOS?
JW2016-11-22 12:03 AM
in bss will be stack, but data? hard to know, very stange.
by size tool get size for all objects. look to map file.