AnsweredAssumed Answered

BSS and DATA size too big

Question asked by matheusmbar on Nov 22, 2016
Latest reply on Nov 22, 2016 by dembek.radoslaw.001
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-build
Generating 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.elf

Why 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. 

Outcomes