newlib and Lucent 1600

Joel Sherrill joel.sherrill at OARcorp.com
Tue Jul 25 15:24:20 UTC 2000


Ahmet Akkas wrote:
> 
> Hello Joel,
> 
> I am porting RTEMS to Lucent's 16000 DSP processor by using Lucent's tools
> (compiler, assembler, etc.). I wrote the cpu dependent part and I want to
> build RTEMS kernel using bare bsp option.

I remember.  I am actively merging the TI C3x/C4x port now to give you 
a DSP port example.  I just ran hello and ticker. :)
 
> At this point, to able to build RTEMS I have two options and I need your
> suggestions. Options are:
> 
>         i)  I can use newlib library which has processor dependent part.
>         ii) I can use Lucent's libc library which has minor diffrences from
>         the GNU libc library (you also provided patches to the GNU libc so
>         there will be some differences between the Lucent's library and
>         the newlib library provided by you).
>
> Right now I am not sure which option to take it. The processor dependent part
> in the newlib library does not seem complicated and I am not sure if RTEMS
> needs that processor dependent part. In the case, if I use Lucent's library and
> then later when you have modofications (improvements) over the newlib library,
> it may be difficult for us to update the Lucent's library. Please let me know
> what you think about it.

Newlib+RTEMS has a number of advantages over the Lucent library for
non-FP stuff.
newlib+rtems will have very full POSIX support.  If you pour over the
newlib code,
you will notice that RTEMS enables much of its support.  I doubt the
Lucent
library has all of the POSIX functions newlib does since most embedded
libraries
don't.  If you want this level of support on the Lucent library, you
will have 
to have source for it and hack some.  Otherwise, it will not integrate
as 
nicely with RTEMS.  This creates maintenance issues on the Lucent
library on top
of the being out of sync with newlib/RTEMS changes.

I do not know about the Lucent processor and floating model so I can't
say whether
or not porting newlib's libm will be problemmatic.  The TI DSPs are not
IEEE-FP
and although it works, there are still some issues being debugged. 
Using the
Lucent libm.a may be a better option short term.

The newlib machine dependent code only has to be setjmp/longjmp.  The
rest can
default to C routines.  

Look at http://dsp.linuxave.net for the current TI C3x/C4x DSP
information.  There
is a link to Michael Hayes site and he has patches for development
snapshots.
 
> My second question is based on the first one. In the case, if I want to use
> newlib library provided by you, what will be the process I should follow to able
> to build newlib library alone. In the bit script, gcc cross compiler and newlib
> are built together (first gcc and then newlib). So I really appreciate if you
> can tell me what should I do to able to build only newlib library using Lucent's
> compiler.

I do not know the invocation model of the Lucent tools but if you write 
scripts to make them look like the GNU tools for basic operations, then
life 
will probably be easier with the configure scripts.  

For sure you need to be able to do things like:

  gcc -c  (to compile most files)
  gcc     (to link a main(){} without errors.  Needed to pass RTEMS
configure)
  ar rv   (not sure on options but needed to build libraries)
  ld -r   ( relocatables that can be relinked)
  make-exe rule ... see tree for example

If you are on UNIX or Cygwin with the tools, then the native tool tests
will
pass the configure tests.  Having script wrappers for the tools will
also 
make it easier to build other add-ons.

Given an installed normal GNU cross toolset, you configure something
like this:

tar xzf newlib-XXX.tgz
mkdir build
cd build
../newlib-XXX/configure --target=CPU-rtems --prefix=INSTALL_POINT
make 
make install

 

> I did not send this mail to rtems user group but feel free to post it with
> your answer if you want.

OK.  For general information, I will post it back.

> Thanks a lot.
> 
> Ahmet Akkas

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



More information about the users mailing list