Limiting program RAM addresses
sarraciro
sarraciro at yahoo.it
Sun Dec 1 14:10:39 UTC 2013
Assuming that you want run a function in specific RAM sector....
You should modify the linker script.... Adding an output section in
which the input sections work only in the memory region needed.
.TestFunction 0x08055554 :
{
*(prgm_mem)
} >RAM
I think also that there are several way to reach this goal. Another way,
probably, could be declare in the linker script a dedicated memory
region in which origin and size are known.
In this case you have to use MEMORY command like this
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
MPrivateArea(xrw) : ORIGIN = valid RAM address, LENGTH = size in
byte (or suffix use)
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
}
and the output section for the new memory layout:
TestFunction 0x08055554 :
{
*(prgm_mem)
} >mprivatearea
Note that access directly to memory resource have its rules and the
interaction between the linker script and sources (.s or .C or C++ <-
Bad idea imho) must be defined with clear names space, attribute and
variables...
I hope this notes will usefull for your considerations.
Regards
--
RC
Il giorno ven, 29/11/2013 alle 09.44 +0100, Sebastian Huber ha scritto:
> On 2013-11-29 09:39, Mohammed Khoory wrote:
> > I've registered a ramdisk driver to use the range between
> > 0x40200000 - 0x40800000.
>
> How did you do this?
>
More information about the users
mailing list