Hi,
I found in the MQX 4.1.1 linker the following definition:
MEMORY
{
vectorrom (RX): ORIGIN = 0x00000000, LENGTH = 0x00000400
cfmprotrom (R): ORIGIN = 0x00000400, LENGTH = 0x00000020
rom (RX): ORIGIN = 0x00000420, LENGTH = 0x000FFBE0 /* Code + Const data */
ram (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00040000 /* SRAM - RW data */
...
}
In KDS 1.1.0 is the definition:
MEMORY
{
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x000FFBF0
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000
}
Is the KDS linker file the better definition, because the K64 SRAM is twofolded in a 64kb RAM and a 192KB RAM? What exactly is not allowed at the border of the two RAM areas?
Best Regards
Hello Andreas Schmidt:
For K64 the size of the RAM is different between K64FN1M0 and K64FX512:
You are right that the linker file of KDS is a more accurate definition of the RAM partitions. There is no problem on joining both RAM spaces in only one, as long as you make sure that no memory object is allocated crossing the 0x2000_0000 boundary, because the access would cause a hardfault.
The exception to this rule would be an object that actually crosses that border, but the access is to either the SRAM_L or SRAM_U parts of the object, but not a combination of both, I hope I am clear with this.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jorge,
I want to have a heap memory size more than 0xFFFF on MK64FN1M0VLL12 but it seams not possible? Processor expert CPU block doesn't permit to do this and is I write statup file stand alone the result on runtime is equal : I have 64K of heap.
If this is not possible :
+ why there is this limitation? where I can find it on manuals?
+ there is a walkaround?
Thanks
Michele
Michele
Restrictions are detailed in sections 3.5.3.1 and 3.5.3.3 of the K64's user's maual.
More discussions at http://mcuoneclipse.com/2013/07/10/freertos-heap-with-segmented-kinetis-k-sram/
You can use your own linker script file if needed.
Regards
Mark
Hello Jorge,
yes, your are clear. How will it be with programs that run in RAM? I assume an assembler instruction should not cross the gap?
Will the Freescale team update the linker scripts for MQX 4.2?
Best Regards