Hi,
I want to write a value in a particular location of flash say address x in flash).
The situation is: already a software exists in the flash. This software reads location 'x' and takes some descision. My idea is to update only this location x through some means so that i can change behaviour of software without disturbing other locations in flash.
Below is the code in a .c file. The project has no other files other than this .c file and has no other code than shown below:
#pragma DATA_SECTION(LocationX,"LocationXInFlashB");
const unsigned int LocationX= 0x05;
I changed the linker command file to reserve a location out of flash B sector with name: LocationXInFlashB
Project is set for --> No auto initialization mode so that linker does not complain for NOT having a main routine.
With this i'm able to get a .out file.
But when i try to flash this .out file i get a error "No sections were found that map to flash"
Please help me in resolving this issue!
Also, I this a good method to write a particular location in flash?
If not what other methods can be used?