How to Reserve a section of memory in Linker?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Reserve a section of memory in Linker?

3,701 Views
vigneshbalaji
Senior Contributor I

Hi,

     I want to reserve memory for my data in Flash basically I want to store non-volatile data. How to do it?

I am planninng to reserve a section of memory so it is not used by the linker at link time.I want to know how to do this with CodeWarrior???

Labels (1)
8 Replies

2,665 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

You can define one flash memory by yourself in the linker file , then relocate  the data to the memory part.

You can check the DOC i send you in your another question with  the DOC i attached to do this .

Hope it helps


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,664 Views
vigneshbalaji
Senior Contributor I

Hi,

     I want to know why are the memory segments discontinuous in KEA-128???

MEMORY

{

  m_interrupts (rx) : ORIGIN = 0x00000000, LENGTH = 0xC0

  m_cfmprotrom (rx) : ORIGIN = 0x00000400, LENGTH = 0x10

  m_text (rx) : ORIGIN = 0x00000800, LENGTH = 128K - 0x800

  m_data   (rwx) : ORIGIN = 0x1FFFF000, LENGTH = 16K /* SRAM */

}

If I add the origin and Length then I am not able to get the the start address of the next segment???

Why is this this way???

what is the reason behind this???

0 Kudos

2,664 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello VIGNESH,

The core of the KEA series chip is  cortex-M0+, the size of 0xC0 can meet

the vector tables , of course you can change it to ox400.

You can refer to your request to change it , the DOC i send to you also

take example for change the linker file .

2,664 Views
vigneshbalaji
Senior Contributor I

Hi,

    I have splitted the text segment in KEA-128.I want to know whether it is right or not.Please Look at my project.

This is my text division.Please take a look at it and tell me whether I have divided it right or not as per KEA-128.I am confused about the start address of my_text.Is it right???

MEMORY

{

  m_interrupts (rx) : ORIGIN = 0x00000000, LENGTH = 0xC0

  m_cfmprotrom  (rx) : ORIGIN = 0x00000400, LENGTH = 0x10

  m_text  (rx) : ORIGIN = 0x00000800, LENGTH = 128K - 0x800

  my_text      (rx) : ORIGIN = 0x0001EC00, LENGTH = 0x1000              /*New ROM segment*/

  m_data    (rwx) : ORIGIN = 0x1FFFF000, LENGTH = 16K /* SRAM */

}

I want to know whether this is right or not.

0 Kudos

2,664 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello VIGNESH,

It is wrong.

The two part  "m_text" and "my_text"overlapping , they can not overlap.

You can change it to :

m_text  (rx) : ORIGIN = 0x00000800, LENGTH = 0x0001EC00 - 0x800;

Hope it helps

Alice

2,664 Views
vigneshbalaji
Senior Contributor I

I want to understand how the size 0xC0 can meet the vector table???

Please give me a clear view,I am confused.

If you can provide me screenshots of the things you say it will help in understanding :smileyhappy:

0 Kudos

2,664 Views
vigneshbalaji
Senior Contributor I

Hi,

     Can you attach the other doc in the same thread???

Waas that other doc AN4498???

0 Kudos

2,665 Views
vigneshbalaji
Senior Contributor I

Hi,

    What is what is Flash backdoor key  segment in memory?

0 Kudos