This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/44940] New: XMEGA RAMPZ Initialization


When compiling a bootloader for the XMEGA128 (starting address 0x20000), RAMPZ
is initialized to 2 in the __do_copy_data section.  This has the effect that
any indirect register access will fail.

 For example the following code extract will result in the register NOT being
set to 0xCB when RAMPZ = 2.

    20c6e:     2b ec           ldi     r18, 0xCB       ; 203
    20c70:     e0 e5           ldi     r30, 0x50       ; 80
    20c72:     f0 e0           ldi     r31, 0x00       ; 0
    20c74:     22 83           std     Z+2, r18        ; 0x02

To recreate this, simply put OSC.XOSCCTRL = 0xCB; in the main function and link
to bootloader memory space.


-- 
           Summary: XMEGA RAMPZ Initialization
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: darkdragon2000 at hotmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44940


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]