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

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.