← index #8180Issue #4925
Related · high · value 2.791
QUERY · ISSUE

ESP32: impossible to upload any file after main.py or boot.py is uploaded.

openby cederomopened 2022-01-16updated 2022-01-21
port-esp32

Hello world :-)

My MicroPython application on ESP32 has internal CLI that user can attach to in order to control device. However this CLI seems to interfere with source code update/upload to device with mpremote/rshell as it seems to depend on REPL. I need to re-flash MicroPython before uploading my application into device.

The problem seems to be at board name acquisition by the host application - instead REPL this application gets my application banner and prompt.

My application is wrapped in try except pair that catches all exceptions logs the issue and reboots the board. CLI itself is a while True kind of loop. Application on exit reboots the board. The goal is not to give end user access to the REPL even with generic board firmware where REPL is compiled in.

How this can be avoided?

What command should I implement in my application CLI so it does not interfere with mpremote/rshell operations?

Any hints welcome :-)

CANDIDATE · ISSUE

main.py not executing ESP32

closedby smith-scotopened 2019-07-16updated 2025-12-10
port-esp32

main.py is not being executed after power cycle. I have only two files loaded boot.py and main.py. My evidence that main is not being executed is as follows. The last line in boot.py sets a variable to True. The first line in main.py sets a different variable to True. After power cycling the board and logging into the REPL, and running the dir() command, the variable set in boot.py is output to the screen but not the variable from main.py. If this is not the correct place to raise this issue please let me know. Thanks.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied