[Top][All Lists]

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

[avr-gcc-list] Locating Assembly Code at a Fixed Address

From: Louis Beaudoin
Subject: [avr-gcc-list] Locating Assembly Code at a Fixed Address
Date: Mon, 7 Apr 2003 12:09:45 -0700

I'm trying to add some assembly code located in the bootloader section to my
project.  I followed the avr-libc's FAQ on how to relocate code to a fixed
address, but the linker just places the assembly code in the middle of the
text section.  If I replace the assembler code with a C function, the code
is placed at the correct address.  Has someone done this before?

Relevent portions of assembler (.S) file:
        .global SpmCommand

        movw    r30, r24        ; First argument is page address

Relevent portions of header file:
void SpmCommand(u_short addr, u_char function) __attribute__ ((section

Relevent portions of linker map file:
Address of section .spmcmd set to 0x1e000
 .text          0x00000f60    0x1e01c assm.o
                0x0001ef60                SpmCommand
.spmcmd         0x0001e000        0x0

Louis Beaudoin

reply via email to

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