For flashing binaries built for embedded targets, or downloaded from the GitHub releases page there are multiple approaches.
For flashing the Chili 2D with TrustZone (CSME) binaries, please refer to the TrustZone development guide. This guide is only for non-TrustZone binaries.
** Warning: If a device has previously been flashed with a TrustZone binary, it must be fully erased using the Nu-Link Pro and the ICP tool. **
For simple evaluation and reflashing of Chili devices over USB or UART, the chilictl application can be used. This is a command line application, that allows high level control of connected Chili devices, including listing, inspecting, flashing and issuing them commands. More detailed information is available here.
In order to flash a connected Chili, it must have a version of the Cascoda SDK firmware on it of v0.14 or later, with either USB or UART enabled. The new firmware has the same requirement, which is met by every example application that isn’t sleepy.
Chilictl is failsafe, so if anything goes wrong during flashing, simply power cycle the device, and it will reboot into DFU mode where it can be reflashed.
Software requirements:
Windows-SDK.zip
folder on the releases page.
Chili2D-USB.zip
folder on the releases page.Hardware requirements:
Chilictl is a command line application used for working with Chili devices. A binary can be flashed using the chilictl flash
command, with the -f
flag specifying the binary file to flash.
# The -s argument is optional, and specifies the specific chili to flash (by serial number)
# Replace the path with your own path to the desired binary
$ ./chilictl.exe flash -s FBC647CDB300A0DA -f "../Chili2D-USB/ot-cli.bin"
2020-12-16 12:56:12.130 NOTE: Cascoda SDK v0.14 Dec 16 2020
Flasher [FBC647CDB300A0DA]: INIT -> REBOOT
Flasher [FBC647CDB300A0DA]: REBOOT -> ERASE
Flasher [FBC647CDB300A0DA]: ERASE -> FLASH
Flasher [FBC647CDB300A0DA]: FLASH -> VERIFY
Flasher [FBC647CDB300A0DA]: VERIFY -> VALIDATE
Flasher [FBC647CDB300A0DA]: VALIDATE -> COMPLETE
Chili2Ds ship with the USB bootloader pre-installed - in normal operation you will not need to flash the bootloader. However, Chilictl allows you to do so using the -df
flag.
$ ./chilictl.exe flash -s FBC647CDB300A0DA -df "../Chili2D-USB/ldrom_hid.bin"
2020-12-16 12:59:46.510 NOTE: Cascoda SDK v0.14 Dec 16 2020
Flasher [FBC647CDB300A0DA]: INIT -> REBOOT
Flasher [FBC647CDB300A0DA]: REBOOT -> ERASE
Flasher [FBC647CDB300A0DA]: ERASE -> FLASH
Flasher [FBC647CDB300A0DA]: FLASH -> VERIFY
Flasher [FBC647CDB300A0DA]: VERIFY -> VALIDATE
Flasher [FBC647CDB300A0DA]: VALIDATE -> COMPLETE
Note that when using the SEGGER J-Link, it is also possible to flash and debug from GDB.
The SEGGER J-Link in combination with J-Flash Lite can be used to simply flash a device with a given binary.
Software Requirements:
Hardware Requirements:
The Nu-Link Pro in combination with the Nuvoton ICP programming tool can be used to flash a device, change chip settings and fully factory erase a device.
Software Requirements:
Hardware Requirements:
Copyright (c) 2021 Cascoda Ltd.