C
Getting Started on Infineon
This topic helps you setup the development environment for Infineon 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. 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 2.2 - 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.
You could also set up the development environment from the command prompt. See Command-line Setup for Infineon 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.
Requirements
Debugging with GDB requires the GNU Arm GCC 10.3-2021.10 Toolchain. It can be downloaded from GNU Arm Embedded Toolchain Downloads.
Compilation
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
Set the INFINEON_AUTO_FLASH_UTILITY_DIR
environment variable
Set 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.4"
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
%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_ddr.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
%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_ddr.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™ T2G CYT3DL and two on TRAVEO™ T2G CYT4DN and TRAVEO™ T2G CYT4EN). 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.
Set the ARMGCC_DIR
environment variable
Set ARMGCC_DIR
as shown below, with the path adjusted to the correct location for your machine:
set ARMGCC_DIR="C:\Qt\Tools\QtMCUs\arm_gcc_10\bin"
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
Board-specific information
Hardware | Board | Compiler | Operating System(s) |
---|---|---|---|
TRAVEO™ T2G | TRAVEO™ T2G CYT3DL, CYT4DN and CYT4EN | 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.