Dave
Please see
http://www.utasker.com/kinetis/FRDM-KE02Z.html
and
http://www.utasker.com/kinetis/KE_EEPROM.html
You should find all practical details and can load a binary and experiment with reading, writing and deleting EEPROM and other Flash content.
To your specific questions:
1. With IAR one uses
__root const KINETIS_FLASH_CONFIGURATION __flash_config @ ".f_config"
to define that const data needs to be located in a section (KINETIS_FLASH_CONFIGURATION is a struct typedef here but any array can be used).
In the linker script one defines where the address range physically is:
| place at address mem:FlashConfig_start__ | { readonly section .f_config }; |
Since the programmer will not be able to program the EEPROM (it uses different programming commands) and its address is at a high memory location I wouldn't do any initialisation like this - it is simpler to let the application save values to it (or prime it with values on first use).
2. You can write single bytes to this EEPROM but you have to delete always a pair of bytes (short word aligned) as smallest unit.
A chip erase will also erase the EEPROM content so most programming tools are a nuisance since they wipe out the EEPROM data each time a program is loaded - working with a boot loader solves this as noted in the links.
This is not "real" EEPROM since it is Flash and doesn't support changing values (or single bits) without first deleting, but it is pretty close, robust and easy to use.
Note that there is an IAR project in the reference linked to which solves all these details (and includes most other drivers etc. for the KE devices). Its Kinetis simulator also simulates the EEPROM and will warn of any mis-use.
Regards
Mark
http://www.utasker.com/kinetis.html