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.
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 2.3 - 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.
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.
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.
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 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_6m.cfg
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_6m.cfg
OpenOCD is now connected to the MCU and is waiting for GDB connections. If you look into the terminal output, you will find three separate ports you can connect to. They are respectively for: CM0, CM7.0 and CM7.1 cores. If you want to debug CM0, choose the first one, when connecting to the GDB server using GDB. For CM7.0 choose second from the top, and for CM7.1 choose the third one.
With Qt for MCUs, by default CM0 is used for the bootloader, and CM7.0 is used for the application.
Now you can connect to the GDB server and step through instructions.
ARMGCC_DIR as shown below, with the path adjusted to the correct location for your machine:
%ARMGCC_DIR%\arm-none-eabi-gdb.exe C:/path/to/binary/application.elf -ex "target remote localhost:3334" (gdb) monitor reset (gdb) continue
Note: As this board is working in little-big CPU architecture it cannot be simply restarted. To perform correct restart monitor traveo2 reset_halt should be used.
%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
|TVIIC2D6M||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.