saving a variable at fixed flash location


I would like to know if is possible to save a value at fixed flash location in Dynamic C. The idea is to save the size of program code in flash at a fixed address for a routine to calculate a CRC of that code.

Best Regards


this post is really old, but did you get any response on this?
Or did you figure it out yourself?

I am currently stuck with the same problem.


The normal way to do this is to use the User Block and store the info in there. This does of course that the firmware has to write the value to a fixed offset in the user block as opposed to just compiling it so that it sits at a fixed location.

A lot depends on what exactly you need to store and for what purpose.


Ok, thanks.

I am storing a struct which contains settings like IP address, port++.

So I think I’ll give UserBlock a go.