Post Go back to editing

Store a variable in Flash

Hello

I am working on a project which requires some variables to be retained i.e. the value should not changed even after I switch off the system. I thought of storing such variable in a flash. But didn't know how to go ahead in the code to make that variable sit in flash. Also I want that project to be also loaded from flash. I am able to create the loader file and successfully able to boot from flash. But I need to retain some of the variable of the project. Is there any way to achieve this i.e simultaneously store the variable as well as the whole project in a flash and boot it from there. I am using SC584 Eval Kit for the project. Any guidance or sample code will be helpful.

Thanking You

Anukul Anand

Parents Reply
  • Hello

    I tried the above attachment and it worked fine. This is able to write and read whole flash in debug mode. My requirement is this:

    1. One Main application will be flashed.

    2. There will be some configuration information such 10KB of data.

    3. The main application will write these info in specified location (which doesn't hinder the already occupied location by main app) on the flash and retain it.

    4. The main application can also read the config info already written before.

    How to know when a loader file is loaded to flash how much space it will take and how much space is available for further writing. Is there any way to get this info. 

    Any idea regarding this will be helpful.

    Anukul Anand

Children