This section lists and describes the commands that can be used with the fw-loader tool.

Command-line option

Description

--help

Displays the list of supported commands with their descriptions

--device-list

Displays the list of connected supported KitProg3-based devices

--update-kp2

Updates the Firmware of the KitProg-based device to KitProg2

--update-kp3

Updates the Firmware of the KitProg-based device to KitProg3

--mode

Switches the mode of the KitProg3-based device

--info

Returns the KitProg3-based device info based on Unique ID Record

--set-kp3-gpio-pin

Sets desired operational mode and state on GPIO pin of KitProg3-based device

--read-kp3-gpio-pin

Displays the current state of GPIO pin of KitProg3-based device

--set-kp3-flow-control

Sets requested UART flow control mode for a requested KitProg3 UART

--get-kp3-flow-control

Retrieved the UART flow control mode set doe a requested KitProg3 UART

--help

This command displays the list of supported commands with their descriptions. Running the fw-loader tool without arguments returns the same information.

Examples:

fw-loader 
fw-loader --help

Return

Status return code – 0.

--device-list

This command lists the connected KitProg2-based and KitProg3-based devices in the following format:

KitProg<X> <mode>-<serial-num> firmware version <firmware-version> [outdated]
  • X

    – generation of KitProg firmware, e.g., 2, 3

  • mode- Bootloader, CMSIS-DAP HID, CMSIS-DAP BULK, DAPLink CMSIS-DAP. For KitProg2, only one mode is supported
  • serial-num

    • serial number of KitProg2-based/KitProg3-based device
  • Firmware-version

    • the version of the KitProgX being run
  • [outdated]

    – displayed only if the KitProg3 firmware is not up-to-date

Note:

For KitProg3-based devices in dual-UART operational mode (refer to the

KitProg3 User Guide

), the mode will be displayed as in bulk – "CMSIS-DAP BULK".


Examples:

fw-loader ––device-list

Return


Expected output if no supported KitProg3-based devices are connected:

"No connected devices"

message

In other cases, the list of devices displays.

--update-kp2 [full-device-name | serial-num | all]

This command downgrades a KitProg3-based device to KitProg2 firmware. Specify the full device name or serial number if multiple supported KitProg3-based devices are connected, or use the option "all" to update all connected KitProg3-based devices.

MiniProg4 probe does not support KitProg2 firmware. See

Troubleshooting

section to retrieve MiniProg4 from KitProg2.

KitProg2 supports two modes: CMSIS-DAP and Proprietary. Only the Proprietary mode supports the bootloader and therefore only in this mode is KitProg2 visible to the fw-loader tool. Only KitProg3 bulk mode is supported for switching to Proprietary KitProg2 mode via fw-loader. Use the

Mode Switch

button to switch KitProg2 to Proprietary mode.

Note:

Downgrade to KitProg2 firmware is allowed only for these development kits: CY8CKIT-062-BLE, CY8CKIT-062-WIfi-BT, CY8CPROTO-063-BLE, CY8CKIT-041-40XX, CY8CKIT-041-41XX, CY8CKIT-048, CY8CKIT-145-40XX, CY8CKIT-146, CY8CKIT-147, CY8CKIT-148, and CY8CKIT-149.

Examples:

fw-loader –-update-kp2
fw-loader --update-kp2 all

If option "all" was chosen and any error has occurred – upcoming updates will be skipped.

--update-kp3 [full-device-name | serial-num | all]

This command upgrades a KitProg2-based/KitProg3-based device to KitProg3 firmware. Specify the full device name or serial number if multiple KitProg3-based devices are connected or use the option "all" to update all connected supported devices.

Examples:

fw-loader –-update-kp3
fw-loader --update-kp3 all
fw-loader –-update-kp3 121902F302098400
fw-loader –-update-kp3 "KitProg3 CMSIS-DAP BULK-121902F302098400"

If you specified option "all" and any error occurred, the upcoming updates will be skipped.

--mode <mode> [full-device-name | serial-num]

This command switches the KitProg3-based device operational mode. Specify the KitProg3-based device name or serial number if multiple supported development kits or probes are connected.

Note:

This command is not supported for KitProg2 devices.

Supported modes include:

  • kp3-hid

  • kp3-bulk

  • kp3-bootloader

  • kp3-daplink

  • kp3-dualuart

On Windows hosts, the

kp3-bulk

mode cannot support simultaneous I

2

C/SPI bridging (e.g. for CAPSENSE™ tuning). Switch to

kp3-hid

mode instead.

Examples:

fw-loader –-mode kp3-hid
fw-loader –-mode kp3-daplink
fw-loader –-mode kp3-bootloader 121902F302098400
fw-loader –-mode kp3-bootloader "KitProg3 CMSIS-DAP BULK-121902F302098400"

--info [full-device-name | serial-num]

Displays the parsed KitProg3 Unique ID Record information. Supported on KitProg3-based devices only with KitProg3 Unique ID set; otherwise, the fw-loader tool will return "<full-device-name> has no valid info available" error. The full device name or serial number should be specified if multiple KitProg3-based devices are connected.

Examples:

fw-loader –-info
fw-loader –-info 121902F302098400
fw-loader --info "KitProg3 CMSIS-DAP BULK-121902F302098400"

--set-kp3-gpio-pin <pin_number> <pin_mode> <state> [full-device-name | serial-num]

Sets the desired operational mode and state on the KitProg3 GPIO pin. This is supported on KitProg3 devices with GPIO Bridging feature. For the list of devices with GPIO bridging feature, refer to the

KitProg3 user guide

.

  • The

    <pin_number>

    consists of two numbers XY, where X is the port number and Y is the pin number on the dedicated port. Supported port and pin combinations are listed in the

    KitProg3 user guide

    or kit documentation.

  • Supported operational modes <pin_mode> are:

    • HiZ (High-Impedance Digital)

    • ResUp (Resistive Pull Up)

    • ResDown (Resistive Pull Down)

    • OdLow (Open Drain, Drives Low)

    • OdHigh (Open Drain, Drives High)

    • DmStr (Strong Drive)

    • ResUpDwn (Resistive Pull Up & Pull Down)

  • Supported states

    <state>

    are 0 and 1.

Note:

Trying to set an invalid combination of

<pin_mode>

and

<state>

, such as HiZ and 0 or HiZ and 1, will result in an error due to undefined behavior.

Examples:

fw-loader --set-kp3-gpio-pin 35 ResUp 0 
fw-loader --set-kp3-gpio-pin 35 ResUp 0 121902F302098400
fw-loader --set-kp3-gpio-pin 35 ResDown 1 "KitProg3 CMSIS-DAP BULK-121902F302098400"

--read-kp3-gpio-pin <pin_number> [full-device-name | serial-num]

Reads the current state on the GPIO pin. This is supported on KitProg3 devices with the GPIO Bridging feature. For a list of devices with GPIO bridging feature, refer to the

KitProg3 user guide

.

  • <pin_number>

    consists of two numbers XY, where X is the port number and Y is the pin number on the dedicated port. Supported port and pin combinations are listed in the KitProg3 user guide.

Examples:

fw-loader --read-kp3-gpio-pin 36
fw-loader --read-kp3-gpio-pin 36 121902F302098400
fw-loader --read-kp3-gpio-pin 35 "KitProg3 CMSIS-DAP BULK-121902F302098400"

--set-kp3-flow-control <port_number> <mode> [full-device-name|serial-num]

Configures the UART flow control mode of the KitProg3 UART for a KitProg3-based device. If multiple supported KitProg3-based devices are connected, specify the full device name or serial number. This is applicable only for KitProg3-based devices where UART HW flow control is supported. These can be found in the KitProg3 User Guide.

  • <port_number>

    is the requested KitProg3 UART port.

  • <mode>

    is the requested UART flow control mode; none/hardware values are supported.

Examples:

fw-loader –-set-kp3-flow-control 0 none
fw-loader –-set-kp3-flow-control 0 hardware 121902F302098400
fw-loader –-set-kp3-flow-control 1 none "KitProg3 CMSIS-DAP BULK-121902F302098400"

--get-kp3-flow-control <port_number> [full-device-name|serial-num]

Retrieves the UART flow control mode of the KitProg3 UART for a KitProg3-based device. If multiple supported KitProg3-based devices are connected, specify the full device name or serial number. This is applicable only for KitProg3-based devices where UART HW flow control is supported. These can be found in the KitProg3 User Guide.

  • <port_number>

    is the requested KitProg3 UART port.

Examples:

fw-loader –-get-kp3-flow-control 0 
fw-loader –-get-kp3-flow-control 1 121902F302098400