esp-rs / espflash

Serial flasher utility for Espressif SoCs and modules based on esptool.py
Apache License 2.0
471 stars 115 forks source link

Can't exit espflash if firmware is stuck #404

Closed bugadani closed 1 year ago

bugadani commented 1 year ago

The exact cause is unknown at this point, but here is the setup:

The serial output includes the bootloader messages and the "Hello, world!" printed from the main task, but does not include the state printing a few lines below. In this state (i.e. probably while stuck in Board::initialize, which is trying to configure a display over SPI, but disregarding the bug in my code), espflash doesn't react to Ctrl+C or Ctrl+R and does not exit.

Manually resetting the MCU exits espflash and then the terminal prints the control characters: image

bugadani commented 1 year ago

And just after posting this, the problem goes away by itself, of course...

cacharle commented 1 week ago

I have the same issue on Alacritty and the default terminal of RaspberryPiOS. Only way to stop espflash is to kill it in another terminal.

It doesn't even stop on SIGQUIT Ctrl+\.

Anyone knows a fix?