Install and Use¶
This section provides instructions for installing dependencies, building and flashing the new TROPIC01 USB DevKit firmware, and using the TROPIC01 Util Python CLI application.
Before you start
Before you start with the instructions below, please, complete our USB DevKit tutorials, specifically:
- Hardware and software setup. This will help you prepare Libtropic and the USB DevKit on your machine.
- Chip identification, FW Update and Hello, World! tutorials. These will help you verify that you can use the USB DevKit on your machine without any issues and you will update TROPIC01 to the latest firmware.
Install Dependencies¶
Installation instructions
- Switch to
tropic01_util/directory:cd libtropic/examples/applications/tropic01_util/
- Install GCC cross-compiler for ARM:
- Ubuntu/Debian:
sudo apt update && sudo apt install gcc-arm-none-eabi - Fedora:
sudo dnf install arm-none-eabi-gcc arm-none-eabi-binutils-cs arm-none-eabi-newlib
- Ubuntu/Debian:
- Install
dfu-util:- Ubuntu/Debian:
sudo apt update && sudo apt install dfu-util - Fedora:
sudo dnf install dfu-util
- Ubuntu/Debian:
- Install Python:
- You can also use your distribution's package manager.
- Fedora:
sudo dnf install python3 - Debian/Ubuntu:
sudo apt update && sudo apt install python3
- Fedora:
Python version
At the time this guide was written, Python 3.14 did not work with our required packages. If that is still the case, try using Python 3.13, which should work. Older versions were not tested.
- You can also use your distribution's package manager.
- Prepare Python Virtual Environment (venv):
- Create venv:
python3 -m venv tropic01-util-venv - Activate venv:
source tropic01-util-venv/bin/activate - Update pip:
pip install --upgrade pip - Install dependencies:
pip install -r tropic01_util_app/requirements.txt
- Create venv:
TBA
TBA
Build USB DevKit Firmware¶
First, build the new USB DevKit firmware:
Build instructions
Switch to the firmware directory:
cd libtropic/examples/applications/tropic01_util/firmware/
Create a build/ directory and switch to it:
mkdir build/
cd build/
And finally, build the firmware. If the revision of your USB DevKit is TS1303, build as:
cmake ..
make -j
cmake -DUSB_DEVKIT_REVISION=TS1302 ..
make -j
What is the revision of my USB DevKit?
The revision is printed on the back side of the PCB.
TBA
TBA
Flash USB DevKit Firmware¶
Next, flash the new USB DevKit firmware:
Flash instructions
Before flashing the firmware, the STM32U5 on the USB DevKit must be booted into bootloader with these steps:
- press the button on the USB DevKit and hold it,
- connect it to USB,
- release the button.
After this, the LED should stay off and the USB DevKit should be registered in your system as "STMicroelectronics STM Device in DFU Mode".
Follow the next steps to flash the firmware.
Switch to the build/ directory where you have previously built the firmware:
cd libtropic/examples/applications/tropic01_util/firmware/build/
Flash the firmware:
dfu-util -a 0 -s 0x08000000:leave -D tropic01_util.bin
Now, the USB DevKit LED should turn on and it should be registered in your system as "STMicroelectronics Virtual COM Port".
TBA
TBA
Flashing back the original firmware
If you want to flash back the firmware shipped with the USB DevKit, clone our devboards repository and follow these instructions.
Use TROPIC01 Util¶
As previously mentioned, TROPIC01 Util is a Python CLI application used to interact with our USB DevKit running the new firmware. To use it, follow these instructions:
Using TROPIC01 Util
Switch to tropic01_util/ directory:
cd libtropic/examples/applications/tropic01_util/
Make sure the Python venv we have created before is still active. If not, activate it:
source tropic01-util-venv/bin/activate
After that, run the tropic01_util.py script:
./tropic01_util.py -h
get-rand-bytes, run: ./tropic01_util.py get-rand-bytes -h
./tropic01_util.py get-rand-bytes --count 500
TBA
TBA
Secure Session establishment
There is no command for establishing a secure session. When the USB DevKit is connected to USB, during startup, it establishes a Secure Session with TROPIC01 using the default prod0 keys in Pairing Key slot 0. For more information about the default pairing keys, refer to Default Pairing Keys for a Secure Channel Handshake.
Because the usage of prod0 keys is hardcoded into the USB DevKit firmware, there is no possibility to use other pairing keys without modifying the firmware and flashing it into the USB DevKit.