bugAVR C Runtime Library - Bugs: bug #22667, AT90PWM3B, AT90PWM316 stack...

 
 

bug #22667: AT90PWM3B, AT90PWM316 stack pointer initialization error

Submitted by:  Tero Sinervo <tvjsin>
Submitted on:  Wed 19 Mar 2008 03:17:09 PM UTC  
 
Category: LibrarySeverity: 3 - Normal
Priority: 5 - NormalItem Group: Startup code
Status: DuplicatePercent Complete: 0%
Assigned to: Joerg Wunsch <joerg_wunsch>Open/Closed: Closed
Release: NoneFixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 19 Mar 2008 06:15:25 PM UTC, comment #2:

You're correct. That seems to be the source of the problem.

Tero Sinervo <tvjsin>
Wed 19 Mar 2008 03:27:53 PM UTC, comment #1:

Looks like just another consequence of the bug that caused
bug #22153 and bug #22415. The disassembly of crt90pwm3b.o
in the current code has

Disassembly of section .init2:

                1. <.init2>:

0: 11 24 eor r1, r1
2: 1f be out 0x3f, r1 ; 63
4: c0 e0 ldi r28, 0x00 ; 0
4: R_AVR_LO8_LDI __stack
6: d0 e0 ldi r29, 0x00 ; 0
6: R_AVR_HI8_LDI __stack
8: de bf out 0x3e, r29 ; 62
a: cd bf out 0x3d, r28 ; 61

which looks reasonable to me.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Wed 19 Mar 2008 03:17:09 PM UTC, original submission:

The startup code generated for AT90PWM3B, AT90PWM316 and possibly others does not initialize the SPH register.

SPL is initialized to 0xFF, placing the beginning of stack to the end of extended IO space. SPH should be initialized to 0x02 (RAMEND is 0x2FF) but no code seems to be doing that.

Tero Sinervo <tvjsin>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by tvjsin (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 19 Mar 2008 03:27:53 PM UTCjoerg_wunschStatusNone=>Duplicate
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1