public inbox for
 help / color / mirror / Atom feed
* ROMRAM .. kind of
@ 2012-02-21 21:08 Stanislav Meduna
       [not found] ` <>
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Meduna @ 2012-02-21 21:08 UTC (permalink / raw)
  To: ecos-devel


I want to be able to update the RedBoot from RedBoot. So
I need to copy a short code from RedBoot away into RAM,
disable interrupts and run it to flash the new RedBoot,
then do a verify and reboot to the new one.

That code has to be linked with offsets in RAM, but needs
to be stored in flash.

Unfortunately I am not really a guru in GNU ld and its scripts.
Is there any example on how to link a code for one address
and direct the section somewhere else in the final image?

I've looked up some ROMRAM setups but they look such that
the code up to the RAM copy is position independent and initially
simply runs from an 'incorrect' address, which does not
really help me much.

In the case it matters I need to do this for a Cortex-M3.

Maybe my flash code can be made position independent too
and I can also think of some script magic to assemble the
flash image, but I would of course prefer to do this in
the ld script way if possible.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] Re: ROMRAM .. kind of
       [not found] ` <>
@ 2012-02-23 21:24   ` Stanislav Meduna
  0 siblings, 0 replies; 2+ messages in thread
From: Stanislav Meduna @ 2012-02-23 21:24 UTC (permalink / raw)
  To: ecos-devel

On 22.02.2012 06:33, Elad Yosef wrote:

> You can look at the ecos tables.
> The Tables macros assigned section attribute and the linker script
> keeps them all in the section.

I know how to direct code or data into a section. I don't know
how to link it for the address somewhere else, such that
I compile a code for a section starting at e.g. 0x20000000,
but store it somewhere in .rodata or something.

But thanks for the pointer anyway, it gave me a hint what to google
for in the linker documentation ;) Looks that the AT could be what
I am searching for:

contains an example of exactly what I want.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-23 21:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-21 21:08 ROMRAM .. kind of Stanislav Meduna
     [not found] ` <>
2012-02-23 21:24   ` [ECOS] " Stanislav Meduna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).