[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] eZ80 port
From: |
Robert |
Subject: |
[lwip-users] Re: [lwip] eZ80 port |
Date: |
Wed, 08 Jan 2003 23:50:07 -0000 |
On Mon, 16 Dec 2002, Kieran Mansley wrote:
> > I am also curious what, if anything, I should do with my code. I was
> > thinking that a UNIX-style patch file might work for the base package, a
> > full file for cs8900.asm cs8900if.c and cs8900if.h.
>
> Which files do you need to patch? Hopefully if it is just a port then
> all of lwIP should remain unchanged, and you're just adding new
> architecture specific stuff in src/arch.
How I wish it were true....:/ *Most* of what I had to change is in a new
directory: src/arch/eZ80 This includes the following files:
cs8900.asm This adds 3 routines for reading shorts from the cs8900 chip.
cs8900if.c This is the rewritten device driver, based on the sample
driver from Crystal and the code from Leon Woestenberg.
tcplen.c This uses a subroutine to replace a macro
Include files are in: src/arch/eZ80/include/arch
and src/arch/eZ80/include/netif
The rest of the changes (actually tcplen.c is in this category as well)
are to overcome limitations/bugs in the Zilog compiler. There are 4 of
these (with more to come I suspect), each is conditioned on a #define
"EZ80". For example, these lines in tcp_out.c:
#ifdef EZ80
struct pbuf *p2;
#endif
Three lines added at the beginning of tcp_output_segment() to create a
needed variable. And these lines to use that variable:
#ifdef EZ80
p2 = seg->p; // compiler error
len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)p2->payload);
#else
len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload);
#endif
The compiler error in this case was that the expression:
(u8_t *)seg->p->payload)
Was actually compiled as if the following were written:
(u8_t *)seg->p)
**Unless** TCP_OUT_DEBUG was turned on, in which case it compiled
correctly. As you might imagine, it takes many hours to debug each
compiler bug like this. (There are rumors that new compilers, perhaps
better, will be available by January.) In the mean time, I have a project
to complete...:)
--
Best Regards,
Robert Laughlin
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] eZ80 port, David Haas, 2003/01/08
- [lwip-users] Re: [lwip] eZ80 port, Kieran Mansley, 2003/01/09
- [lwip-users] Re: [lwip] eZ80 port, Kieran Mansley, 2003/01/09
- [lwip-users] Re: [lwip] eZ80 port, Kieran Mansley, 2003/01/09
- [lwip-users] Re: [lwip] eZ80 port,
Robert <=
- [lwip-users] Re: [lwip] eZ80 port, Robert, 2003/01/09
- [lwip-users] Re: [lwip] eZ80 port, Kieran Mansley, 2003/01/09
- [lwip-users] Re: [lwip] eZ80 port, Jani Monoses, 2003/01/09