To build, develop and debug the firmware for the STM32L432. This will work for Solo Hacker, the Nucleo development board, or your own homemade Solo.
Install the latest ARM compiler toolchain for your system. We recommend getting the latest compilers from ARM.
You can also install the ARM toolchain using a package manager like
but be warned they might be out of date. Typically it will be called
solo-python usually with
pip3 install solo-python. The
solo python application may also be used for programming.
Obtain source code and solo tool
Source code can be downloaded from:
solo tool can be downloaded from:
- from python programs repository
pip install solo-python
- from installing prerequisites
pip3 install -r tools/requirements.txt
- github repository: repository
- installation python enviroment with command
make venvfrom root directory of source code
stm32l4xx target directory.
Now build the Solo application.
firmware recipe builds the solo application, and outputs
solo.hex. You can use this
to reprogram any unlocked/hacker Solo model. Note that it does not include the Solo bootloader,
so it is not a full reprogram.
If you're just planning to do development, please don't try to reprogram the bootloader,
as this can be risky if done often. Just use
Building with debug messages
If you're developing, you probably want to see debug messages! Solo has a USB
Serial port that it will send debug messages through (from
printf). You can read them using
a normal serial terminal like
-debug-2 to your build recipe, like this.
If you use
debug-2, that means Solo will not boot until something starts reading
its debug messages. So it basically waits to tether to a serial terminal so that you don't
miss any debug messages.
We recommend using our
solo tool as a serial emulator since it will automatically
reconnect each time you program Solo.
solo monitor <serial-port>
Building a complete Solo build (application + bootloader + certificate)
To make a complete Solo build, you need to build the bootloader. We provide two easy recipes:
bootloader-nonverifying: bootloader with no signature checking on updates. I.e. "unlocked".
bootloader-verifying: bootloader with signature checking enforced on updated. I.e. "Locked".
To be safe, let's use the
bootloader.hex. We can then merge the bootloader and application.
solo mergehex bootloader.hex solo.hex bundle.hex
bundle.hex is our complete firmware build. Note it is in this step that you can
include a custom attestation certificate or lock the device from debugging/DFU.
By default the "hacker" attestation certifcate and key is used. Use the
to make this permanent.
solo mergehex \ --attestation-key "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF" \ --attestation-cert attestation.der \ solo.hex \ bootloader.hex \ bundle.hex
Warning: If you use
--lock, this will permanently lock the device to this new bootloader. You
won't be able to program the bootloader again or be able to connect a hardware debugger.
The new bootloader may be able to accept (signed) updates still, depending on how you configured it.
# Permanent! solo mergehex \ --attestation-key "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF" \ --attestation-cert attestation.der \ --lock \ solo.hex \ bootloader.hex \ bundle.hex
To learn more about normal updates or a "full" update, you should read more on Solo's boot stages.