My Pico W running micropython RPI_PICO_W-20231005-v1.21.0.uf2 has become "stuck" running a program I uploaded as main.py.
I've previously used micropython on ESP32, and was able to CTRL-C to get back to the Repl and delete or rename main.py.
I have a "heartbeat" that outputs a dot to the console (Serial) every second while running. I can connect Putty to the serial port, and I see that heartbeat. If I send CTRL-C, rather than dropping out to the Repl prompt, the USB serial port disconnects. When I reconnect, the heartbeat is still running.
I tried the special firmware from this article in section "3. Reset By Renaming Main.py"
Startup with BOOTSEL button, copy file "MicroPython_RenameMainDotPy.uf2". I connected Putty to monitor serial output and see this:I flashed back to RPI_PICO_W-20231005-v1.21.0.uf2, and my main.py was running again.
How can I re-gain control an modify code once I've saved a file as main.py.?
I see there is a "flash_nuke.uf2 file" which would presumably bring back to factory conditions, but I want to learn the correct way to access the Repl and replace a main.py program when I need to make an update.
I've previously used micropython on ESP32, and was able to CTRL-C to get back to the Repl and delete or rename main.py.
I have a "heartbeat" that outputs a dot to the console (Serial) every second while running. I can connect Putty to the serial port, and I see that heartbeat. If I send CTRL-C, rather than dropping out to the Repl prompt, the USB serial port disconnects. When I reconnect, the heartbeat is still running.
I tried the special firmware from this article in section "3. Reset By Renaming Main.py"
Startup with BOOTSEL button, copy file "MicroPython_RenameMainDotPy.uf2". I connected Putty to monitor serial output and see this:
Code:
MPY: soft rebootThis is the RenameMainDotPy firmwareNo 'main.py' foundNo 'main.py' foundNo 'main.py' found====================================This is the RenameMainDotPy firmwarePress Ctrl-D to see what was doneThis is not full MicroPython - Please re-flash MicroPython>>>
How can I re-gain control an modify code once I've saved a file as main.py.?
I see there is a "flash_nuke.uf2 file" which would presumably bring back to factory conditions, but I want to learn the correct way to access the Repl and replace a main.py program when I need to make an update.
Statistics: Posted by timg11 — Fri Dec 29, 2023 10:35 pm