Product Comparison: USB I2C | USB SPI | USB GPIO

USB PIC Bootloader. User Manual


8.3. Fw_update Application

The fw_update application allows you to update microcontroller firmware. To update microcontroller's firmware you should switch your microcontroller to firmware mode and connect it to USB. The fw_update application supports the following commands(Table 8.3, “Fw_update commands”):

Table 8.3. Fw_update commands

Short CommandFull CommandDescription
-w-writeWrite data to device.
-r-readRead data from device.
-v-verifyVerify device memory.
-e-eraseErase device memory.
-ver-versionDisplay versions of fw_update and Bootloader if present.
-h-helpDisplays the supported commands and options description.

The fw_update application supports the following options(Table 8.4, “Fw_update options”):

Table 8.4. Fw_update options

Short OptionFull OptionParameter ValueDescription
-m-memoryMEMORY TYPEMemory type for read, write and verify operations. Possible values: flash, eeprom, id, all. Default: flash.
-vid-vendoridVIDDevice vendor ID.
-pid-productidPIDDevice product ID.
-t-resetYES | NOReset device after operation is finished. Default: YES
-s-sizeSIZEThe data size for read, write and verify operations.
-a-addressADDRThe start address for read, write and verify operations. Default: 0x800 for flash, 0x00 for other memory types.
-ix-image_hex_inFILENAMEImage file in Intel Hex Format for write and verify operations.
-ib-image_bin_inFILENAMEImage file in Binary Format for write and verify operations.
-ox-image_hex_outFILENAMEImage file in Intel Hex Format for read operation to save data.
-ob-image_bin_outFILENAMEImage file in Binary Format for read operation to save data.
-d-dataDATAImmediate mode - actual byte(s) specified in the command line. Data for write and verify operations must be provided as string of two hex digits per byte (like 01202040ac). For read operation data is printed on screen.

For instanse, we need to perform microcontroller firmware update. The command line for such operation is:

fw_update -e -w -v -vid 0x04D8 -pid 0xFF04 -ix example_encrypted.hex