-
wsl --install Ubuntu
-
sudo apt update && sudo apt upgrade -y -
sudo apt install -y build-essential git wget flex bison gperf pkg-config python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
Clonar ésta repo -- Clone this repo, MicroPython y ESP-IDF compatible con MicroPython(En la actualidad "Micropython 1.24" 5.04 a 5.2.2):
-
git clone https://github.com/PIBSAS/MicroPython_LilyGO_T_Display_S3.git
-
git clone https://github.com/micropython/micropython.git
-
mkdir esp cd esp git clone -b v5.2 --recursive https://github.com/espressif/esp-idf.git
-
mkdir esp cd esp git clone -b v5.2.2 --recursive https://github.com/espressif/esp-idf.git
Regresar un directorio y ejecutar el script para ESP32S3 -- Back a directory and execute the Script for ESP32S3:
-
. ./export.sh
Copiar el directorio ESP32_GENERIC_S3_N16R8 y su contenido al directorio boards -- Copy recursively ESP32_GENERIC_S3_N16R8 folder and his content to boards folder:
-
cd cp -r ESP32-S3-WROOM-1-N16R8/ESP32_GENERIC_S3_N16R8 micropython/ports/esp32/boards
Dirigirnos al directorio MicroPython y ejecutar mpy-cross -- Go to MicroPython folder and run mpy-cross:
-
cd cd micropython/ make -C mpy-cross
-
export IDF_TARGET=esp32s3
-
cd ports/esp32/
-
make BOARD=ESP32_GENERIC_S3_N16R8 submodules
-
make BOARD=ESP32_GENERIC_S3_N16R8
- Project build complete. To flash, run this command:
-
$HOME/.espressif/python_env/idf5.0_py3.10_env/bin/python ../../../esp/esp-idf/components/esptool_py/esptool/esptool.py -p (PORT) -b 460800 --before default_reset --after no_reset --chip esp32s3 write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 build-ESP32_GENERIC_S3_N16R8/bootloader/bootloader.bin 0x8000 build-ESP32_GENERIC_S3_N16R8/partition_table/partition-table.bin 0x10000 build-ESP32_GENERIC_S3_N16R8/micropython.bin
| bootloader | @0x000000 | 18672 ( 14096 remaining) |
|---|---|---|
| partitions | @0x008000 | 3072 ( 1024 remaining) |
| application | @0x010000 | 1396208 ( 635408 remaining) |
| total | 1461744 |
- Se debe cambiar
(PORT)porCOM29por ejemplo o en linux/dev/ttyACM0
- Project build complete. To flash, run this command:
-
python -m esptool --chip esp32s3 -b 460800 --before default_reset --after no_reset write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 build-ESP32_GENERIC_S3_N16R8/bootloader/bootloader.bin 0x8000 build-ESP32_GENERIC_S3_N16R8/partition_table/partition-table.bin 0x10000 build-ESP32_GENERIC_S3_N16R8/micropython.bin
- Project build complete. To flash, run this command:
-
python -m esptool --chip esp32s3 -b 460800 --before default_reset --after no_reset write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 build-ESP32_GENERIC_S3_N16R8/bootloader/bootloader.bin 0x8000 build-ESP32_GENERIC_S3_N16R8/partition_table/partition-table.bin 0x10000 build-ESP32_GENERIC_S3_N16R8/micropython.bin
-
$HOME/.espressif/python_env/idf5.0_py3.10_env/bin/python ../../../esp/esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyACM0 erase_flash
-
$HOME/.espressif/python_env/idf5.0_py3.10_env/bin/python ../../../esp/esp-idf/components/esptool_py/esptool/esptool.py -p COM29 -b 460800 --before default_reset --after no_reset --chip esp32s3 write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 build-ESP32_GENERIC_S3_N16R8/bootloader/bootloader.bin 0x8000 build-ESP32_GENERIC_S3_N16R8/partition_table/partition-table.bin 0x10000 build-ESP32_GENERIC_S3_N16R8/micropython.bin
-
python -m esptool --chip esp32s3 -b 460800 --before default_reset --after no_reset write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 build-ESP32_GENERIC_S3_N16R8/bootloader/bootloader.bin 0x8000 build-ESP32_GENERIC_S3_N16R8/partition_table/partition-table.bin 0x10000 build-ESP32_GENERIC_S3_N16R8/micropython.bin
-
python -m esptool --chip esp32s3 -b 460800 --before default_reset --after no_reset write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 build-ESP32_GENERIC_S3_N16R8/bootloader/bootloader.bin 0x8000 build-ESP32_GENERIC_S3_N16R8/partition_table/partition-table.bin 0x10000 build-ESP32_GENERIC_S3_N16R8/micropython.bin
-
winget install --interactive --exact dorssel.usbipd-win
Abrir Terminal(Administrador) conectar el ESP32 y escribir -- Open Terminasl(Admin) plug ESP32 and type:
-
usbipd list
- Observar el -- See
BUSIDdel -- of esp(USB-Enhanced-SERIAL CH343 (COM29). Ej:2-1
-
usbipd bind --busid 2-1 -
usbipd attach --wsl --busid 2-1
En WSL Ubuntu(Distro) agregar el usuario al grupo dialout -- On WSL Ubuntu add user to dialout group:
-
sudo adduser $USER dialout
En Terminal(Administrador) Comprobar que figure Attached en la columna STATE con -- On Teminal(Admin) Verify Attached on STATE column with:
-
usbipd list
-
$HOME/.espressif/python_env/idf5.0_py3.10_env/bin/python ../../../esp/esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyACM0 erase_flash
-
$HOME/.espressif/python_env/idf5.0_py3.10_env/bin/python ../../../esp/esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyACM0 -b 460800 --before default_reset --after no_reset --chip esp32s3 write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 build-ESP32_GENERIC_S3_N16R8/bootloader/bootloader.bin 0x8000 build-ESP32_GENERIC_S3_N16R8/partition_table/partition-table.bin 0x10000 build-ESP32_GENERIC_S3_N16R8/micropython.bin
-
python -m esptool --chip esp32s3 -b 460800 --before default_reset --after no_reset write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 build-ESP32_GENERIC_S3_N16R8/bootloader/bootloader.bin 0x8000 build-ESP32_GENERIC_S3_N16R8/partition_table/partition-table.bin 0x10000 build-ESP32_GENERIC_S3_N16R8/micropython.bin
-
python -m esptool --chip esp32s3 -b 460800 --before default_reset --after no_reset write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 build-ESP32_GENERIC_S3_N16R8/bootloader/bootloader.bin 0x8000 build-ESP32_GENERIC_S3_N16R8/partition_table/partition-table.bin 0x10000 build-ESP32_GENERIC_S3_N16R8/micropython.bin
-
usbipd detach --busid 2-1
-
$HOME/.espressif/python_env/idf5.0_py3.10_env/bin/python ../../../esp/esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyACM0 erase_flash -
$HOME/.espressif/python_env/idf5.0_py3.10_env/bin/python ../../../esp/esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyACM0 -b 460800 --before default_reset --after no_reset --chip esp32s3 write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 build-ESP32_GENERIC_S3_N16R8/bootloader/bootloader.bin 0x8000 build-ESP32_GENERIC_S3_N16R8/partition_table/partition-table.bin 0x10000 build-ESP32_GENERIC_S3_N16R8/micropython.bin
- Just Download the bin Firmware files.
⚠️ Files need to be where is esptool or type full path of files⚠️
-
pip install esptool
Replace (PORT)"Doesn't need port", with yours Linux: /dev/ttyACM0 Windows: COM12 (After com goes the number detected on your pc)
- Linux(On Ubuntu python3 instead just python):
python -m esptool erase_flash - Windows:
python -m esptool erase_flash - Windows with Virtual Environment:
esptool erase_flash
-
python -m esptool -b 460800 --before default_reset --after no_reset --chip esp32s3 write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 bootloader/bootloader.bin 0x8000 partition_table/partition-table.bin 0x10000 micropython.bin
-
esptool -b 460800 --before default_reset --after no_reset --chip esp32s3 write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 bootloader/bootloader.bin 0x8000 partition_table/partition-table.bin 0x10000 micropython.bin
⚠️ For pip on newest OSes you need to make virtual environment:
-
python -m venv esp-env
or
-
py -m venv esp-env .\esp-env\Scripts\activate
Once activated install esptool:
- (esp-env)PS C:....>
pip install esptool
- If you get a PowerShell Scripts Policy Execution Exception that don't let you activate the Virtual Environment:
.\esp-env\Scripts\activate- Then open a Terminal like Administrator and type:
Set-ExecutionPolicy Unrestricted- Close the Terminal now you can activate the Python Virtual Environment.
-
python .m venv esp-env source esp-env/bin/activate
Once activated install esptool:
- (esp-env) ...$:
pip install esptool
If you want add Libraries to your build, then copy them to micropython/ports/esp32/modules/ folder all *.py you want, look the space left, becarefull.
- ESP-Touch for Android
- ESP-Touch for iOS
- Smartconfig example in examples folder in this repo.

















