|
Read-Only
Author Luca S
Posted 16-Mar-2009 11:32 GMT
Toolset ARM
|
 LPC2478 RAM areas' usage,scatter-loading file, vars placement
Luca S
Hi all,
we have just started getting deeper into LPC2478's memory map and
related uVision 3.4 usage. We are trying to use scatter-loading files
to define, besides the 64k SRAM, LPC's USB and Ethernet memory
regions so to eventually decide to use them as general-purpose RAM.
Doing this, we are facing a coupla problems, hoping someone out there
can help us understanding. This is our C code trying to do the job
:
// Place Vect1 at the beginning of RAM
Byte Vect1[128] __attribute__((section(".ARM.__at_0x40000120")));
// Place Vect2 at the beginning of USB RAM
Byte Vect2[128] __attribute__((section(".ARM.__at_0x7FD00100")));
// Place SumVect at the beginning of Ethernet RAM
int SumVect[128] __attribute__((section(".ARM.__at_0x7FE00100")));
Writing this, we get the error message "L6971E : Section
.ARM.__at_0x40000120 from object main.o with type RW incompatible
with section HEAP from object LPC2400.o with type ZI in er RW_IRAM1".
Should we have defined the same 128 bytes' array "__at 0x40000000"
everything works fine. We think the address we have specified is
correctly aligned and we really cannot see any reason why. We also
tried to find a way to differently locate the HEAP (as well as the
STACK that is mentioned somehow in different compilations), in a
scatter-loading file without success.
Then comes the second issue : trying to store a vector in the
Ethernet RAM, once more not at the very physical beginning of the
memory itself, the target is correctly created, but once in the
debugging session everything stops with the message "Error 65: access
violation at 0x7FE00000 : no 'write' permission".
What above happens with the scatter-loading file either in its
"default" configuration (just FLASH and SRAM defined) as well as
defining the two additional 16Ks' wide RAM areas at 0x7FE00000 and
0x7FD00000. On the other side, we can surprisingly use the USB RAM
without problems at any address.
We are really newbies on such deep aspects of the LPC, so we ask your
patience....
Thanks in advance for any help or hint anyone would post to help us
understanding.
|