[En-Nut-Discussion] H8 HTC port

Mike Cornelius mikec at calldirect.com.au
Fri Jul 18 02:04:04 CEST 2003


Hi Tyou,

How's that for a co-incidence, I've just completed porting Nut to the
H8/2322.
Mine is actually running on my hardware right now.

Just thought I'lld let you know you're not alone....

Re your questions :-

1/ The version of heap.c in the mod directory includes improved 'guard'
code.

2a/ The current version of heap.c is not cricical, as you suggest because
Nut/Os is non-preemptive this should not be a problem, the only limitiation
that I can see would be that you must not call the heap functions in
interrupt context (which would be bad practice anyway).

2b/ It's probably not necessary to save all registers during context switch,
Ralph Mason posted a patch to this effect for the AVR a while back, but
without a really good understanding of how the compiler uses the registers
its probably better to be safe than sorry.

Regards,

Mike Cornelius

-----Original Message-----
From: en-nut-discussion-admin at egnite.de
[mailto:en-nut-discussion-admin at egnite.de]On Behalf Of Tyou
Sent: Friday, July 18, 2003 2:10 AM
To: en-nut-discussion at egnite.de
Subject: [En-Nut-Discussion] H8 HTC port


I am portting nut to H8/3069F, by now two threads can be run in hitachi
simulator.
(today I will test the kernal in hardware) thread.c, event.c, heap.c,
nutinit.c
and other some header files has been modified, that means the os kernel has
been ported.
but I have some question.
1. what is the difference of the file heap.c in os folder and the other in
mod
   folder?
2. Since nut is not a preemptive os, is it necessory to make heap codes
critical?
   And further more, in context switching is it necessory to save all the
registers?
_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo/en-nut-discussion




More information about the En-Nut-Discussion mailing list