GCC:Link functions to run from RAM

OP #1535223
Rate this post
useful
not useful
Happy New Year.

I am using the open source tools Eclipse + FreeRTOS + Codesoursery + 
OpenOCD for STR912 CPU and I want to develop a bootloader for this CPU. 
I spent some time reading the manuals of the compiler but I did not 
manage to find answers to the following questions:

1. How can I link a function to an address of the flash that I want. The 
function will run at the loaded address. What are the attributes 
attached to the function and how should I modify the linker script to 
achieve this?

2. I want the code of a function to be stored in flash but to be linked 
to run in a RAM location where it will be moved automatically or not. 
What are the attributes attached to the function and how should I modify 
the linker script to achieve my purpose?

3. How can I redirect the interrupt vector of STR912 in a RAM location.

Can any one help me with these questions?

Stelios

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now