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

Reset button doesn't restart program when flashed with espflash #408

Closed seanaye closed 11 months ago

seanaye commented 1 year ago

I am flashing an esp32-c6-WROOM-1 devkit using espflash. The program runs fine but when I click the reset button on the board the board freezes but does not restart the program. E.g. a blinky application will freeze the LED in the state at the time of the reset button push. The program does not start up again.

SergioGasquez commented 1 year ago

Hi! Few questions:

Not sure if this is related with espflash if the flashing/monitoring does not throw any errors.

seanaye commented 1 year ago

Yes I can open the monitor after flashing. Ctrl + R does restart the board. I can flash the board see the serial out put use ctrl r to restart. When I click the reset button the board freezes (blinky will freeze) and the serial monitor disconnects. I can still re-connect the monitor and use ctrl + R to restart the program but the reset button will never restart the program.

Will try with esptool

seanaye commented 1 year ago

I should also note that when I click the reset button the board completely freezes in whatever state it is in. e.g. if the LED is on the board will freeze with the LED on and there is no way to get it to go off without unplugging. No combination of BOOT or RESET button pushes will turn off the light

seanaye commented 1 year ago

I am unsure how to use esptool to flash the board, the documentation for write_flash references a bootloader.bin but my rust program does not output a file like that. I just have /target/riscv32imac-esp-espidf/release/CRATE_NAME after running cargo build --release --target riscv32imac-esp-espidf.json

SergioGasquez commented 1 year ago

I am unsure how to use esptool to flash the board, the documentation for write_flash references a bootloader.bin but my rust program does not output a file like that. I just have /target/riscv32imac-esp-espidf/release/CRATE_NAME after running cargo build --release --target riscv32imac-esp-espidf.json

See elf2image command and, in case you need the bootloader, you can download it from https://github.com/esp-rs/espflash/tree/main/espflash/resources/bootloaders

seanaye commented 1 year ago

Will try tonight, thanks

SergioGasquez commented 1 year ago

Will try tonight, thanks

Hi! Do you have any updates?

SergioGasquez commented 11 months ago

Hello @seanaye, do you have any updates?

SergioGasquez commented 11 months ago

I will be closing the issue as it's inactive, feel free to reopen it if the issue is still present