You will need two utilities from Espressif installed on your computer in order to upload the compiled files onto the ESP32-S3: esptool and the ESP-IDF.
esptool
You'll use esptool to upload the binary files to the ESP32-S3. esptool is installed with pip
. Open a terminal window and enter:
pip install esptool
For more information on esptool, you can check out the documentation from Espressif.
ESP-IDF
The kernel and filesystem are written to the ESP32-S3 using parttool.py, which is a tool included in the ESP-IDF. You can install the ESP-IDF as a part of your IDE or separately on your local computer. Espressif has documentation and installers on their site.
Prep the Metro ESP32-S3
Now you finally get to play with hardware. You'll use the Metro ESP32-S3, which has 16 MB of Flash and 8 MB of PSRAM making it perfect for this skateboard trick.
You'll want to upload the files that you just built over hardware UART. The RX and TX hardware UART pins are accessible next to the ESP32-S3 module on the board. Solder two headers to those pins.
Attach a USB to serial cable to the Metro ESP32-S3. You should see the board power up once you plug in the USB cable.
- USB RX to ESP32-S3 TX (white wire)
- USB TX to ESP32-S3 RX (green wire)
- USB power to ESP32-S3 VIN (red wire)
- USB ground to ESP32-S3 GND (black wire)
Binary Files
First, you'll upload the three binary files (bootloader.bin, network_adapter.bin and partition-table.bin) to the ESP32-S3 with esptool.
Put the Metro ESP32-S3 into bootloader mode by holding down the boot button, pressing the reset button and then releasing the boot button. Then, open a terminal window and navigate to the directory where you saved the exported files from the Docker container. Enter this command to upload the three files to the ESP32-S3:
python esptool.py --chip esp32s3 -p YOUR-PORT-HERE -b 921600 --before=default_reset --after=hard_reset write_flash 0x0 bootloader.bin 0x10000 network_adapter.bin 0x8000 partition-table.bin
Replace YOUR-PORT-HERE
with the USB port number that the ESP32-S3 is attached to. On Linux or Mac it may look like /dev/ttyUSB0
. On Windows, it will be COM followed by a number. For example, COM3
.
File System and Kernel
Next, you'll use the ESP-IDF terminal to upload the file system and kernel file. Open an ESP-IDF terminal window and navigate to the directory where you saved the exported files from the Docker container. First, put the Metro ESP32-S3 into bootloader mode by holding down the boot button, pressing the reset button and then releasing the boot button. Then upload the kernel file (xipImage) first with:
parttool.py write_partition --partition-name linux --input xipImage
Put the Metro ESP32-S3 into bootloader mode again and then upload the file system file (rootfs.cramfs) with:
parttool.py write_partition --partition-name rootfs --input rootfs.cramfs
Next you'll boot into Linux on an ESP32-S3!
Text editor powered by tinymce.