Fwd: Re: [En-Nut-Discussion] PPP/AHDLC logic problems...

Vesa Jääskeläinen chaac at nic.fi
Sun May 8 12:20:04 CEST 2005

Here is a requested forward. Some mailing list problems with OP.

-------- Original Message --------
Subject: Re: [En-Nut-Discussion] PPP/AHDLC logic problems...
Date: Sun, 8 May 2005 11:36:49 +0200
From: Matej Kupljen <matej.kupljen at gmail.com>
Reply-To: Matej Kupljen <matej.kupljen at gmail.com>
To: Vesa Jääskeläinen <chaac at nic.fi>
CC: Ethernut User Chat (English) <en-nut-discussion at egnite.de>


> > I added the code to ahdlcavr.c proposed in the patch, and also the
> > printf("....") on the start of the AhdlcRx thread and on the end of the
> > thread. It seems that the thread starts as soon as you register the
> > device, BUT IT NEVER EXITS!
> For this I would like to ask what compiler you are using :) and what
> optimization settings when compiling Nut/OS & Nut/Net ?
> I noticed that if I used WinAVR 20050214 with optimizations turned on
> (default), it fails to exit PPP mode but if I disable optimizations it
> gets nicely out of it.


Last night (around 03:00 AM) I was debugging the problem, why the
thread won't exit, and now I think I have a tool chain problem :-(

If I add three printf's into the ahdlcavr.c into the case statement, one
before IF statement, one if IF is true and one if IF is false it WORKS!
I can't believe that I have spent 4 days (and nights) just to find out
that it can be compiler problem :-(

Oh, I am using gcc tool chain, which I have build my self.
(There is a great article in one of the Linux journal)
I am using:
binutils - 2.15
gcc - 3.3.5
avr-libc - 1.0.5

Because I don't know the AVR assembler, I can tell if this is a
compiler or assembler bug. I'll try to upgrade the compiler first
and see if things change.


More information about the En-Nut-Discussion mailing list