Hello James,
Wednesday, August 01, 2001, 1:42:02 PM, you wrote:
JB> Right, here's a working solution for putting ARM code in WRAM:
JB> Use a simple linker script which looks something like this:
[snip]
nice to see atleast some ppl bother to dig into this stuff ;=)
got two little questions though, never used these options myself (but
you can never know if they could be useful sometime eh? ;))
JB> MEMORY
JB> {
JB> iram (wx) : ORIGIN = 0x3000000, LENGTH = 32K
JB> eram (wx) : ORIGIN = 0x2000000, LENGTH = 256K
JB> rom (rx) : ORIGIN = 0x8000000, LENGTH = 8M
JB> }
whats that (wx) / (rx) attribute ? is that to mark entire memory
regions as read-only or writeable? (and uhm... WHY you do this that
way? wouldnt it be the same if you'd leave those out and take care
about that yourself -in the script- so sections end up where they
belong? will the linker issue warnings/errors if you try to put eg
data section in a memory region marked as read-only?)
JB> .text : AT(0x8000000)
JB> {
JB> *.o(.text)
JB> *(.data)
JB> *(.rodata)
JB> *(.glue_7t)
JB> *(.glue_7)
JB> }
JB> > rom
do i take that right that anything without paranthesis in a
section-definition refers to a file and everything in paranthesis
refers to a section? so
*.o => refers to all object files, regardless what they contain
(or should this be *.o(*) or sth !?)
*.o(.data) => refers to all sections marked as data in all object
files
oh and at last.... why do you put AT(0x08000000) for text-section?
text-section will be the first thing in the final binary anyway =)
--
Best regards,
groepaz mailto:groepaz@...