Decreasing BSS size for STM32F4

Joel Sherrill joel.sherrill at oarcorp.com
Wed Oct 29 15:07:00 UTC 2014


On 10/29/2014 10:03 AM, Мороз Олег wrote:
> looks like the BSS segment is depend from RAM_SIZE. I'm changing file
> called linkcmds:
>
> MEMORY {
>       RAM_INT : ORIGIN = 0x20000000, LENGTH = 128k
>
> after building has
>
> arm-rtems4.11-size shell.exe
>      text       data        bss        dec        hex    filename
>    364756      32256      98824     495836      790dc    shell.exe
>
> .BSS is 98824
>
>
> MEMORY {
>       RAM_INT : ORIGIN = 0x20000000, LENGTH = 192k
>
> arm-rtems4.11-size shell.exe
>      text       data        bss        dec        hex    filename
>    364756      32256     164360     561372      890dc    shell.exe
>
> .BSS raised up to 164360
>
>
> MEMORY {
>       RAM_INT : ORIGIN = 0x20000000, LENGTH = 256K
>
> arm-rtems4.11-size shell.exe
>      text       data        bss        dec        hex    filename
>    364756      32256     229896     626908      990dc   shell.exe
>
>
> How can i fix the BSS size?

Sebastian should look into this but as a quick hint, the symbol marking
bss end sounds like it is after something indicating end of RAM. I have
seen this on other BSPs but the ARM linkcmds is shared, Sebastian did the
magic for that.

You should be able to spot the issue since you have test cases.
>
> On 14.10.2014 14:47, Мороз Олег wrote:
>> arm-rtems4.11-readelf -l shell.exe
>>
>> Elf file type is EXEC (Executable file)
>> Entry point 0x8000189
>> There are 4 program headers, starting at offset 52
>>
>> Program Headers:
>>    Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz Flg Align
>>    EXIDX          0x027aa0 0x080279e8 0x080279e8 0x00008 0x00008 R   0x4
>>    LOAD           0x0000b8 0x08000000 0x08000000 0x27a00 0x27a00 RWE 0x8
>>    LOAD           0x027ab8 0x20001188 0x08027a00 0x0061c 0x0061c RW  0x8
>>    LOAD           0x0280e0 0x20000000 0x20000000 0x00000 0x30000 RW  0x20
>>
>>   Section to Segment mapping:
>>    Segment Sections...
>>     00     .ARM.exidx
>>     01     .start .text .init .fini .rodata .ARM.exidx .eh_frame
>> .init_array .fini_array .jcr
>>     02     .data
>>     03     .vector .bss .work
>>
>>
>> On 14.10.2014 14:10, Sebastian Huber wrote:
>>> arm-rtems4.11-readelf -l
>> _______________________________________________
>> devel mailing list
>> devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the devel mailing list