Thanks sjo. Exactly what I was looking for.
I'm trying to get your last method to would, using the attribute.
This is what I did for a test function:
void __attribute__((section(".data"))) IAP_Test( void ) {
U32 N;
N=IOPIN;
} // IAP_Test
When I make I get:
main.o(.text+0x150): In function `main':
/cygdrive/d/GNUARM/Projects/Vader/main.c:96: relocation truncated to
fit: R_ARM_PC24 IAP_Test
collect2: ld returned 1 exit status
D:\GNUARM\bin\make: *** [vader.elf] Error 1
The line #96 in main is where I put the call to IAP_Test(). GCC is
taking the attribute, and seems to be doing something with it, but it
is giving me this relocation error. I don't know what R_ARM_PC24 is.
Do I need to allocate extra space for this in my startup.s file?
Can you give any help on this? This would be great to get working
with this method.
Thanks, Chris.Message
Re: How to declare RAM functions in GCC
2005-01-14 by sig5534
Attachments
- No local attachments were found for this message.