BSS and DATA size too big
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-21 4:38 PM
Posted on November 22, 2016 at 01:38
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. #stm32
This discussion is locked. Please start a new topic to ask your question.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-21 7:44 PM
Posted on November 22, 2016 at 04:44
Could you review the .MAP file? Or a disassembly?
Is there any heap allocation?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-21 11:04 PM
Posted on November 22, 2016 at 08:04
Semihosting? RTOS?
JWOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-22 12:03 AM
Posted on November 22, 2016 at 09:03
in bss will be stack, but data? hard to know, very stange.
by size tool get size for all objects. look to map file.