Rtems porting problem

Joel Sherrill joel.sherrill at oarcorp.com
Fri Oct 19 15:15:06 UTC 2007

张天雷 wrote:
> i have add msp430-rtems to my compiler, well, i am using mspgcc, which
> is a compiler for msp430.
> but as my knowledge is quite limited, i don't yet know how to install
> newlib withmy Compiler...
> can u help me a little more ?
That's the root of the problem. RTEMS is mated to newlib for functionality.
The POSIX and libc headers and functions are split between the two.

You will have to build the toolchain from source starting with binutils
and then gcc/newlib.

In binutils, search for msp430 in all the configure.* scripts and make sure
msp430-rtems will pattern match. Often the pattern will be like "CPU-*-*"
so match by default.

For gcc/newlib, you will at least have to edit gcc/configure.gcc to add a
section for msp430-rtems. See the avr-rtems and bfin-rtems for typical
examples of turning a default CPU-elf target into an RTEMS one.

newlib should build OK if it recognizes msp430 in its scripts at all. But it
won't have setjmp/longjmp or anything highly optimized for it.

See http://www.rtems.org/wiki/index.php/RTEMSAda for by-hand instructions
but just build C and avoid Ada. You don't need anything but C with newlib
until you get a functional port.

Keep this on the list because many people can help you with the tools.

> thanks!
> 2007/10/19, Joel Sherrill <joel.sherrill at oarcorp.com
> <mailto:joel.sherrill at oarcorp.com>>:
>     张天雷 wrote:
>     > hi, this is smart from tsinghua university of china.
>     > recently I am porting rtems to msp430, and i had a problem.
>     > when i try to "make", the processing halt when a message appears
>     > libio.h:28:22:sys/stat.h "no such file or directory"
>     > libio.h:29:23:sys/ioctl.h "no such file or directory"
>     >
>     > i cannot find stat.h in /sys,but i can find ioctl.h.
>     > maybe it's because my makefile.am <http://makefile.am>
>     <http://makefile.am>?
>     You have to have a C library installed with the gcc. Did you
>     build newlib and install it with your C compiler?
>     Did you add msp430-rtems as a valid target to the compiler
>     first?
>     > anybody help me.
>     > thanks! :)
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > rtems-users mailing list
>     > rtems-users at rtems.com <mailto:rtems-users at rtems.com>
>     > http://rtems.rtems.org/mailman/listinfo/rtems-users
>     >

More information about the users mailing list