Skip to main content

Programming operations

Erase device

  1. Connect to the device (see Connect device).
  2. Click the Erase button.
ModusToolbox™ Programmer erases the device and displays various messages in the Log. Then, a message in the Status Bar indicates that the device was erased successfully or that an error occurred.

Program device

  1. Connect the device to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. Select the programming file as described in Load programming file section.
  3. Connect to the device (see Connect device).
  4. Click the Program button.
ModusToolbox™ Programmer programs the device and displays various messages in the Log. Then, a message in the Status Bar indicates that device was programmed successfully or that an error occurred.

Program device and Reset Chip

  1. Connect the device to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. Select the programming file as described in the Load programming file section.
  3. Connect to the device (see Connect device).
  4. Select the Reset Chip check box under Program Settings.
  5. Click the Program button.
ModusToolbox™ Programmer programs the device and displays various messages in the Log. Then, a message in the Status Bar indicates that the device was programmed successfully or that an error occurred.

The target device is reset and running.

Program binary file with Offset

  1. Connect the device to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. Select a binary programming file as described in the Load programming file section.
  3. Connect to the device (see Connect device).
  4. Enter the desired address in the Offset field under Program Settings.
  5. Click the Program button.
ModusToolbox™ Programmer programs the device and displays various messages in the Log. Then, a message in the Status Bar indicates that the device was programmed successfully or that an error occurred.

Note:
Offset options is available only for binary programming files.

Program External Memory

  1. Attach and select a device that supports external memory (for example, CY8CKIT-062-WiFi-BT with QSPI support).
  2. Select the External Memory option under Program Settings.

  3. Select the programming file as described in the Load programming file section. The programming file should contain external memory region(s) and correct QSPI configuration data.
  4. For PSOC™ 6 devices only, select Erase/Program USER/TOC/KEY allowed option under Probe Settings > Sflash Restrictions.
  5. Connect to the device (see Connect device).
  6. Click the Program button.
ModusToolbox™ Programmer programs the device and displays various messages in the Log. Then, a message in the Status Bar indicates that the device was programmed successfully or that an error occurred.

Program PSOC™ 6/Control C3/Edge E84 MCU in JTAG chain via KitProg3/MiniProg4

  1. Connect the host computer to a MiniProg4 probe attached to several MCU targets in the JTAG chain.
    The following hardware configuration is used in this example:

    The sample JTAG chain configuration contains six serially-connected PSOC™ MCU targets.

  2. Select the MiniProg4 probe and target device in the Programmer/Board ID, Board Name, and Device drop-downs, and ModusToolbox™ Programmer will display information under Probe Settings. Ensure the JTAG chain is powered.
  3. Select the JTAG interface in the Interface drop-down.

    ModusToolbox™ Programmer queries the JTAG chain and displays detected devices under the JTAG Chain option in Probe Settings. The list of devices in the chain contains target names for supported devices and ID codes for those which are not supported.

  4. Select the desired target device in the list by clicking the radio button next to the target name.
  5. Select the programming file as described in the Load programming file section.
  6. Click Connect. ModusToolbox™ Programmer communicates with the device and displays various messages in the Log. Then, a message in the Status Bar indicates that it is connected.

  7. Click the Program button.
ModusToolbox™ Programmer programs the device and displays various messages in the Log. Then, a message in the Status Bar indicates that the device was programmed successfully or that an error occurred.

Program PSOC™ 6/Control C3/Edge E84 MCU in JTAG chain via J-Link probe

  1. Connect the host computer to a J-Link probe attached to several MCU targets in the JTAG chain. Ensure all connected targets support JTAG interface.
  2. Select the J-Link probe and target device in the Programmer/Board ID, Board Name, and Device drop-downs, and ModusToolbox™ Programmer will display information under Probe Settings. Ensure the JTAG chain is powered.
  3. Select the JTAG interface in the Interface drop-down. ModusToolbox™ Programmer queries the JTAG chain and displays detected devices under the JTAG Chain option in Probe Settings. The list of devices in the chain contains target names for supported devices and ID codes for those which are not supported.

  4. Select the desired target device in the list by clicking the radio button next to the target name.
  5. Additionally select the desired target name in Device drop-down.

  6. Select the programming file as described in the Load programming file section.
  7. Click Connect. ModusToolbox™ Programmer communicates with the device and displays various messages in the Log.
  8. Click the Program button.
Note:
Programming a device in a multi-device chain using a J-Link probe is not supported for PSOC™ Edge E84 (PSE84), XMC7000 / TRAVEO™ T2G, and PSOC™ Control C3 devices. For these families, the J-Link device-connect sequence assumes a single-device chain and cannot acquire the target. As a workaround, place the device alone on the JTAG chain, use the SWD interface with single device, or use a MiniProg4 / KitProg3 probe.

Verify device

  1. Connect the device to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. Select the programming file as described in the Load programming file section.
  3. Connect to the device (see Connect device).
  4. Click the Verify button.
ModusToolbox™ Programmer performs the Verify device operation and displays various messages in the Log. Then, a message in the Status Bar indicates that the device was verified successfully or that an error occurred.

Verify device with External Memory

  1. Connect the device that supports external memory (for example, CY8CKIT-062-WiFi-BT with QSPI support) to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. Select the programming file as described in the Load programming file section. The programming file should have external memory region(s).
  3. Select the External Memory option under Program Settings.
  4. Connect to the device (see Connect device).

  5. Click the Verify button.
ModusToolbox™ Programmer verifies the device and displays various messages in the Log. Then, a message in the Status Bar indicates that the device was verified successfully or that an error occurred.

Verify custom flash regions

  1. Connect the device to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. Select the programming file as described in the Load programming file section.
  3. Connect to the device (see Connect device).
  4. Expand Verify Regions option in Program Settings to see the list of flash regions available for verification. By default, only supported by target device regions are displayed:
    • application
    • AUXflash
    • Sflash
    • eFuse
    • QSPI


  5. Right-click on Verify Regions or any region entry to open the context menu.

  6. To add a custom flash region, select Add Region. Select the added list entry, and enter the correct values for start and end addresses of the region.

  7. To remove any region in the list, right-click the desired region entry and select Remove Region.

  8. To revert any previous change, select Undo.
  9. When finished with the list of regions, start device verification by clicking the Verify button on the toolbar.

    You can also select Verify on the context menu.

    ModusToolbox™ Programmer verifies only the regions specified in the Verify Regions list. Then, a message in the Status Bar indicates that the device was verified successfully or that an error occurred.

  10. To reset the Verify Regions list to its default state select Reload Regions from the context menu. This action will remove all custom regions and load default regions corresponding to the flash map.

Read device

  1. Connect the device to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. Connect to the device (see Connect device).
  3. Click the Read button.

  4. On the Read Device to File dialog, navigate to the location of the HEX or SREC file to be saved, enter the file name, select the file type in the Save as type drop-down, and click Save.

Note:
Under Ubuntu Linux, specify the full file name with an extension (e.g. kp3-dev.srec); otherwise, the file will be saved in HEX format.
ModusToolbox™ Programmer performs the Read device operation and displays various messages in the Log. Then, a message in the Status Bar indicates that the device was read successfully or that an error occurred.

Note:
Read Device feature is not available for the boards based on WICED-Bluetooth hardware programmers.

Program eFuse region of PSOC™ 6/TRAVEO™ T2G/XMC7xxx/XMC5xxx MCU

  1. Connect the device to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. Select the programming file as described in the Load programming file section. The programming file should contain valid eFuse data region (at address 0x90700000).
  3. Select the Program Security Data check box under Program Settings.

  4. Connect to the device (see Connect device).
  5. Click the Program button.
ModusToolbox™ Programmer programs the device and displays various messages in the Log. Then, a message in the Status Bar indicates that the device was programmed successfully or that an error occurred.

If some eFuse bits have been already programmed before, a warning message "The efuse bit at address xx has been already blown" appears in Log.

Program chip-protected/Kill Mode for PSOC™ 4 MCU

The chip-level protection mechanism restricts access of the programmer application to silicon resources. In this mode, access to flash, SRAM, and most of the registers in the PSOC™ 4, PMG1, PAG2s, and CCGx are disabled.

If you try to connect ModusToolbox™ Programmer to a chip-protected PSOC™ 4/CCGx device, a warning message indicates that the device is in protected mode. The only available operation is Erase device in this case.

Use the Erase button to clear chip protection and move target to the open state.

Switch to Protected mode

This operation temporarily disables access to chip's resources.
  1. Connect the device to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. Select the Chip Protection pull-down and select Protected mode.
    A warning message asking for confirmation is displays.

  3. Click Yes to apply Protected mode for your PSOC™ 4, PMG1, PAG2S and CCGx.

When the operation completes, the log is appended with a message, and the device is disconnected from the programmer automatically.



Switch to Kill mode

Attention:
Be aware that after applying Kill mode your device will be permanently locked from any external debugger or programmer software. This operation is not reversible.
  1. Connect the device to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. To use Kill mode, go to Options > Programmer Options and enable it in PSOC 4 Kill Mode drop-down.

  3. Connect to the device (see Connect Device).
  4. Click the Chip Protection pull-down and select Kill mode.
    A warning message asking for confirmation is displays.

  5. Click Yes to apply Kill mode for your PSOC™ 4, PMG1, PAG2S and CCGx.
When the operation completes, the log is appended with a message, and the device is disconnected from the programmer automatically.

Program secure AIROC™ CYW20829 MCU

You can program the flash of an AIROC™ CYW20829 device in Secure lifecycle mode only by providing a valid debug certificate file.

  1. Connect the device to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. Select the programming file as described in the Load programming file section.
  3. Click on the Debug Certificate option under Program Settings and select the certificate file in the dialog.
    The path will display under Settings.

  4. Connect to the device (see Connect device).
  5. Click the Program button.

Program secure PSC3/PSE84 MCUs via J-Link hardware programmer

The Infineon PSOC™ Control C3 and PSOC™ Edge E8 series support secure debug/programming by using AP access authentication with a signed debug token. PSOC™ Control and PSOC™ Edge AP access authentication is implemented in appropriate “.pex” script files. Full information about the secure flow can be found on these webpages:

https://kb.segger.com/Infineon_PSOC_Control_C3_Debug_Port_Authentication

https://kb.segger.com/Infineon_PSoC_Edge_E8_Debug_Port_Authentication

PSOC™ Control C3 secure program flow

  1. Connect PSOC™ Control C3 kit with target in Secure lifecycle.
  2. Go to the Segger software tools installation folder; for example , C:\Program Files\SEGGER\JLink_V958.
  3. Perform AP access authentication by uploading the debug token and letting BootROM enable the CM33 AP.
  4. Run the DevPro command from a terminal passing the path to Debug certificate via the DebugCertFile param:
    DevPro.exe -operation DebugAccessPortAuth -SetConfigVal DebugCertFile="c:/tmp/debug_token.bin" -SetConfigVal DebugCertKeyType=OEM_ROT -ScriptFile "PCode_DevPro_Infineon_PSC3_DebugAuth.pex" -if SWD -speed 1000

    Output example:

    SEGGER Device Provisioner V9.58 Compiled Jul 9 2026 15:58:54
    Command line: -operation DebugAccessPortAuth -SetConfigVal DebugCertFile=c:/tmp/debug_token.bin -SetConfigVal DebugCertKeyType=OEM_ROT -ScriptFile PCode_DevPro_Infineon_PSC3_DebugAuth.pex -if SWD -speed 1000
    Firmware: J-Trace PRO V2 Cortex compiled Dec 4 2024 17:58:20
    S/N: 932000692
    
    J-Link log: CM33 AP is closed.
    J-Link log: Debug certificate has been uploaded to the target
    J-Link log: Token validation is successful
    J-Link log: CM33 AP become available
    J-Link log: AP access authentication succeeded
    Note:
    The “AP access authentication succeeded” log message is displayed on success.
  5. Run mtb-programmer, select your PSOC™ Control C3 device, select the programming file and click on Secure Device check box:

  6. Press Connect and Program.

PSOC™ Edge E8 secure program flow

  1. Connect PSoC Edge E8 kit with target in Secure lifecycle.
  2. Go to the Segger software tools installation folder; for example, C:\Program Files\SEGGER\JLink_V958.
  3. Perform AP access authentication by uploading the debug token and letting BootROM enable the CM33 AP.
  4. Run the DevPro command from terminal passing the path to Debug certificate via the DebugCertFile param:
    DevPro.exe -operation DebugAccessPortAuth -SetConfigVal DebugCertFile="c:/tmp/debug_token.bin" -SetConfigVal DebugCertKeyType=OEM_ROT -ScriptFile "PCode_DevPro_Infineon_PSoC_E8_DebugAuth.pex" -if SWD -speed 1000
  5. Ensure the AP access authentication succeeded message present in logs.
  6. Follow same steps 5-6 from PSOC™ Control C3 secure program flow.

Program QSPI memory with patched flashloader via KitProg3/MiniProg4

This feature is supported by AIROC™ CYW20829 devices, as well as PSOC™ Edge E84, XMC7100/7200 and CYT4Bx MCUs. It allows you to specify the patched flashloader file in FLM format along with the appropriate QSPI configuration. Patched flashloaders contain data about how your external memory is configured.

  1. Connect the device to the host computer and select it in the Programmer/Board ID, Board Name, and Device drop-downs.
  2. Select the programming file as described in the Load programming file section.
  3. Select the External Memory option under Program Settings (if supported).
  4. Click on the Flashloader option under Program Settings and select the patched flashloader (FLM) file in the dialog.
    The path will display under Settings.

  5. Connect to the device (see Connect device).
  6. Click the Program button.
Note:
To be able to program custom QSPI memory, you should also provide the appropriate QSPI configuration file (qspi_config.cfg) generated by the ModusToolbox™ QSPI Configurator tool. This file should be placed in the same directory as the patched flashloader file; it is located and read by ModusToolbox™ Programmer automatically.

Refer to the QSPI Configurator user guide for more information about patching flashloaders.

Program QSPI memory with patched flashloader via J-Link probe

This procedure is based on the SEGGER "J-Link Device Support Kit" article (https://kb.segger.com/J-Link_Device_Support_Kit). It lets you supply a custom flashloader for your specific external QSPI flash and program it through a J-Link probe. As an example, we program the external Octal-SPI flash on the PSOC™ Edge E84 Evaluation Kit.

  1. Locate the JLinkDevices folder on your system as described in the "JLinkDevices folder" section of the "J-Link Device Support Kit" article. Create it if it does not exist.
  2. Go to the mtb-programmer install location (on Windows: C:\Infineon\Tools\ModusToolboxProgtools-2.0\mtb-programmer) and copy the flashloader scripts\CAT1D\PSE84_OCTAL_DDR_SFDP_SMIF.FLM into the JLinkDevices folder.
    Note:
    The Loader path in the XML below is resolved relative to the XML file. Keep the .FLM file in the same folder as the XML you create in step 3.
  3. In the JLinkDevices folder, create a new XML file (for example, Devices.xml) and define a new device that inherits from the base PSE846GP_EPC2_M33 device and overrides its SMIF flash banks with the custom loader, as described in the "Adding a flash loader" section of the article:
    <DataBase>
      <Device InheritFrom="PSE846GP_EPC2_M33">
        <ChipInfo Vendor="Infineon" Name="PSE846GP_EPC2_M33_octal_sfdp"/>
        <FlashBankInfo Name="SMIF0_NS" BaseAddr="0x60000000" MaxSize="0x08000000" Loader="PSE84_OCTAL_DDR_SFDP_SMIF.FLM" LoaderType="FLASH_ALGO_TYPE_CMSIS" AlwaysPresent="0" />
        <FlashBankInfo Name="SMIF0_S" BaseAddr="0x70000000" MaxSize="0x08000000" Loader="PSE84_OCTAL_DDR_SFDP_SMIF.FLM" LoaderType="FLASH_ALGO_TYPE_CMSIS" AlwaysPresent="0" />
      </Device>
    </DataBase>
    Note:
    0x60000000 (non-secure) and 0x70000000 (secure) are two address views of the same physical device. Set MaxSize to at least the size of the region you program. For the 1 Gbit (128 MByte) part in this example, use 0x08000000; adjust it to match your flash.
  4. Connect the J-Link probe and the PSE84 target to the host, start mtb-programmer, select the J-Link probe, and choose the newly created PSE846GP_EPC2_M33_octal_sfdp device in the Device drop-down.

  5. Select the programming file as described in the Load programming file section.
  6. Under Program Settings, enable the External Memory option.
  7. Click Connect, then click Program.
Note:
The same approach — copying the appropriate .FLM flashloader into the JLinkDevices folder and defining a derived device that overrides its external-memory (Octal-SPI/QSPI) FlashBankInfo entries — can be used to supply a custom flash loader for other device families supported over J-Link, such as XMC7xxx, TRAVEO™ T2G (CYT), and CYW20829. Inherit from the corresponding base J-Link device for the target family and adjust the flash bank base address, MaxSize, and Loader to match your external flash.

Program AIROC™ CYW955513EVK-01, CYW955913EVK-01, and CYW9M2BASE-43012BT boards

  1. Connect the device to the host computer and perform recover device procedure as described in How to recover AIROC™ Bluetooth® devices on failure.
  2. Click the Programmer pull-down and select 'WICED Bluetooth-PortXX' programmer.

    Note:
    The CYW9M2BASE-43012BT board should be switched to Dual UART mode first, otherwise the WICED Bluetooth® programmer will be unavailable in the Board Name pull-down menu. To do this, press the hardware 'Mode' button on the Kit, hold it for 3 seconds, then release it.
  3. Open the Board Name pull-down and select the appropriate board name (e.g., CYW955513EVK-01)
  4. Select the programming file as described in the Load programming file section.
  5. Connect to the device (see Connect device).
  6. Click the Program button.

ModusToolbox™ Programmer programs the device and displays various messages in the Log. Then, a message in the Status Bar indicates that the device was programmed successfully or that an error occurred.

Update KitProg3 Board Name

Some KitProg3 development kits were released to market with missing board configuration in the EEPROM. In this case, the Programmer/Board ID displays the kit as generic KitProg3 device as:

KitProg3 CMSIS-DAP Bulk-1014091C02179400

Some development kits may require updating the name of the board after changing SOM modules on them for example:

KIT_PSE84_EVAL_EPC2 (EPC4).

  1. Click on the Board Preferences button to update the name of your kit. The Board Preferences dialog opens.
  2. As needed, click on the Show all boards check box to display the full list of supported names.

  3. Select the correct board name for your kit in the list and click the Update button.

    The tool checks if the selected name corresponds to the actual connected KitProg3 device. Board configuration is updated in the EEPROM of KitProg3. The success status and a new board name are displayed.

    Note:
    The “Device not updated” error means an incorrect kit name was selected.
  4. Click the Close button, the dialog closes and the updated board name displays in the pull-downs.

Last updated on