YEH! I think I got it working.
The problem was in my startup.s file. I had turned off a flag before
that left my .data section init routine bypassed. So the data
section was not being init'd and therefore the pointer at 0x40000000
and the code itself at 0x40000004 were actually zeros/junk.
When I turned the .data init back on, the call is working! The
function is in RAM, the ptr is good, and it is running.
So to summarize, to get and use a function in RAM you only need to do
three things:
(1) Have an init in the startup code for the .data section.
(2) Use the __attribute__((section(".data"))) on the functions.
(3) Define function pointer variables for the functions and make
indirect calls using those.
That seems to do it. I'm sure there are other ways too.
Thanks guys. Now off to get my IAP code done.
Chris.Message
Re: How to declare RAM functions in GCC
2005-01-17 by sig5534
Attachments
- No local attachments were found for this message.