Toolchain advice needed (for nios2 port)

Ralf Corsepius ralf.corsepius at
Mon Dec 5 14:28:23 UTC 2005

On Mon, 2005-12-05 at 15:06 +0100, Waschk,Kolja wrote:
> Hi
> I'm currently looking into porting RTEMS on NIOS II. Obviously the first
> step is to make sure the tools are adequate. I'm unsure if I should try to
> use the nios2-elf tools from Altera as they are, and concentrate on work
> only in RTEMS code, or if modifications to the toolchain itself are
> unavoidable.
> The current 5.1b73 toolchain is based on
>   gcc 3.4.1
>   newlib 1.12
>   binutils 2.15
That's all outdated - All current development is taking place with gcc >
4.0, newlib-CVS and binutils > 2.16.

> First tries with that tools (after I've placed a skeleton for nios2 support
> in RTEMS source tree) promptly yielded problems with missing include files
> (inttypes.h, to be exact, which should have been automatically copied
> (PROVIDED_BY_RTEMS)) when compiling in the cpukit/score subtree,
The problems stems from you using an ancient version of newlib.

>  and the
> stage where linking things becomes possible seems far away.
> If it can't be avoided, are there some "generic" hints how to derive a
> *-rtems toolchain from an existing *-elf toolchain?
If the elf toolchain is functional, it's close to being trivial.

binutils should work OTB without any changes.
newlib should work OTB without any changes.

Porting to GCC in 95% of such cases means extending gcc/config.gcc

>  I'd really like to
> concentrate on the OS code and application, not on the toolchain...
Is this target's toolchain inside of the FSF source tree?

If yes, what I said above applies. 

If not, I'd strongly recommend to have this target's toolchain merged
into the FSF's source tree.


More information about the users mailing list