AnsweredAssumed Answered

MKL17Z - How to initialize user flash data at compile time

Question asked by on Jan 11, 2016
Latest reply on Jan 13, 2016 by

Hi all,


I'm using MKL17Z256VFM4 with KDS 3.0.0. I would like to know if there is a way to put default values in the flash user block at compile time.

For understanding, I would like to do like I do with CodeWarrior 6.x with the "@" directive, for example:


const uint EEDefault[2] @ 0xE000 = {





In this way I'm sure that after downloaded the executable, in the address 0xE000 I have the value 0x0001, and so on.


Is it possibile to do stuff like this with KDS and MKL17Z in similar way? I know it's not possibile with MKE02Z, but these two micro are quite different, so maybe there is a way with MKL17Z?

It would be good, so I dont need to make my own init-flash for every project.


Thanks in advance!