On 14 January 2014 14:17, nick clifton <ni...@redhat.com> wrote:
> Hi Emil,
>
> However when I try to compile simple programs for small chips it seems
>> just
>> the runtime takes up more SRAM than the chip has.
>>
>
> Have you tried turning on linker garbage collection ? This should make
> the linker discard unused bits of code (eg most of newlib). So for example:
>
> msp430-elf-gcc -mmcu=msp430g2231 -Os -static -Wall -Wextra simple.c -o
> simple.elf -Wl,-gc-sections
>
Hi Nick,
Thanks for the suggestion. I just tried that, but it unfortunately it
doesn't seem to have any effect.
$ msp430-elf-gcc -mmcu=msp430g2231 -Os -static -Wall -Wextra simple.c -o
simple.elf -Wl,-gc-sections
/usr/lib/gcc/msp430-elf/4.9.0/../../../../msp430-elf/bin/ld: simple.elf
section `.bss' will not fit in region `RAM'
/usr/lib/gcc/msp430-elf/4.9.0/../../../../msp430-elf/bin/ld: region `RAM'
overflowed by 14 bytes
collect2: error: ld returned 1 exit status
/Emil
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users