You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I'd actually avoid save()ing your code at all and would just flash the bootloader, with some failsafe code if the firmware update fails... So maybe the bootloader & firmware updater, all in one.

    ... or I guess you could use the V1 as a fallback if needs be, but I'd try and keep the fallback as simple as possible, and ship it with something that the bootloader can load up on to ensure it works correctly!

    What is the best way for me to grab the correct V2 minified code

    • Install espruino from NPM: https://www.npmjs.com/package/espruino
    • Then run espruino -p path_to_espruino_serial_port --minify -o out.js your_input_file.js
    • And out.js should contain the final file that you can upload

    In the fallback scenario

    Yes, that'd be why you don't include the full V1 code unless you have to :)

About

Avatar for Gordon @Gordon started