Zigbee projects in the Trident IoT SDK rely on a custom secure bootloader that ensures devices boot safely and can be updated reliably in the field. The bootloader plays a critical role in both device security and firmware management, providing the foundation for features such as secure upgrades, partition management, and recovery mechanisms.
Main Decision Flow:
Key Security Features:
Special Behaviors:
Other Considerations:
The Trident bootloader uses cryptographic signature verification to ensure only authorized firmware can be executed. This requires specific manufacturing tokens to be programmed during device production containing the public key components used for ECDSA P-256 signature verification. See Key Files for how these keys are used in the build system.
The bootloader requires two manufacturing tokens to be programmed with the public key coordinates:
| Token Name | Description | Size |
|---|---|---|
| TR_MFG_TOKEN_SIGNED_BOOTLOADER_KEY_X | X coordinate of ECDSA P-256 public key | 32 bytes |
| TR_MFG_TOKEN_SIGNED_BOOTLOADER_KEY_Y | Y coordinate of ECDSA P-256 public key | 32 bytes |
Signature Structure
The bootloader expects signatures to be stored immediately after the firmware image with the following format:
| Offset | Size | Field | Description |
|---|---|---|---|
| 0x00 | 4 bytes | Magic Pattern | Must be 0x58BF4E53 |
| 0x04 | 4 bytes | Image Size | Size of the signed image in bytes |
| 0x08 | 32 bytes | Signature R | R component of ECDSA signature |
| 0x28 | 32 bytes | Signature S | S component of ECDSA signature |
Bootloader Verification Process
The bootloader performs the following verification steps:
The Trident bootloader includes an XMODEM feature that allows firmware upload via serial connection.
XMODEM Characteristics:
For detailed protocol specifications, see XMODEM Protocol Wiki.
XMODEM Activation:
To activate an XMODEM transfer the bootloader must have a UART configured and connected to an XMODEM host. The T32CM11 bootloader has this configured by default to be connected over the UART found on the DKNCM11 development board. This defaults to UART0, 115200 baud, 8 data bits, 1 stop bit, no parity, and no flow control.
Additionally, MFG token TR_MFG_TOKEN_SERIAL_BOOT_DELAY_SEC must be written to a value other than 0 or 0xFF. This token is used to tell the bootloader how long to wait for an ascii 'x' character to be received in order to enter XMODEM transfer mode.
TR_MFG_TOKEN_SERIAL_BOOT_DELAY_SEC usage:
| Token Value | Behavior |
|---|---|
| 0x00 | No delay - skip XMODEM check and boot immediately |
| 0x01-0xFE | Wait N seconds for 'x' character before booting |
| 0xFF | No delay - skip XMODEM check and boot immediately |
Once XMODEM mode has been activated, use an existing XMODEM transfer utility such as TeraTerm or minicom to transfer the desired file to the device. It is recommended to transfer the signed.bin file that is created as part of the build. See Files to Flash
Summary: