Search code examples
toit

Replace or remove toit application over USB not WIFI


I have an M5Stack Basic and installed the deep_sleep.toit example. It is flashed with the open source version of toit.

The application runs fine, I can see that using jag monitor, however I am unable to connect to it and run another application. The reason is that it is awake for such a short time that jag is unable to discover it. I have tried to reflash it, it works but the deep_sleep application is still there.

Can I remove the application using an USB connection, not wifi?


Solution

  • As of Jaguar v0.9.1, the installed applications are correctly invalidated when you reflash, so doing:

    jag flash
    

    should get you out of this problematic scenario. Alternatively, you can also erase the flash on your ESP32 using:

    $HOME/.cache/jaguar/esptool --chip esp32 erase_flash