mpremote: enter_raw_repl: not working with micropython v1.26
Port, board and/or hardware
esp32-s3, mpremote
MicroPython version
micropython v1.26 with ESP32-S3
Reproduction
mpremote cp process_handler.py :/process_handler.py
Expected behaviour
Should copy
Observed behaviour
mpremote.transport.TransportError: could not enter raw repl
Additional Information
I observed that from being in raw REPL, you cannot initiate a reboot with CTRL-D any more like it was in earlier micropython version.
For reboot, you now need to leave the raw REPL with CTRL-A first before being able to reboot with CTRL-D.
So the behavior of enter_raw_repl in transport_serial.pymight need modification.
Code of Conduct
Yes, I agree
tools/pyboard: Split Ctrl-C into two separate steps with small delay
This makes pyboard.py successfully enter raw-repl on an ESP32 board.
Without the split the running program won't always successfully abort and thus entering raw-repl fails.
I'm not completely sure, if this also depends on the actual program that is running on the device and whether this also happens on a real pyboard.
So for reference, here's the program running on the device which triggers the behaviour for me:
from machine import Pin
from time import sleep
import micropython
p = Pin(0, Pin.OUT)
#@micropython.native
def func():
for _ in range(1000):
p.value(not p.value())
while 1:
func()
This change has not been tested on an actual pyboard, because I don't have one.