How can I get a single .bin when building uPy for an ESP32-s3 from source?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
androiddrew
Posts: 18
Joined: Sat Jan 23, 2021 7:24 pm

How can I get a single .bin when building uPy for an ESP32-s3 from source?

Post by androiddrew » Wed Feb 23, 2022 4:02 pm

So I have had no luck getting the ESP32-S3 binary available on the downloads page working for my ESP32-S3-DevKitC-1-N8R8 Development Board. Following others' instructions, I have gotten a successful build from source. This required using an Ubuntu VM. I tried using the Espressif Docker container, but that didn't work.

The successful build produced three binaries which I could upload like so:

Code: Select all

esptool.py -p /dev/ttyUSB0 -b 460800 --before default_reset --after no_reset --chip esp32s3  write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x0 build-GENERIC_S3_SPIRAM/bootloader/bootloader.bin 0x8000 build-GENERIC_S3_SPIRAM/partition_table/partition-table.bin 0x10000 build-GENERIC_S3_SPIRAM/micropython.bin
My question is how can I get a single binary out of the build process, like the one produced in the uPy downloads?

Also, why is my build listed as "dirty" in the REPL?

Code: Select all

MicroPython v1.18-147-g5f50f4a13-dirty on 2022-02-22; ESP32S3 module (spiram) with ESP32S3

androiddrew
Posts: 18
Joined: Sat Jan 23, 2021 7:24 pm

Re: How can I get a single .bin when building uPy for an ESP32-s3 from source?

Post by androiddrew » Wed Feb 23, 2022 5:29 pm

I am just going to post my own reply.

While the idf.py tool produces the esptool.py command I pasted above, which uses the 3 separate bin objects. There is also a firmware.bin that gets built by the makeimg.py preceding the idf.py build command in the make file

So it's sufficient to use:

Code: Select all

esptool.py -p /dev/ttyUSB0 -b 460800 --before default_reset --after no_reset --chip esp32s3  write_flash --flash_mode dio --flash_size detect --flash_freq 80m -z 0x0 build-GENERIC_S3_SPIRAM/firmware.bin

Post Reply