Skip to content

Docker image for building custom micropython firmware (esp32)

Notifications You must be signed in to change notification settings

spasea/docker-micropython-build

Repository files navigation

Build image

docker build -t my-esp-build .

Enter container

docker run --rm -v $PWD:/project --privileged -w /project -it my-esp-build

When entering container

. /opt/esp/idf/export.sh && cd /micropython/ports/esp32/

Copy build

In container

cp -rf build-GENERIC/ /build

Execution of esptool

In case esptool.py execution doesn't work for you - you can try to run it with python -m esptool or python3 -m esptool. This also is applicable to bash scripts. Docs

Manual commands

Erase board

In treminal

esptool.py --port /dev/tty.usbserial-0001 erase_flash

Write to board

In treminal

esptool.py --port /dev/tty.usbserial-0001 -b 460800 --before default_reset --after hard_reset --chip esp32  write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build-GENERIC/bootloader/bootloader.bin 0x8000 build-GENERIC/partition_table/partition-table.bin 0x10000 build-GENERIC/micropython.bin

Bash scripts

Build image

ssh-add ~/.ssh/id_rsa
bash build-image.sh

Enter container

bash run.sh

Build firmware

In container

bash build.sh

Erase board

In treminal

bash erase.sh

Write to board

In treminal

bash deploy.sh

About

Docker image for building custom micropython firmware (esp32)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors