[En-Nut-Discussion] re location truncated to fit: R_ARM_PC24 against symbol

ml mludwig at adc-elektronik.de
Thu May 15 19:28:32 CEST 2008


Hi,

i try to make my code (ARM AT91) running in Flash. Because i use the flash
even for data storing i use the RAMFUNC attribute and the new linkerscript
for that.

GNU C version 4.1.0 (arm-elf)  

#define FASTRUN __attribute__ ((long_call, section (".ramfunc")))

typedef volatile unsigned short * flashptr_t;
flashptr_t FLASHBASE = (flashptr_t)0x10000000;


FASTRUN void _FlashEraseComplete(void) 
{
    NutEnterCritical();
    FLASHBASE[0x555] = 0xAA;
    FLASHBASE[0xAAA] = 0x55;
    FLASHBASE[0x555] = 0x80;
    FLASHBASE[0x555] = 0xAA;
    FLASHBASE[0xAAA] = 0x55;
    FLASHBASE[0x555] = 0x10; 
    NutExitCritical();            
}

This code doesn´t compile and ld shows the above error.  when i delete the
lines with FLASHBASE.. it compiles. 
Any hint for me. Tried many like -mlong-calls, #pragma long-calls etc.
nothing helps

thanks martin 
-- 
View this message in context: http://www.nabble.com/relocation-truncated-to-fit%3A-R_ARM_PC24-against-symbol-tp17258465p17258465.html
Sent from the MicroControllers - Ethernut mailing list archive at Nabble.com.




More information about the En-Nut-Discussion mailing list