storing value to fixed address

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

storing value to fixed address

跳至解决方案
1,559 次查看
rmaier
Contributor III

Hello,

I am using a KEA64 type MCU. I am trying to figure out how to save a value to a fixed flash location.

The end goal is to start with calibration values that could change in the future (via UART command). A 512 byte sector is allocated for these calibration values. If the cal is changed, the sector is overwritten with new values. I want to define exactly where each parameter is stored so that I can properly rewrite the calibration values.

Any help or tips for a newcomer to Kinetis MCUs would be greatly appreciated?

标签 (1)
0 项奖励
回复
1 解答
1,366 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Robert,

Which IDE do you used ?

If you use CodeWarrior or KDS,  please refer to :

Relocating Code and Data Using the CW GCC Linker File for Kinetis 

Relocating Code and Data Using the KDS GCC Linker File for Kinetis 

Hope it helps


Have a great day,
TIC

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

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,366 次查看
rmaier
Contributor III

Thanks. I am using CW. That document was very helpful.

0 项奖励
回复
1,366 次查看
mjbcswitzerland
Specialist V

Hi

For a ready made solution see the Open Source uTasker project which includes KEA64 for KDS, CW, IAR, Keil, etc.
It has a parameter system as described here: http://www.utasker.com/docs/uTasker/uTaskerFileSystem_3.PDF
which allows fail safe operation of parameter storage.
It doesn't need any linker script file manipulation to work (and so it fuly portable and less messy).

It also has a developer's interface which allows experimenting with internal memory as shown in the video:
https://www.youtube.com/watch?v=Pe9A8qsefzQ&list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q&index=12

It emulates Flash in its KEA64 simulator which allows complete testing and warns you of any incorrect configuration or usage.

Available on GITHUB at:
Web:      https://github.com/uTasker/uTasker-Kinetis
HTTPS:    https://github.com/uTasker/uTasker-Kinetis.git
SSH:      git@github.com:uTasker/uTasker-Kinetis.git

Regards

Mark

0 项奖励
回复
1,367 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Robert,

Which IDE do you used ?

If you use CodeWarrior or KDS,  please refer to :

Relocating Code and Data Using the CW GCC Linker File for Kinetis 

Relocating Code and Data Using the KDS GCC Linker File for Kinetis 

Hope it helps


Have a great day,
TIC

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

0 项奖励
回复