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

Matthias Wilde ethernut at stockelache.de
Thu May 15 19:38:56 CEST 2008


Hi Martin,

there is already a define called RAMFUNK that I use for "fast" functions.
I did not check how it is defined, but at least for me it is working.

A couple of days before I Harald added the ramfunc section into linker
script. May be you have to add this to your linker script.
I have the source not with me, but search for an old reply from me and
there is some source.


Best regards


Matthias

>
> 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.
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>


-- 




More information about the En-Nut-Discussion mailing list