Decreasing BSS size for STM32F4

Мороз Олег oleg.moroz at mcc.vniiem.ru
Wed Oct 29 15:03:29 UTC 2014


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?

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




More information about the devel mailing list