Greetings,

I agree it looks very much like this. But...
- I have the interrupts disabled before the call to the subroutine
located in the bls section
- the stack pointer, right before the call, still points to the top of
the internal ram (0x10ff on the mega644), while the _end symbol is very
low (0x1b7), which leaves almost all of ram to the stack.

And once again, if I leave this routine in the .text section, the
unexpected resets suddenly disappear.

Pat


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Joerg Wunsch
Sent: August 22, 2007 5:38 PM
To: [email protected]
Cc: Patrick Mahoney
Subject: Re: [avr-libc-dev] Problem writing to flash - atmega644

As Patrick Mahoney wrote:

> It might not be an actual reset because all bits in the MCUSR register
> are cleared. So it could be a jmp to address 0, but it doesn't make
more
> sense... Again, the sims run perfectly...

Smells like either a problem with the stack initialization, or you've
enabled an interrupt source that has no ISR assigned.
-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev


_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to