You are reading a single comment by @jonreid and its replies. Click here to read the full conversation.
  • My only concern around not having the V1 code in there as a fallback, is that if the V2 download fails and the unit reboots, it is then a non-functional unit until it can successfully download code.

    For our 24x7 remote logging application - this is not really an acceptable possibility.

    So either I need a way of removing all the V1 code from RAM before running V2, or could I as part of the download new code process do this ?

    • erasePage()
    • write a dump of the current running code into Flash
    • then follow by writing the V2 code (downloaded) into Flash
    • If V2 downloads and verifies I can write to my EEPROM that the V2 code is valid to run - so the bootloader knows which version to load.

    There would still be some risks around this, but probably acceptable for our application

About

Avatar for jonreid @jonreid started