unix - Synthetic target CPU

Joel Sherrill <joel@OARcorp.com> joel.sherrill at OARcorp.com
Mon Aug 1 16:37:40 UTC 2005


Steven Johnson wrote:
> Hi,
> 
> Ive currently got an application running on PowerPC with a customised 
> BSP, with RTEMS.  It works great, and has for years. Its currently using 
> RTEMS 4.6.2.  We dont use the Posix API in RTEMS, but the native RTEMS 
> calls for threads, semaphores, etc.
> 
> Now, ive got to make a native Linux version of this application.
> 
> The choices are:
> 1. Change all of the calls to Semaphore/thread calls compatible with 
> Linux, and conditionally build my program. (big job).
> 2. Use this "unix - Synthetic target CPU".
> 
> Is this "unix - Synthetic target CPU" suitable for this?  Is it robust 
> enough for a production application?  

It was originally written for testing RTEMS in the days before CPU
simulators were common.  It was never intended for production use.

It shares as much code with the embedded RTEMS ports as any other
port but I would be cautious considering it -- primarily due to
the inherent limitations/differences which I mention below.

> Does it introduce much overhead?  
> Is it just a wrapper to the native threading/semaphore calls of the OS?

No.  It implements the calls using setjmp/longjmp and fakes interrupts
with signals.

It also uses the native Linux C library and not newlib.  The network
stack in RTEMS is not used at all.

For example, the clock tick is actually implemented using setitimer()
and catching a SIGALRM.

> I still need this program to work on my embedded system, and I wont use 
> the Posix api on RTEMS, cause i need RTEMS to be as small as possible.
> 
> Any information (or pointers to information) anyone can give on the 
> "unix - Synthetic target CPU" would be appreciated.

I would be prone to try it but be aware that there are limitations
which might prevent it from working at all.  If it has enough features, 
then it probably will work fine for you.


> Steven


-- 
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