This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bare metal with C++ support?


Allen Curtis wrote:
Using the sample configuration, such as armeb-unknown-eabi, does not build g++. When you go into menuconfig, you are not given the option to build any language other than C when you select bare- metal. I do not see how this could just work....


I don't use menuconfig. We use RPMs or RTEMS test scripts.


That is "ct-ng menuconfig"


RPMs? Like the Red Hat package manager? I am confused.
The RTEMS Project (http://www.rtems.org) provides
prebuilt toolsets for various GNU/Linux distributions
along with binaries for MS-Windows.  We use binutils,
gcc, newlib, and gdb.  The targets are *-rtems* instead
of say *-elf but the underlying source code is the same
and the *-rtems* target is usually a close cousin of
the *-elf* on the same architecture.

With the RTEMS target, you are just going to get more
functionality -- tasking, filesystem, TCP/IP etc.

So when distributing tools they are in RPM. When
testing to report to the GCC list, they are automated
build scripts.  That's what I was referring to.
- Allen

You want to do bare metal. Get behind the script. :-D

Well that depends on the intent of the project.


If you are just building a *-elf toolset from source
using newlib, it isn't that difficult by hand.  Just
the proper incantation of a few configure lines. :)

Rough instructions from the top of my head.

Untar binutils, gcc, newlib, and gdb
mv or symlib newlib's libgloss and newlib under gcc.

mkdir b-binutils
cd b-binutils
../binutils/configure --target=TTT --prefix=PPP
make all install
cd ..

export PATH=PPP/bin:$PATH

mkdir b-gcc
cd b-gcc
../gcc/configure --target=TTT --prefix=PPP \
 --with-newlib --enable-languages=c,c++
make all install
cd ..

mkdir b-gdb
cd b-gdb
# add --enable-sim if you want simulator support
../gdb/configure --target=TTT --prefix=PPP
make all install

At that point you should have a toolset if the C++ is
buildable.  The PATH step is important because you
must have a cross assembler in your PATH.

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



--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]