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?
Solved! Go to Solution.
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!
-----------------------------------------------------------------------------------------------------------------------
Thanks. I am using CW. That document was very helpful.
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
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!
-----------------------------------------------------------------------------------------------------------------------