[En-Nut-Discussion] The biggest problem when portting
Harald Kipp
harald.kipp at egnite.de
Tue Jul 22 10:42:34 CEST 2003
Mike,
Thanks for your explanations.
>Because NutOS casts integers (regardless of size) to pointers the easiest
>solution was to use the -mint32 switch and then change all the u_shorts
>which are cast to pointers in NutOS to u_ints (As Harald suggests).
>
>This approach is IMHO the most portable solution, it will certainly work on
>the AVR, H8, ARM and X86 architectures.
I agree.
>One thing for other porters to note is that IPHDR and TCPHDR both make use
>of elements that are less than 1 byte (ip_hl, ip_v, and th_off)
>interestingly because the H8 is big endian GCC treats these constructs
>differently ad gets them is the wrong order.
I experienced similar problems with bit-values in structures
when using ICCAVR. In order to avoid these problems in new
code, I'm trying to use bit masking, shifting etc. For existing
code I'd recommend #if cases in the structure.
>I had no trouble porting the NutOS crt routines, to be honest I can't
>remember making any changes at all (I didn't document any) I think I just
>re-compiled for the H8.
Verfying Tyou's statement was on my list. The only problems
I can imagine might appear in the format code and for sure
in the floating point version.
>- I've deliberatly not ported the old print and device routines Harald has
>marked in the documentation as deprecated.
They will be removed in the portable version, basta.
(OK, if someone disagrees, then port it and send it
to me :-))
>- Compilation was done under window using the latest KPIT_Cummins tool
>chain.
Oops! Is it required? Is it free? Is it available on Linux?
Harald
More information about the En-Nut-Discussion
mailing list