Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

yagarto+FreeRTOS. BSS elf size vs actual size

Posted by Ella on September 4, 2013
Hi,
Sorry for possible off-topic but I did not find any better place to ask my question. Unfortunately there is no mail list for yagarto ARM compiler. But I hope my question is simple and can be usefully for other developers.

Below is an output of
arm-none-eabi-size -B -t --common
text data bss dec hex filename
496 0 0 496 1f0 _output/startup_stm32f2xx.o
779 0 16 795 31b _output/main.o

....
skip
....
1787 4 208 1999 7cf _output/tasks.o
796 0 56 852 354 _output/timers.o
338 4 0 342 156 _output/port.o
652 0 128 780 30c _output/croutine.o
262 4 16404 16670 411e _output/heap_2.o
132 0 0 132 84 _output/list.o

55073 176 61845 117094 1c966 (TOTALS)

Size of target .elf file:
arm-none-eabi-size -B _output/CM5.elf
text data bss dec hex filename
24800 68 73852 98720 181a0 _output/CM5.elf

My question is why there is a difference between total BSS size of all objects = 61845
and BSS size in elf file = 73852

What is the actual size of used memory? My CPU has 128K And I do not want to waist 73852-61845 bytes.
Thanks.

RE: yagarto+FreeRTOS. BSS elf size vs actual size

Posted by Dave on September 4, 2013
Have a look in the map file. It should tell you the start address of each object in .bss. Perhaps there is a lot of padding for alignment.
Are you compiling as C++ or C?
Is there any debugger code or stubs added? Try a release build without debug info.

RE: yagarto+FreeRTOS. BSS elf size vs actual size

Posted by Ella on September 4, 2013
I'm building with C via own Makefile and ld script.
I have removed debug options -g and -ggdb3 but situation did not change.

Map file looks also much more optimistic then size output:
...
.bss 0x20000044 0x9f84 load address 0x0800e11c
0x20000044 . = ALIGN (0x4)
0x20000044 _sbss = .
...
...
0x20009fc8 . = ALIGN (0x4)
0x20009fc8 _ebss = .
0x20009fc8 PROVIDE (end, _ebss)
0x20009fc8 PROVIDE (_end, _ebss)

._usrstack 0x20009fc8 0x100 load address 0x080180a0
0x20009fc8 . = ALIGN (0x4)
0x20009fc8 _susrstack = .
0x2000a0c8 . = (. + _Minimum_Stack_Size)
*fill* 0x20009fc8 0x100 00
0x2000a0c8 . = ALIGN (0x4)
0x2000a0c8 _eusrstack = .
0x2000a0c8 __exidx_start = .
0x2000a0c8 __exidx_end = .

So according to map file my BSS is 0x9f84 = 40836 dec long.
How can it be?


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner