The KitProg3/MiniProg4 probe implements the CMSIS-DAP protocol defined by Arm® with some extensions. Consequently, the KitProg3/MiniProg4 driver in OpenOCD is a wrapper around the native CMSIS-DAP driver that extends its functionality with the KitProg3-specific extensions.

A full list of the CMSIS-DAP-specific configuration commands can be found in the OpenOCD official documentation.

Besides the standard CMSIS-DAP options, the KitProg3 driver exposes several custom Tcl configuration commands. All commands in this section must be prefixed with the name of the driver – "kitprog3".

kitprog3 acquire_config

The command controls device acquisition parameters and optionally enables acquisition during the early initialization phase. Can be called at any time.

acquire_config <status> [target_type] [mode] [attempts] [timeout] [ap]
  • status – A mandatory parameter, enables or disables the acquisition procedure during the initialization phase. The possible values: On, Off.
  • target_type

    – Specifies the target device type. This parameter is mandatory only if

    status=on

    . The possible values:

    • 0 – PSOC 4

    • 1 – PSOC 5

    • 2 – PSOC 6

    • 3 – T2G, XMC7xxx and XMC5xxx

    • 4 – AIROC

  • mode

    – Specifies the acquisition mode. This parameter is mandatory only if

    status=on

    . The possible values: 0 – Reset, 1 – Power Cycle. The mode affects only the first step (how to reset the part at the start of the acquisition flow).

    • Reset mode: To start programming, the host toggles the XRES line and then sends SWD/JTAG commands

    • Power Cycle mode: To start programming, the KitProg3-based probe powers on the MCU and then starts sending the SWD/JTAG commands. The XRES line is not used. Power Cycle mode support is optional and should be used only if the XRES pin is not available on the part's package.

      Note:

      Before using Power Cycle acquisition, make sure that the target is not powered externally!

  • attempts

    – The number of attempts to acquire the target device. This parameter is ignored when

    status=on

    .

  • timeout

    – (Optional) Timeout value in seconds. The maximum value for the timeout is 30 seconds.

  • ap– Access port to use for the acquisition. The value of this parameter should be in range 0…255. This parameter is mandatory if the

    timeout

    parameter is specified.

Example (KitProg3 & PSOC™ 6 MCU):

openocd -s ../scripts -f interface/kitprog3.cfg -f target/infineon/cy8c6xxx.cfg -c "kitprog3 acquire_config on 2 0; init; reset init; shutdown"

kitprog3 acquire_psoc

Performs device acquisition. Can be called at any time. The acquisition procedure must be configured using

acquire_config

before calling this command.

Example (KitProg3 & PSOC™ 6 MCU):

:

openocd -s ../scripts -f interface/kitprog3.cfg -f target/infineon/cy8c6xxx.cfg -c "kitprog3 acquire_config on 2 0; init; kitprog3 acquire_psoc; reset init; shutdown"

kitprog3 power_config

Controls the KitProg3-internal power supply parameters and optionally enables power during the early initialization phase. Can be called at any time.

kitprog3 power_config <status> [voltage]
  • status

    –Mandatory; enables or disables power supply during the initialization phase. Possible values: on|off.

  • voltage– The power supply voltage in millivolts. This parameter is optional. Either default (2.5 volts) or kit-specific voltage will be applied if this parameter is not specified.

Example (KitProg3 & PSOC™ Edge MCU):

openocd -s ../scripts -f interface/kitprog3.cfg -f target/infineon/pse84xgxs2.cfg -c "kitprog3 power_config on 3300; init; shutdown"

kitprog3 led_control

Controls the KitProg3 LEDs. Can be called only after the initialization phase.

kitprog3 led_control <type>
  • type

    – Mandatory; specifies the type of the LED indication. The possible values:

    • 0 – Ready

    • 1 – Programming

    • 2 – Success

    • 3 – Error

Example:

openocd -s ../scripts -f interface/kitprog3.cfg -f target/infineon/pse84xgxs2.cfg -c "init; kitprog3 led_control 2"

kitprog3 get_power

Reports the target voltage in millivolts. Can be called only after the initialization phase.

Example:

openocd -s ../scripts -f interface/kitprog3.cfg -f target/infineon/pse84xgxs2.cfg -c "init; kitprog3 get_power; shutdown"