Load program in flash with offset

Moderator
Bram Dobbelaar wrote:
> Hi Forum,
>
> I am using  Ride GCC and the target is a STR730FV1, with 128K flash in 6
> sectors. I want to use the first sector to store a table and start the
> program from the next sector. Can i change the the start address in the
> linker setting

You can change the start of a memory-section in the linker-script. I
don't know how the RIDE IDE handles this (maybe a linker-script is
generated in the background). But it might not work to just "move" the
memory-origin since at least the reset-vector should be at address 0 in
flash. So it might be easier to use the last sectors in flash for your
table. Or you could add an extra memory section for the vectors which is
placed at page 0 and add a section for the table to be placed at pages
1-x and place the code at page x+1.

Reply

A question of your own? This thread is over 18 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

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.