The toolchain required to build Particle firmware
1.8K
The Particle build container will execute <particle-iot/device-os>/build/release.sh, which can be provided with the following parameters:
--debug - Generate debug binaries (as opposed to release).--platform - The name of the platform you wish to build (argon|asom|boron|bsom|core|electron|photon|p1|xenon|xsom).--platform-id - The id of the platform you wish to build (0|6|8|10|12|13|14|22|23|24).--output-directory - The directory where you would like to resulting binary files to be placed.--tests - Generate test binaries for the current platform.Although more verbose, the Docker build container has a couple of advantages over native installation.
docker run --rm --volume <local device-os repository>:/particle-iot/device-os --volume <local binary output folder>:/particle-iot/binaries zfields/particle-toolchain --platform (core|electron|p1|photon) --output-directory /particle-iot/binaries
Option breakdown:
<local device-os repository> - This is the path to the device-os folder on your local machine.<local binary output folder>- This is the path to the directory where you would like the resulting binaries to be placed.(core|electron|p1|photon) - Select the option from this list that matches the device for which you are compiling.docker run --entrypoint make --rm --volume <local device-os repository>:/particle-iot/device-os --volume <user application folder>:/particle-iot/app --workdir /particle-iot/device-os/main zfields/particle-toolchain clean all PLATFORM=(core|electron|p1|photon) APPDIR=/particle-iot/app TARGET_FILE=<user application>
Option breakdown:
<local device-os repository> - This is the path to the device-os folder on your local machine.<user application folder> - This is the path to the user application folder on your local machine.(core|electron|p1|photon) - Select the option from this list that matches the device for which you are compiling.<user application> - This will be the name of the resulting binary (i.e. my_app).Pass the following parameters to the container:
DEBUG_BUILD=y MODULAR=n USE_SWD=y
NOTE: Special thanks to Kevin Sidwar for pioneering containerized builds in his blog.
Content type
Image
Digest
Size
165.5 MB
Last updated
almost 7 years ago
docker pull zfields/particle-toolchain