HomeACcessoryKid / life-cycle-manager

Initial install, WiFi settings and over the air firmware upgrades for any esp-open-rtos repository on GitHub
Apache License 2.0
60 stars 11 forks source link

How to programmatically reset the LCM such that it behaves as-if just flashed? #10

Closed likewise closed 5 years ago

likewise commented 5 years ago

Can I programmatically reset the LCM such that it behaves as-if just flashed?

  1. I currently erase the flash, then program the life-cycle-manager.

  2. Then I configure both WiFi AP and the repository.

  3. After this the application is downloaded and run.

How can I return to 2 programmatically? I.e. I would like to have the possibility to reset to a state where it starts in 2.

I have tried "sysparam_init(SYSPARAMSECTOR, 0);" but that did not work.

peros550 commented 5 years ago

+1 good question, if at all possible....

HomeACcessoryKid commented 5 years ago

the point 2 is characterised by the fact that ota-boot.bin is loaded in sector 0x2000 and ota-main.bin will be loaded in 0x8d000 Also the value of ota-version is set to a value of 0.0.0

If you load ota-demo (that is a repo) binary in 0x2000 you can manipulate what you want to achieve from there on. Considering that ota-main is already loaded in the top sector, ota-demo can do a temp-boot to it.

I hope this answers your question because I was not sure I understood your objective.