[En-Nut-Discussion] Bug in Nut Init?

Harald Kipp harald.kipp at egnite.de
Tue Apr 1 08:50:12 CEST 2003


Ralph,

you are perfectly right. Thanks.

Harald

At 07:15 01.04.2003 +1200, you wrote:
>I noticed a bug in the NutInit function
>
>register volatile u_char * xramend = ((volatile u_char *)0x7FFF);
>
>Doesn't work unless you have some optimisation turned on, because it saves
>xramend in a non existent stackframe. (As one should not allocate variables
>in naked functions - register or otherwise )
>
>Changing the line to
>
>#define xramend ((volatile u_char *)0x7FFF)
>
>Creates exactly the same code as the above (when it works) but works both
>optimised and unoptimised.
>
>Ralph




More information about the En-Nut-Discussion mailing list