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

ninni.casula at tiscali.it ninni.casula at tiscali.it
Fri Apr 2 15:49:30 CEST 2004


Return-Path: <en-nut-discussion-bounces at egnite.de>
Received: from p15095813.pureserver.info (217.160.92.226) by
mail-mx-3.tiscali.it (7.0.027)
        id 406A905A002BA7CD for ninni.casula at tiscali.it; Thu, 1 Apr 2004
18:04:08 +0200
Received: from p15095813.pureserver.info (localhost.localdomain [127.0.0.1])
	by p15095813.pureserver.info (Postfix) with ESMTP
	id D622A2F42FC; Thu,  1 Apr 2004 18:00:49 +0200 (CEST)
Delivered-To: en-nut-discussion at p15095813.pureserver.info
Received: from tri-e2k.ethz.ch (tri-e2k.ethz.ch [129.132.112.23])
	by p15095813.pureserver.info (Postfix) with ESMTP id 4A27E2F429B
	for <en-nut-discussion at egnite.de>;
	Thu,  1 Apr 2004 18:00:48 +0200 (CEST)
Received: from xfe1.d.ethz.ch ([192.168.36.10]) by tri-e2k.ethz.ch with
	Microsoft SMTPSVC(5.0.2195.6713); Thu, 1 Apr 2004 18:00:48 +0200
Received: from [129.132.13.85] ([129.132.13.85]) by xfe1.d.ethz.ch over TLS
	secured channel with Microsoft SMTPSVC(5.0.2195.6713); 
	Thu, 1 Apr 2004 18:00:47 +0200
Mime-Version: 1.0 (Apple Message framework v613)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <BD59BF31-83F5-11D8-A92E-0003936CA678 at inf.ethz.ch>
Content-Transfer-Encoding: 7bit
From: Matthias Ringwald <mringwal at inf.ethz.ch>
Date: Thu, 1 Apr 2004 18:00:47 +0200
To: Ethernut User Chat (English) <en-nut-discussion at egnite.de>,
	BTnode Development <btnode-development at list.ee.ethz.ch>
X-Mailer: Apple Mail (2.613)
X-OriginalArrivalTime: 01 Apr 2004 16:00:47.0599 (UTC)
	FILETIME=[7F2EC7F0:01C41802]
Cc: 
Subject: [En-Nut-Discussion] nut/os unix port preview available
X-BeenThere: en-nut-discussion at egnite.de
X-Mailman-Version: 2.1.3
Precedence: list
Reply-To: "Ethernut User Chat (English)" <en-nut-discussion at egnite.de>
List-Id: Ethernut User Chat (English) <en-nut-discussion.egnite.de>
List-Unsubscribe:
<http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion>, 
	<mailto:en-nut-discussion-request at egnite.de?subject=unsubscribe>
List-Archive: <http://www.egnite.de/pipermail/en-nut-discussion>
List-Post: <mailto:en-nut-discussion at egnite.de>
List-Help: <mailto:en-nut-discussion-request at egnite.de?subject=help>
List-Subscribe:
<http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion>, 
	<mailto:en-nut-discussion-request at egnite.de?subject=subscribe>
Sender: en-nut-discussion-bounces at egnite.de
Errors-To: en-nut-discussion-bounces at egnite.de
 

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