Flashing PlatformIO projects
PlatformIO projects developed with LibreTiny can be flashed just like any other PIO project.
All binary files generated by PlatformIO will be in
.pio/build/<my_board>/. The methods described below may require you to get a file from that directory.
This path will be referred to as build directory.
LibreTiny has a built-in firmware uploader, based on ltchiptool. Pressing
Upload in PlatformIO IDE does all the work for you.
If you have more than one COM port, configure your PIO project first:
The device needs to be connected to your PC with a UART-TTL adapter. Refer to chip connection guides to learn how to connect your device.
Using ltchiptool (wired, via UART)
You can use the ltchiptool GUI or CLI to manually flash the firmware. Grab the
firmware.uf2 file from the build directory. Then, follow the ltchiptool usage guide to flash it to the device.
The UF2 file may have a different name, depending on the project you're building. Usually it's best to grab the latest (sorted by date) file with UF2 extension from the build directory.