Deleting all files without flash

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
User avatar
atmuc
Posts: 18
Joined: Fri Nov 13, 2020 11:44 am
Location: Istanbul

Deleting all files without flash

Post by atmuc » Sat Nov 14, 2020 12:02 pm

When I do something wrong with my code I get an error like;

Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)

in this case, esp32 starts to reboot forever and I cannot upload new code. I use VS Code and Pymakr. I can erase and re flash microPython image with ESP Download tool. It takes time to flash again. Is there any way to delete all py files from esp32?

Uploading project (main folder)...
Not safe booting, disabled in settings
Uploading to /flash...
Upload failed.: timeout Please reboot your device manually.

User avatar
jimmo
Posts: 2263
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Deleting all files without flash

Post by jimmo » Sun Nov 15, 2020 4:06 am

atmuc wrote:
Sat Nov 14, 2020 12:02 pm
in this case, esp32 starts to reboot forever and I cannot upload new code.
In guessing that what's happening is that whatever is in "main.py" is triggering the issue, so it runs immediately on the next boot.

The best way to avoid this is to make it so (while in development) your code doesnt' run automatically. Instead of putting it in "main.py", put it in (for example) "app.py", and then at the REPL run "import app".

Alternatively, you can use pyboard.py to run your code directly rather than copying it to the device. http://docs.micropython.org/en/latest/r ... rd.py.html

Post Reply