saving variables in FLASH on M5213EVB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

saving variables in FLASH on M5213EVB

2,709 次查看
airswit
Contributor III
Hi all,

I was wondering if you could help me out. I would like to save operating info/settings in FLASH, so that on the next system startup, these values may be read back in. where is it safe to do so, using CodeWarrior and the EVB? Also, is there any special way to write to it, or can you just write like you would a register?

P.S. I am using C/C++ to program

Thanks,
Trevor
标签 (1)
0 项奖励
回复
1 回复

1,138 次查看
mpeters
Contributor I
Trevor,

You can write your code for flash the same way you would write your code if you were going to run it from SRAM. Your C/C++ code won't be any different in terms of setting registers, routines, etc. The difference between the two is that you need to make sure you build the correct target (in CodeWarrior). In other words, write your code and make sure that when you make/build/compile your code, you are doing so for the "Flash" target.

Once you've compiled your code, and the .s19 file has been created, you will need to program this .s19 file in to the flash. The easiest way to do this is with CF Flasher. You can download CF Flasher from the MCF5213 Product Summary Page. Here is the link:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MCF5213&nodeId=0162468rH3YTLC00M91436

Regard,
mp
0 项奖励
回复