From: Jesper Skov <jskov@redhat.com>
To: "Simpkins, Andy" <Andy.Simpkins@Transcomm.uk.com>
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] running code from RAM / Memory Regions
Date: Fri, 17 Aug 2001 02:57:00 -0000 [thread overview]
Message-ID: <othev7ovoh.fsf@zoftcorp.adsl.dk> (raw)
In-Reply-To: <919A3A7F776FD311AFD600508B44A7F301795827@ramhqlon.transcomm.uk.com>
>>>>> "Simpkins," == Simpkins, Andy <Andy.Simpkins@Transcomm.uk.com> writes:
Simpkins,> Am I approaching this the write way? Are there any
Simpkins,> pitfalls I should watch out for? Has this already been
Simpkins,> done (obviously it has) but is the code available?
Simply mark the function to be located in .2ram and it will
automagically do the right thing:
void flash_query(void* data) __attribute__ ((section (".2ram.flash_query")));
That is, assuming you are using eCos from CVS. Otherwise you'll need
to hack the arm.ld file so it contains a .data rule like this:
#define SECTION_data(_region_, _vma_, _lma_) \
.data _vma_ : _lma_ \
{ __ram_data_start = ABSOLUTE (.); *(.data*) *(.data1) MERGE_IN_RODATA \
_GOT1_START_ = ABSOLUTE (.); *(.got1) _GOT1_END_ = ABSOLUTE (.); \
_GOT2_START_ = ABSOLUTE (.); *(.got2) _GOT2_END_ = ABSOLUTE (.); \
. = ALIGN (4); \
KEEP(*( SORT (.ecos.table.*))) ; \
. = ALIGN (4); \
__CTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.ctors*))) __CTOR_END__ = ABSOLUTE (.); \
__DTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.dtors*))) __DTOR_END__ = ABSOLUTE (.); \
*(.dynamic) *(.sdata*) *(.sbss*) \
. = ALIGN (4); *(.2ram.*) } \
> _region_ \
__rom_data_start = LOADADDR (.data); \
__ram_data_end = .; PROVIDE (__ram_data_end = .); _edata = .; PROVIDE (edata = .); \
PROVIDE (__rom_data_end = LOADADDR (.data) + SIZEOF(.data));
Cheers,
Jesper
next prev parent reply other threads:[~2001-08-17 2:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-17 2:29 Simpkins, Andy
2001-08-17 2:57 ` Jesper Skov [this message]
2001-08-17 2:50 Simpkins, Andy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=othev7ovoh.fsf@zoftcorp.adsl.dk \
--to=jskov@redhat.com \
--cc=Andy.Simpkins@Transcomm.uk.com \
--cc=ecos-discuss@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).