Hi,
I just tried installing the new toolchain, r206599 from the GCC SVN and the
latest newlib from CVS.
However when I try to compile simple programs for small chips it seems just
the runtime takes up more SRAM than the chip has. Eg.
$ cat simple.c
#include msp430.h
static inline void
On Tue, Jan 14, 2014 at 01:27:26PM +0100, Emil Renner Berthing wrote:
So am I doing something wrong or will it work eventually and I'm just being
impatient?
I could say that newlib is huge and the crt code for gcc too could use
a trim (for example it links in code for C++ and java
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:
On Tue, Jan 14, 2014 at 02:08:53PM +0100, Emil Renner Berthing wrote:
Right, so the workaround is something like
$ msp430-elf-gcc -mmcu=msp430g2231 -Os -static -nostdlib -Wall -Wextra
simple.c -o simple.elf `msp430-elf-gcc gcc -print-libgcc-file-name`
..and then add my own assembly to clear
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
Hi Emil,
Thanks for the suggestion. I just tried that, but it unfortunately it
doesn't seem to have any effect.
Darn.
I did try compiling your test case locally, but I do not run into these
errors. The binary I end up with is 13182 bytes on disk and only uses
38 bytes of data:
%
The typical case for tiny programs is that the startup/shutdown code,
which normally has to be robust enough to handle all language
extensions, is vastly bigger than the program itself. There are a
couple of things you can manually do to trim out bits you know you
don't need, like custom crt0.S
On 14/01/14 13:27, Emil Renner Berthing wrote:
Hi,
I just tried installing the new toolchain, r206599 from the GCC SVN and the
latest newlib from CVS.
However when I try to compile simple programs for small chips it seems just
the runtime takes up more SRAM than the chip has. Eg.
$ cat