Global variables
The global variables listed in this section control the behavior of a target configuration file (e.g., psoc6.cfg). They are set in the command-line before any configuration file such as kitprog3.cfg or psoc6.cfg. See the command set for details.
- PSOC™ 6 MCU global variables
- PSOC™ 4 MCU global variables
- AIROC™ CYW20829 Wi-Fi & Bluetooth® combo chip global variables
- XMC7xxx/XMC5xxx and TRAVEO™ T2G global variables
- PSOC™ Control C3 global variables
- PSOC™ Edge E84 global variables
PSOC Edge E84 global variables
ENABLE_ACQUIRE
Enables or disables the acquisition of the target device in test mode.
Possible values:
- 1 – Test mode acquisition enabled (default, recommended)
- 0 – Test mode acquisition disabled (used for attaching to the running target, not recommended for programming and debugging)
For PSOC™ Edge E84, Test mode acquisition is implemented for MiniProg4, KitProg3, J-Link, and cmsis-dap probes via SWD and JTAG protocols. For the slow host PC, however, or when using USB virtualization, and for the devices with small Listen window duration, it is recommended to use MiniProg4/KitProg3 and SWD.
ENABLE_CM33, ENABLE_CM55
Specifies the CPU cores' visibility to OpenOCD. Useful for single or multi-core applications debugging.
Possible values:
- 1 – Core is enabled.
- 0 – Core is disabled.
Only CM33 core is enabled by default, allowing any application programming and allowing debugging of CM33-based applications. CM55 core is disabled after reset, and enabling it in OpenOCD is recommended only for CM55 or Multi-Core applications debugging. When enabling CM55, the CM33 core must also be enabled.
DEBUG_CERTIFICATE
Specifies the location of the debug certificate (token) binary file to re-enable the CPU Access Port(s) for programming and debugging operations if the port(s) was closed per applied policies.
Debug certificate is of no use if the policy for Access Port is ‘permanent disable’.
DEBUG_CERTIFICATE_ADDR
(Optional) Specifies the SRAM location where the debug certificate (token) will be loaded. The default address is 0x34000000.
SMIF_BANKS
Defines QSPI memory banks. This variable is a two-dimensional associative Tcl array of the following format:
set SMIF_BANKS {
1 {addr <XIPaddr1> size <BankSz1>}
2 {addr <XIPaddr2> size <BankSz2>}
...
N {addr <XIPaddrN> size <BankSzN>}
}
Where:
XIPaddrN– XIP mapping addressBankSzN– Total size of this flash bank, in bytes
RRAM_MAIN_OFFSET
Defines the offset for the users’ space in the RRAM_MAIN_NVM region, to exclude the system data and proprietary boot assets from programming operations. The default value is 0x11000.
Users may free up to 28 KB at the start of the programmable RRAM region by replacing the extended boot image and setting the appropriate offset in the OpenOCD command line.
Example:
openocd -s scripts -f interface/kitprog3.cfg -c "set RRAM_MAIN_OFFSET 0xA000" -f target/infineon/pse84xgxs2.cfg -c "init; reset init; flash banks; shutdown"
openocd -s scripts -f interface/kitprog3.cfg -c "set RRAM_MAIN_OFFSET 0xA000" -f target/infineon/pse84xgxs4.cfg -c "init; reset init; flash banks; shutdown"
Refer to “PSOC™ Edge MCU Programming Specifications” for the NVM memory definitions. Refer to “Getting started with PSOC™ Edge security” application note for the details of replacing the extended boot image.
PSOC Control C3 global variables
ENABLE_ACQUIRE
Enables or disables the acquisition of the target device in test mode.
Test mode acquisition is an Infineon method for acquiring or ‘unbricking’ a device in case of critical user application misbehavior; for example, repurposing debug pins or disablement critical clocks. Test mode is a sequence of reset and requesting bootloader for not launching user application.
For PSOC™ Control C3, Test mode acquisition works for mp4/kp3/jlink and swd/jtag, but in the most harsh cases described it is recommended to use mp4/kp3 + swd.
The main goal of test mode acquisition is to prevent launching the user application as a part of target acquisition. Also, the option must be set to enable WFA acquisition (procedure of unlocking AP by means of debug certificate).
Possible values:
- 1 – Test mode acquisition enabled (default).
- 0 – Test mode acquisition disabled.
DEBUG_CERTIFICATE_RQST
Specifies the type of the debug request token. To be used for secure debugging of the memory regions protected by protected firmware or OEM application policies.
Possible values:
- OEM – OEM application (default).
- PROT_FW – for protected firmware.
DEBUG_CERTIFICATE
Specifies location of the debug certificate binary file. This file is needed to configure a secure debug session in cases when CM33 access port is closed due to policies applies. OpenOCD checks status of the CM33 access port during initialization phase and after each reset. If it’s closed, it attempts to reopen the CM33 AP by sending a debug certificate to target and issuing WFA request. This variable should contain the full path to the debug certificate binary file.
Debug certificate is of no use if policy for CM33 AP is ‘permanent disable’.
ENABLE_CM33
Allows specifying the CPU cores to be visible to OpenOCD. Useful for cases when only SYS-AP needed. OpenOCD never affects disabled cores.
Flash operations are done only with enabled CM33 core.
Possible values:
- 1 – CM33 core is enabled (default).
- 0 – Core is disabled.
PSOC 6 MCU global variables
ENABLE_ACQUIRE
Enables or disables the acquisition of the target device in test mode.
Possible values:
- 1 – Reset acquisition enabled (default with KitProg3/MiniProg4)
- 2 – Power Cycle acquisition enabled. The voltage level can be controlled by using ENABLE_POWER_SUPPLY .
- 0 – Acquisition disabled (default for other debug adapters)
ENABLE_POWER_SUPPLY
Controls the internal power supply of KitProg3/MiniProg4 adapters. If this command is specified, the KitProg3 driver enables the power supply, thus powering on the target during initialization.
Possible values:
- 0 – Power supply disabled
- Any other value defines target voltage in millivolts.
- default – Sets the last used voltage before KitProg3/MiniProg4 was powered off.
ENABLE_CM0, ENABLE_CM4
Allows specifying the CPU cores to be visible to OpenOCD. OpenOCD never affects disabled cores.
Possible values:
- 1 – Corresponding core is enabled.
- 0 – Core is disabled.
TARGET_AP
Applicable for "secure" (PSOC™ 64) MCUs only. Enables the choice of DAP access port that will be used for programming.
Possible values:
- sys_ap – SYS_AP (AP #0, default)
- cm0_ap – CM0_AP (AP #1)
- cm4_ap – CM4_AP (AP #2). Choosing this access port will enable external SMIF memory banks.
FLASH_RESTRICTION_SIZE
Applicable for "secure" (PSOC™ 64) MCUs only. Use this variable to limit the size of accessible flash so OpenOCD will not affect flash locations where the "secure" CyBootloader is located. The default value of this variable varies across different PSOC™ 64 MCUs.
ENABLE_WFLASH, ENABLE_SFLASH, ENABLE_EFUSE
Applicable for "secure" (PSOC 64) MCUs only. Enables the corresponding flash bank when set to a non-zero value. The WorkFlash is enabled by default on PSOC™ 64 CYS0644A, CYB0644A, CYB06447 and CYB06447-BL MCU devices. SFlash and eFuse banks are disabled by default on all PSOC™ 64 MCU targets.
SMIF_BANKS
Defines QSPI memory banks. This variable is a two-dimensional associative Tcl array of the following format:
set SMIF_BANKS {
1 {addr <XIPaddr1> size <BankSz1> psize <ProgramSz1> esize <EraseSz1>}
2 {addr <XIPaddr2> size <BankSz2> psize <ProgramSz2> esize <EraseSz2>}
...
N {addr <XIPaddrN> size <BankSzN> psize <ProgramSzN> esize <EraseSzN>}
}
Where:
-
XIPaddrN– XIP mapping address -
BankSzN– Total size of this flash bank, in bytes -
ProgramSzN– Minimal programming granularity (program block size), in bytes -
EraseSzN– Minimal erase granularity (erase block size), in bytes
PSOC 4 MCU global variables
PSOC4_USE_ACQUIRE
Enables or disables the acquisition of the target device in test mode.
Possible values:
- 1 – Reset acquisition enabled (default with KitProg3/MiniProg4)
- 2 – Power Cycle acquisition enabled. The voltage level can be controlled by using ENABLE_POWER_SUPPLY .
- 0 – Acquisition disabled (default for other debug adapters)
AIROC CYW20829 Wi-Fi & Bluetooth combo chip global variables
DEBUG_CERTIFICATE
Allows to specify the location of the debug certificate binary file. This variable is used to configure a secure debug session. OpenOCD checks the status of the CM33 access port during the initialization phase and after each reset. It will attempt to reopen the CM33 AP by sending a debug certificate to a target and issuing WFA request #2.
This variable should contain the full path to the debug certificate binary file.
DEBUG_CERTIFICATE_ADDR
(Optional) Allows to specify the location in the RAM where the debug certificate will be loaded. The default address 0x2000FC00 will be used if this variable is not set by the user.
SMIF_BANKS
See SMIF_BANKS under PSOC 6™ MCU.
XMC7xxx/XMC5xxx and TRAVEO T2G global variables
ENABLE_ACQUIRE
Enables or disables the acquisition of the target device in test mode.
Possible values:
- 1 – Reset acquisition enabled (default with KitProg3/MiniProg4)
- 0 – Acquisition disabled (default for other debug adapters)
ENABLE_POWER_SUPPLY
Controls the internal power supply of KitProg3/MiniProg4 adapters. If this command is specified, the KitProg3 driver enables the power supply, thus powering on the target during initialization.
Possible values:
- 0 – Power supply disabled
- Any other value defines target voltage in millivolts.
- default – Sets the last used voltage before KitProg3/MiniProg4 was powered off.
ENABLE_CM71
Allows specifying the CPU cores to be visible to OpenOCD. Useful for single core XMC7xxx devices. OpenOCD never affects disabled cores.
Possible values:
- 1 – CM71 core is enabled.
- 0 – Core is disabled.
SMIF_BANKS
Defines QSPI memory banks. This variable is a two-dimensional associative Tcl array of the following format:
set SMIF_BANKS {
1 {addr <XIPaddr1> size <BankSz1> psize <ProgramSz1> esize <EraseSz1>}
2 {addr <XIPaddr2> size <BankSz2> psize <ProgramSz2> esize <EraseSz2>}
...
N {addr <XIPaddrN> size <BankSzN> psize <ProgramSzN> esize <EraseSzN>}
}
Where:
-
XIPaddrN– XIP mapping address -
BankSzN– Total size of this flash bank, in bytes -
ProgramSzN– Minimal programming granularity (program block size), in bytes -
EraseSzN– Minimal erase granularity (erase block size), in bytes