Getting Started on Infineon/Cypress
This topic helps you setup the development environment for Infineon/Cypress boards.
Qt for MCUs is an Infineon Certified HMI Tool.
Configure the in Qt Creator IDE
To develop for MCUs using the Qt Creator IDE, the MCU plugin is required. The Qt online installer enables it by default when you install the Qt for MCUs SDK.
To enable or disable the plugin, follow these instructions:
- Select Help > About Plugins and choose the MCU Support plugin from the list.
- Restart Qt Creator to apply changes
To build and run your application on MCUs, you must create a kit:
- Select Edit > Preferences > Devices > MCU
- If not already set, provide the path to the Qt for MCUs installation directory.
- Select a Target supported by the Qt for MCUs SDK. For example, Qt for MCUs dev - Desktop 32bpp.
- In the Requirements section, ensure that the platform-specific requirements are met.
- Select Automatically create kits for all available targets on start to create kits automatically.
Note: You could also manually create/remove kits using Create Kit and Remove Kit.
- Click Apply and restart Qt Creator if you choose to create kits automatically.
Note: The Automatically create kits for all available targets on start option is available from Qt Creator v4.14 onwards. On older versions of Qt Creator, you have to explictly create or remove kits using Create kit or Remove kit.
You could also set up the development environment from the command prompt. See Command-line Setup for Infineon/Cypress Boards for more information.
Building applications with prebuilt Qt Quick Ultralite libraries
Open the CMake project file for the example you want to build and configure it with the kit you created earlier. Once the project is configured, select Run or press Ctrl+r on your keyboard to build and flash the binary to the target.
Note: Flashing using Qt Creator will only work with a MiniProg4 debug probe.
Debugging using GDB
For debugging, GHS probe, J-Link Ultra+ probe, and Miniprog4 are known to work and are recommended. Other debuggers might work, please check with Infineon or the tool vendor.
Note: The GDB backtrace might be inaccurate or incomplete when using the Green Hills compiler.
Debugging with GDB requires the GNU Arm GCC 10.3-2021.10 Toolchain. It can be downloaded from GNU Arm Embedded Toolchain Downloads.
Make sure to use
-DCMAKE_BUILD_TYPE=Debug when configuring, in order for the built executable to get the necessary DWARF2 debug table.
Starting the GDB server
INFINEON_AUTO_FLASH_UTILITY_DIR environment variable
INFINEON_AUTO_FLASH_UTILITY_DIR as shown below, with the path adjusted to the correct location for your machine:
set INFINEON_AUTO_FLASH_UTILITY_DIR="C:\Program Files (x86)\Infineon\Auto Flash Utility 1.2"
With the MiniProg4 probe:
With the MiniProg4 probe connected, execute the following command:
%INFINEON_AUTO_FLASH_UTILITY_DIR%\bin\openocd -s %INFINEON_AUTO_FLASH_UTILITY_DIR%\scripts -f interface/kitprog3.cfg -c "transport select swd" -f target/traveo2_c2d_4m.cfg
%INFINEON_AUTO_FLASH_UTILITY_DIR%\bin\openocd -s %INFINEON_AUTO_FLASH_UTILITY_DIR%\scripts -f interface/kitprog3.cfg -c "transport select swd" -f target/traveo2_6m.cfg
With the J-Link probe:
Connect the J-Link probe to the J-Tag socket on the board and execute the following command:
%INFINEON_AUTO_FLASH_UTILITY_DIR%\bin\openocd -s %INFINEON_AUTO_FLASH_UTILITY_DIR%\scripts -f interface/jlink.cfg -c "transport select swd" -f target/traveo2_c2d_4m.cfg
%INFINEON_AUTO_FLASH_UTILITY_DIR%\bin\openocd -s %INFINEON_AUTO_FLASH_UTILITY_DIR%\scripts -f interface/jlink.cfg -c "transport select swd" -f target/traveo2_6m.cfg
Cores available for debugging
OpenOCD is now connected to the MCU and is waiting for GDB connections. If you look into the terminal output, you will find several ports that you can connect to. The first is the CM0+ (Cortex-M0+) core, and the remaining are CM7 (Cortex-M7) cores (one on Traveo II 4M and two on Traveo II 6M). When you connect to the GDB server using GDB, choose the port corresponding to the core you want to debug.
Qt for MCUs by default uses
CM0+ for the bootloader, and the first CM7 core for the application.
Connecting with GDB
Now you can connect to the GDB server and step through instructions.
ARMGCC_DIR environment variable
ARMGCC_DIR as shown below, with the path adjusted to the correct location for your machine:
With the MiniProg4 probe:
%ARMGCC_DIR%\arm-none-eabi-gdb.exe C:/path/to/binary/application.elf -ex "target remote localhost:3334" (gdb) monitor reset (gdb) continue
With the J-Link probe:
Note: As these boards are based on ARM
big.LITTLE CPU architecture, make sure you use the
monitor traveo2 reset_halt command to restart.
%ARMGCC_DIR%\arm-none-eabi-gdb.exe C:/path/to/binary/application.elf -ex "target remote localhost:3334" (gdb) monitor traveo2 reset_halt sysresetreq (gdb) continue
|Traveo II||TVIIC2D4M and TVIIC2D6M||IAR Functional Safety Build Tools for Arm V8.22.3 and Green Hills MULTI Compiler for Embedded ARM 2019.5||Bare Metal|
Available under certain Qt licenses.
Find out more.