avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Freaky code wraparound... (UPDATE)


From: Dan Larson
Subject: Re: [avr-gcc-list] Freaky code wraparound... (UPDATE)
Date: Wed, 28 Mar 2001 14:44:49 -0600

On Thu, 29 Mar 2001 06:27:58 +1000, Scott Pitcher wrote:

>Hi Dan,
>
>Your using the Mega103 development board from Atmel? There are plenty 
>of LEDs along the bottom of the board (PORTB?). You don't need ICE to 
>solve your problem - believe me.

Well, thats exactly how I got as far as I did and came to the aforementioned
conclusions about stack corruption / code wrap around. I dumped the stack
pointer in _init_() and found that it had underflowed by one byte. How else
could it reach 0xff8 when the preamble code in main() set it to 0xff7 ?

>We have had all kinds of nasty or 
>weird problems with '103 assembler applications, including stuff like 
>the skip bugs etc.

Other than the errata sheets, is there some place where the bugs which have 
been found are listed? 

>If you checkpoint your code using the LEDs on port 
>B, you should be able to trace the fault almost to the instruction.
>
>You have to be a little smarter without the ice, but you can beat it.

Yes, I agree. But, I fear that I am going to wear out my flash memory
debugging this way!, and I can't find any replacement m103's from Digi-Key
Pioneer Standard, Insight, or anywhere else for that matter!

BTW, Has anyone tried to order the STK-300 daughter boards from Kanda with any 
success? (From the US ?)

>
>Cheers
>
>Scott
>

Thanks for the tips, Scott!

TTYL,

Dan








reply via email to

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