[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] inet_chksum.c misbehaving with compiler optimisation?

From: FreeRTOS Info
Subject: Re: [lwip-users] inet_chksum.c misbehaving with compiler optimisation?
Date: Tue, 22 Nov 2011 20:09:45 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 22/11/2011 19:57, Stephen Cleary wrote:
> I wouldn't rule out the possibility of a timing issue.
> We are (currently) running lwIP 1.3.2 with FreeRTOS 4.8.0, on
> SAM7_GCC (GCC/ARM7_AT91SAM7S) with EMAC code from
> lwip_Demo_Rowley_ARM7.

Wow.  It is on version 7.0.2 now ;o)

> We don't override LWIP_CHKSUM, so the standard (Version #1)
> lwip_standard_chksum from inet_chksum.c is the checksum code we use.
> We normally compile inet_chksum.c with -O1 (even in debug mode, for
> code size reasons), and we don't see the problems you're seeing.

Yes, I am confused by this as the function is not doing anything
remotely suspicious.  I could understand if a function was passing in a
bum pointer value, but the functions passing pointers in are optimised.

I too have used the exact same code, with full optimisation, with other
compilers, even other GCC compilers (MicroBlaze for example) without any
problems.  Your SAM7 will be using ARM and optionally THUMB
instructions, my target is using THUMB2, so even if we were using the
same GCC compiler version the code gen would be different.

I'm minded to ignore the problem for now (it is suckup up time) in the
hope that I can try it with a different compiler version soon.  I need
to know its cause before I can release the projects though.


+ http://www.FreeRTOS.org
Designed for Microcontrollers.
More than 7000 downloads per month.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]