avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] Relocating Code


From: Ramkumar Rengaswamy
Subject: [avr-gcc-list] Relocating Code
Date: Thu, 12 Aug 2004 03:26:54 -0700 (PDT)

Hi,
   I have an application where I am interested in relocating a particular
function to a fixed location in the program memory.
I do this by defining the __attribute__((section(".myfunction"))) in my C
code and passing the option -Wl,--section-start=.myfunction=0x5000
My .text section starts at address 0 and occupies only 4000 bytes.
The code compiles fine but when I call the relocated function with a
pointer parameter, the AVR resets.
Is there any reason for such a behavior ?
In general, are there any constraints for relocating a function in the
program memory ?

Thanks,
-Ram


reply via email to

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