!! W A R N N I N G !! (In DEVELOPMENT)
ESP32 merged binaries generator for publication or continuos integration. This code is based of CanAirIO deploy tool but it is for general purpose.
This tool is for PlatformIO projects, and you need its PlatformIO core or CLI installed in your system. For GitHub publication you need GitHub CLI.
- Auto detection of env for build
- Version and Revision definition via Pio ini or env variables
- Support list of flavors to build via env variable: FLAVORS
- Binaries merged ouput only for ESP32 for now
- Force MCU type via shell variable: MCUTYPE
- Added basic support for SPIFFS bin. issue
- MCU Core auto dectection issue (for ESP32/C3/S3/S2).
- Library projects support
Fist install deploy command in your ~/bin directory, change it to executable, and run it like these possible options:
Build all flavors and build installer:
deploy all
Build all flavors only:
deploy build
Build installer package:
deploy installer
Build library package:
deploy lib
GitHub release publication:
deploy publish
(you need GitHub CLI installed in your system)
Full options help:
deploy help
This tool admit the next environment variables for override defaults:
FIRMVER (firmware version, i.e 0.2.0. Defautl from pio ini)
FIRMREV (firmware version, i.e 920. Defautl from pio ini)
FIRNAME (firmare name, default basename directory)
FLAVORS (valid pio env values for building)
MCUTYPE (valid ESP32 mcu type: ESP32, ESP32C3, ESP32S2, ESP32S3)
override settings examples:
FIRMVER=0.3.2 FIRMREV=999 deploy build
FIRMVER=0.3.2 FIRMREV=999 FLAVORS="ICENAV_BOARD TDECK_ESP32S3" deploy all
MCUTYPE=ESP32S2 deploy all
Run the next commands for see a complete execution of this tool. For instance here in a random ESP32 PlatformIO project:
git clone https://github.com/jgauchia/IceNav-v3.git icenav
cd icenav
FLAVORS="TDECK_ESP32S3 ICENAV_BOARD" deploy all
(These flavors options are optional. If you don't specefic nothing, deploy could try to build all PlatformIO envs on the .ini file)
***********************************************
** Building TDECK_ESP32S3
***********************************************
PASSED TDECK_ESP32S3 !
***********************************************
** Building ICENAV_BOARD
***********************************************
PASSED ICENAV_BOARD !
Generating merge binary for ICENAV_BOARD_v0.2.2rev86_merged.bin
esptool.py v4.5.1
Wrote 0x276690 bytes to file ICENAV_BOARD/ICENAV_BOARD_v0.2.2rev86_merged.bin, ready to flash to offset 0x0
4c7dc9b8edfdfca9c3d6bbc275a45a59 ICENAV_BOARD/ICENAV_BOARD_v0.2.2rev86_merged.bin
Generating merge binary for TDECK_ESP32S3_v0.2.2rev86_merged.bin
esptool.py v4.5.1
Wrote 0x25a510 bytes to file TDECK_ESP32S3/TDECK_ESP32S3_v0.2.2rev86_merged.bin, ready to flash to offset 0x0
f56b665c88ee006cb9ef13d97a82ed77 TDECK_ESP32S3/TDECK_ESP32S3_v0.2.2rev86_merged.bin
packing release:
adding: ICENAV_BOARD_v0.2.2rev86_merged.bin (deflated 45%)
adding: TDECK_ESP32S3_v0.2.2rev86_merged.bin (deflated 45%)
2.7M icenav_v0.2.2rev86.zip
After that, the merged binaries and its zip package will be in the releases directory.
This script also can able to publish these zip package to your GitHub release section of your proyect or repository. For that you need GitHub CLI configured in your system. Then run this command for publish a pre-release in GitHub:
deploy publish
This command could generate a tag and pre-release using the version and revision names detected in the PlatformIO ini file or when you passed it version names using the different overrides like FIRMVER bash variable in the inline shell like this:
FIRMVER=0.1.0 deploy publish
You are able to test the merge binaries using esptool command or for instance this tool from Espressif, like this: