[En-Nut-Discussion] nut/os unix port preview available

ninni.casula at tiscali.it ninni.casula at tiscali.it
Thu Apr 1 18:45:35 CEST 2004


Please, stop spamming! 

-----Original Message-----
From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Matthias Ringwald
Sent: giovedì 1 aprile 2004 18.01
To: Ethernut User Chat (English); BTnode Development
Subject: [En-Nut-Discussion] nut/os unix port preview available

Hi all.

after some work, I'm happy with the basic nut/os unix simulation.
this means: threads, interrupts are working, some basic uart I/O is
available.
(and the code is good enough to have a look at it)


The Outline:

THREADS: every nut/os thread is simulated by a pthread.
of those, only one is running at a time by using condition variables
to switch from one pthread to the next pthread (when nut/os decides
to that threads has to switch)

IRQ: IRQs are simulated using the SIGUSR1 signal.
critical sections are modelled by blocking this signal.
if there is no critical section of the running thread, the signal
is received by it and gets processed.

to allow for multiple IRQ sources, an extra thread is used that
dispatches occured IRQs to their IRQ handler.

so far, the only interrupt is the RTC interrupt, that simulates
a RTC tick every 1 ms.

UARTs: instead of the avr hw uarts, stdio and native devices can be 
used.


EXAMPLES: with this, the simple, threads, timers and uart example work.

Instructions:
in ./configure, select 4) unix emulation
then build everyting: make

go to one of the working examples in app/ and build it.

to map uart0 and/or uart1 to a specific device
you can use the command line options:
-u0 devName -u1 devName

you can get it at:
http://vs16.ethz.ch/nut-unix-snapshot.zip


so. comments will be welcomed...,
let's see if it will talk to the Bluetooth module soon.

matthias ringwald



_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion





More information about the En-Nut-Discussion mailing list