[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] avr-g++
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] avr-g++ |
Date: |
Fri, 24 May 2002 12:06:42 +0200 (MET DST) |
Torsten Mohr <address@hidden> wrote:
> Can anybody give me some examples what else is needed by C++?
Perhaps not even malloc(). avr-libc offers a malloc(), but its
implementation as pretty simple and has a number of deficiencies. (If
i get around, i'll try to make it a bit more efficient.) Apart from
that, i've got an application that is using it (a one-shot timer
service that allows for many concurrent timers in one program), so i
can confirm that malloc() works.
> It doesn't seem to be so easy to generate a working g++.
Why not?
> I found some patches to generate an avr-g++, they also let
> compile a test program, but that one doesn't link, there
> are always some parts missing.
Well, you're working in a microcontroller environment. Please realize
that before starting to compile any C++ source. In particular,
realize that you've got much less available resources than on your
favorite desktop computer.
> But it always fails at:
> gcc-3.1/libstdc++-v3/src/locale-inst.cc -o locale-inst.o
Sure. libstdc++ is /way/ too big to even think about building it for
the AVR. Omit it, and you'll at least get a working C++ compiler,
though of course no C++ standard library.
And watch out the generated code. A missing `&' can cause a disaster
killing the performance (and/or memory) of your AVR.
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/
avr-gcc-list at http://avr1.org