No boot.py unable to create python files

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
automate1717
Posts: 10
Joined: Sat Jan 08, 2022 1:02 am

No boot.py unable to create python files

Post by automate1717 » Tue Feb 01, 2022 10:49 pm

I have the ESP32-S3-DevkitC-1 board with the 32 mb of ram and 8 mb psram. I am able to build and install micropython using idf version4.4 beta (note that the regular 4.4 and the latest 5.0 fails to build a working image. I have the same board but with only 8 mb flash and it works great.
I am able to build and flash the board and I have a working REPL prompt. When I try to save a python script, I notiv=ce there is no boot.py by default. I am unable to save the script as well.

Here is an error I have in thonny when I create a simple script and try to save it

ERROR thonny.backend: PROBLEM WITH THONNY'S BACK-END
Error Could not open file /test.py for writing, output:
[Errno 19] ENODEV


Note that REPL is working and I can even run the script, even though it never gets saved to the board. There is also no boot.py file and when I try this in rshell, /pyboard is empty.

Does anyone know what might be going on and how to resolve? I fell I am so close to getting this working. The only thing I noticed is that when I run flash_id as shown below, I get detected flash_size is unknown. I did define the flash size when I flashed the coard with 32m (32 mb does not work) but no difference. Thank you so much

esptool.py --port /dev/ttyUSB0 flash_id
esptool.py v3.2
Serial port /dev/ttyUSB0
Connecting.....
Detecting chip type... ESP32-S3
Chip is ESP32-S3
Features: WiFi, BLE
Crystal is 40MHz
MAC: 7c:df:a1:e1:14:44
Uploading stub...
Running stub...
Stub running...
Manufacturer: c2
Device: 8039
Detected flash size: Unknown
Hard resetting via RTS pin...

4dragunov
Posts: 1
Joined: Fri May 27, 2022 9:54 pm

Re: No boot.py unable to create python files

Post by 4dragunov » Fri May 27, 2022 10:10 pm

Hi! did you solve the problem? I have the same but on-wroom-32D 16mb
I can't find the answer anywhere.. :cry:

TomBee
Posts: 2
Joined: Mon Dec 02, 2019 4:27 pm

Re: No boot.py unable to create python files

Post by TomBee » Tue Mar 14, 2023 5:39 pm

I was able to use esptool to flash the ESP32-S3 Adafruit board 5477 with Micropython 1.19.1 from
https://micropython.org/download/esp32spiram/
I am able to get to repl BUT the rshell runs into problems with the rsync command

PS F:\Development\WorkspaceVSC> rshell -p COM25
Using buffer-size of 32
Connecting to COM25 (buffer-size 32)...
Trying to connect to REPL connected
Retrieving sysname ... esp32
Testing if ubinascii.unhexlify exists ... Y
Retrieving root directories ...
Setting time ... Mar 14, 2023 13:20:55
Evaluating board_name ... pyboard
Retrieving time epoch ... Jan 01, 2000
Welcome to rshell. Use the exit command to exit rshell.

F:\Development\WorkspaceVSC> rsync -m \code /pyboard
Adding /pyboard/app
Unable to create /pyboard/app
Adding /pyboard/main.py
timed out or error in transfer to remote: b'F'

F:\Development\WorkspaceVSC> boards
pyboard @ COM25 connected Epoch: 2000 Dirs:

F:\Development\WorkspaceVSC> repl
Entering REPL. Use Control-X to exit.
alse
♦♦>
MicroPython v1.19.1 on 2022-06-18; ESP32S3 module (spiram) with ESP32S3
Type "help()" for more information.
>>>

Suggestions to load my files on this pyboard ?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: No boot.py unable to create python files

Post by Roberthh » Tue Mar 14, 2023 6:00 pm

Try to use mpremote instead of rshell.

TomBee
Posts: 2
Joined: Mon Dec 02, 2019 4:27 pm

Re: No boot.py unable to create python files

Post by TomBee » Wed Mar 29, 2023 10:04 pm

I have attempted to use mpremote without much success.
I find the documentation somewhat sparse.
I can connect to my pyboard

C:\tempst>mpremote connect com25
Connected to MicroPython at com25
Use Ctrl-] to exit this shell
>>> CONTROL-D
MPY: soft reboot
Traceback (most recent call last):
File "_boot.py", line 11, in <module>
File "inisetup.py", line 34, in setup
File "inisetup.py", line 7, in check_bootsec
OSError: (-24579, 'ESP_ERR_FLASH_NOT_INITIALISED')
MicroPython v1.19.1 on 2022-06-18; ESP32S3 module with ESP32S3
Type "help()" for more information.

If I try to make a directory I get following OSERROR
C:\tempst>mpremote connect com25 mkdir /pyboard/app
mkdir :/pyboard/app
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
OSError: [Errno 19] ENODEV

https://pypi.org/project/mpremote/ is not overly helpful. Any recommended links?

I spent this past week and finally got mpremote to work through trial & error with the ESP32.
Next I'll try with ESP32S2.

I now believe the real issue is that no one has published a micropython version for the ESP32S3 N4R2 memory version.
I think my next step will be to setup and compile a custom version with 4M flash and 2M psram.

Post Reply