CW10.2, Reserve 0x100 bytes of flash for persistent variables - Do not flash over during reflash

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

CW10.2, Reserve 0x100 bytes of flash for persistent variables - Do not flash over during reflash

Jump to solution
1,110 Views
Cdn_aye
Senior Contributor I

I need to assign 0x100 bytes of flash for persistent variables between re-flashs. Under cw6.3 there was a .prm file to edit that could reserve areas of flash but I can't see this on CW10.2.  Can someone please tell me how to do this in cw10.2?

 

I need to bypass flashing the last 0x100 bytes of flash. RIght now it seems that CW clears all the flash memory. Searching on the topics doesn't yield anything useful. This maybe because I am not using the right search terms.

 

thanks

Labels (1)
0 Kudos
Reply
1 Solution
723 Views
BlackNight
NXP Employee
NXP Employee

Hi Robert,

I think the simplest way is to preserve that area of flash.

http://mcuoneclipse.wordpress.com/2012/04/27/programming-part-of-flash/

describes how you can do this.

As for

"Under cw6.3 there was a .prm file to edit that could reserve areas of flash but I can't see this on CW10.2."

The syntax and prm for S08 in CW10.2 is the same as in 6.3. So whatever you did in 6.3, should be very well doable in 10.2. If not, it would help to post here what you did.

Hope this helps,

Erich

View solution in original post

0 Kudos
Reply
6 Replies
724 Views
BlackNight
NXP Employee
NXP Employee

Hi Robert,

I think the simplest way is to preserve that area of flash.

http://mcuoneclipse.wordpress.com/2012/04/27/programming-part-of-flash/

describes how you can do this.

As for

"Under cw6.3 there was a .prm file to edit that could reserve areas of flash but I can't see this on CW10.2."

The syntax and prm for S08 in CW10.2 is the same as in 6.3. So whatever you did in 6.3, should be very well doable in 10.2. If not, it would help to post here what you did.

Hope this helps,

Erich

0 Kudos
Reply
723 Views
Cdn_aye
Senior Contributor I

Hi Erich

That was an excellent article. I also signed up for the RSS feed on the site. This is one of the best or is the best site I have seen for Eclipse and Freescale support in general. I will spend the next few days going over the content.

Thank you very much.

Regards

Robert

0 Kudos
Reply
723 Views
Nana
Contributor II

Hi,

Depends on the linker that you use to compile for example can be Kinetis, HCS08, PowerPC ! I have used only Kinetis and HCS08 compiler and it was a nightmare to modify the files to fit to my needs.

First in the Post and Pre build you must pot ca command line to call the .exe file that you need with the call parameters. So i don't really understand what you need ! If you use a HCS core you can find the prm file located in project location-> project settings-> Linker Files

0 Kudos
Reply
723 Views
Cdn_aye
Senior Contributor I

Hi again

Thanks for getting back to me.

I am using the kinetis as well; the k20. What a lot of grief, trying to get this to work with MQX!

Are they any examples you can share. I think as you have said, that getting this to work will be a nightmare... like almost all the Kinetis stuff. It might be worth it in the end, but the hardship and expense was not clearly understood on my part at least, and now facing this same thing with the flash that we found with MQX, PE and the BSP issues is going to be hard.

Robert

0 Kudos
Reply
723 Views
Nana
Contributor II

First set the flash programmer to not erase entyre memory on programming.

 

Then in CW10.2 you find the post build option in Project Settings->c/C++ build-> Settings and then select tab Build Steps

There you have to writte the script to call your PRM Pre and Post Build Command and description

 

0 Kudos
Reply
723 Views
Cdn_aye
Senior Contributor I

Hi Nana

 

First of all, thank you for replying and helping on my post.

 

I don't know what to put in the post and pre build script you mentioned. What sort of language is it written in? Do you know of an example I could look at? Can you tell me the operations that the script is supposed to accomplish please? I have no experience in this area.

 

Thank you

 

0 Kudos
Reply