How to store value in internal flash

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

How to store value in internal flash

1,613 Views
yadhukrishnanvm
Contributor III

Hi,

      I am using CW 10.7. I need to store data in the internal flash. I am using FRDM-KL25Z128, I tried to do it as per this link :Store a variable in ROM/FLASH . But it didn't give me the expected result. I created a bareboard project of FRDM-KL25Z128. Please anybody help on this

Thanks,

         Yadu

Labels (1)
0 Kudos
7 Replies

1,175 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Yadu,

On CW v10.7, the const data is stored in flash :

pastedImage_1.png

You also can checked it on the .map file :

pastedImage_2.png

If your project is not , you can send your project to me.

Hope it helps


Have a great day,
Alice Yang

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

1,175 Views
yadhukrishnanvm
Contributor III

Hi,

   I have another problem in storing the value. I am storing a audio hex file as const uint16_t. But I couldn't store more than 5kb, it overflows when I did that or got to PE_DEBUGHAULT function. I am using frdm-kl25z, it has 128kb flash then why can't I store atleast 64kb value in it. please help... 

0 Kudos

1,175 Views
stanish
NXP Employee
NXP Employee

Hi,

I've just tried to build the project with such a constant and at works fine on my side. Constant is allocated in FLASH and there is no overlap:

pastedImage_2.png

Stan

0 Kudos

1,175 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

In your project not only the hex file saved in flash, you can check the .map file about

the actual memory used . Or you can also send your project to me , I help you check it.

BR

Alice

0 Kudos

1,175 Views
yadhukrishnanvm
Contributor III

I am sorry to say, I don't know how to attach my project. Could you please tell me how to? :smileyhappy:

0 Kudos

1,175 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

- About how to attach project :

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

BR

Alice

0 Kudos

1,175 Views
yadhukrishnanvm
Contributor III

Hi   Alice_Yang‌ ,

                                Thank you very much for the reply. I forgot to declare the  const char myArray[] = "Hello World"  globally that is why I didn't got the expected output. Anyway thank you very much :smileyhappy:

0 Kudos