SV: [Icc-avr] Stack problems

Johan Wallström johan at edab.nu
Fri Aug 15 04:36:07 PDT 2008


Didn't it just crash before you got a chance to call the stack check 
function?

Bengt Ragnemalm skrev:
> Sorry, this was of course the same reason that before, the big local array.
> After changing into one global this problem disappeared. But maybe someone
> could describe this a little so I understand what happened? The stack
> checking bytes was not overwritten.
>
> /Bengt
>
>   
>> -----Ursprungligt meddelande-----
>> Från: icc-avr-bounces at imagecraft.com [mailto:icc-avr-
>> bounces at imagecraft.com] För Bengt Ragnemalm
>> Skickat: den 15 augusti 2008 13:03
>> Till: benra at imt.liu.se; 'Discussion list for ICCAVR and ICCtiny Users. You
>> do NOT needtosubscribeto icc-announce if you are a member of this.'
>> Ämne: [Icc-avr] Stack problems
>>
>> I am beginning to get a hold on my problems now. Of course it was several
>> problems as it usual are if you don't find the error quickly. First I have
>> increased the hardware stack to 20 as it was overflowing. But know I have
>> noticed that at entering a timer overflow interrupt, the interrupt routine
>> is writing in my registers.
>>
>> Here is the first line, copied from Studio so you can see C and assembler:
>> @0000080E: SampleRateTimerOverflowInt
>> 329:      void SampleRateTimerOverflowInt(void)
>> +0000080E:   D48F        RCALL   PC+0x0490        Relative call subroutine
>>
>> The RCALL goes here:
>> +00000C9E:   920A        ST      -Y,R0            Store indirect and
>> predecrement
>> +00000C9F:   921A        ST      -Y,R1            Store indirect and
>> predecrement
>> +00000CA0:   922A        ST      -Y,R2            Store indirect and
>> predecrement
>> +00000CA1:   923A        ST      -Y,R3            Store indirect and
>> predecrement
>> +00000CA2:   924A        ST      -Y,R4            Store indirect and
>> predecrement
>> +00000CA3:   925A        ST      -Y,R5            Store indirect and
>> predecrement
>> +00000CA4:   926A        ST      -Y,R6            Store indirect and
>> predecrement
>> +00000CA5:   927A        ST      -Y,R7            Store indirect and
>> predecrement
>> +00000CA6:   928A        ST      -Y,R8            Store indirect and
>> predecrement
>> +00000CA7:   929A        ST      -Y,R9            Store indirect and
>> predecrement
>> +00000CA8:   930A        ST      -Y,R16           Store indirect and
>> predecrement
>> +00000CA9:   931A        ST      -Y,R17           Store indirect and
>> predecrement
>> +00000CAA:   932A        ST      -Y,R18           Store indirect and
>> predecrement
>> +00000CAB:   933A        ST      -Y,R19           Store indirect and
>> predecrement
>> +00000CAC:   938A        ST      -Y,R24           Store indirect and
>> predecrement
>> +00000CAD:   939A        ST      -Y,R25           Store indirect and
>> predecrement
>> +00000CAE:   93AA        ST      -Y,R26           Store indirect and
>> predecrement
>> +00000CAF:   93BA        ST      -Y,R27           Store indirect and
>> predecrement
>> +00000CB0:   93EA        ST      -Y,R30           Store indirect and
>> predecrement
>> +00000CB1:   93FA        ST      -Y,R31           Store indirect and
>> predecrement
>> +00000CB2:   B60F        IN      R0,0x3F          In from I/O location
>> +00000CB3:   920A        ST      -Y,R0            Store indirect and
>> predecrement
>> +00000CB4:   9508        RET                      Subroutine return
>>
>> The subroutine is obviously saving all registers. The question is there? Y
>> is 0xBE, counting down for each save. And yes, 0xBE are right into my
>> registers.
>>
>> What should I look for to solve this?
>>
>> /Bengt
>>
>>
>> _______________________________________________
>> Icc-avr mailing list
>> Icc-avr at imagecraft.com
>> http://dragonsgate.net/mailman/listinfo/icc-avr
>>     
>
>
> _______________________________________________
> Icc-avr mailing list
> Icc-avr at imagecraft.com
> http://dragonsgate.net/mailman/listinfo/icc-avr
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.138 / Virus Database: 270.6.3/1612 - Release Date: 2008-08-14 18:03
>
>
>
>   



More information about the Icc-avr mailing list