C
Getting started on Infineon PSOC Edge platforms
Overview
This topic provides all the necessary information to get started on the Infineon PSOC™ Edge platforms supported by Qt Quick Ultralite.
Use the Infineon Online Software Delivery Tool to flash Qt for MCUs demos. These applications, developed by Infineon and Qt Group, showcase the high-performance graphics capabilities of the EVK.
Compatible versions
Qt Quick Ultralite has been tested with ModusToolbox Tools Package version 3.7.0.
Installing prerequisites
Install the prerequisites before setting up your development environment.
Infineon PSOC Edge E84 Evaluation Kit
- Qt Quick Ultralite 2.12.1
- Qt Quick Ultralite Infineon PSOC Edge E84 Evaluation Kit platform package
- Infineon PSOC Edge E84 Evaluation Kit
- Infineon ModusToolbox Software
- ModusToolbox Tools Package 3.7.0
- Eclipse IDE for ModusToolbox 2025.8.0 or newer
- ModusToolbox Edge Protect Security Suite 1.6.1
- ModusToolbox Programming Tools 1.7.0
- GNU Arm GCC 14.2.1 or LLVM Embedded Toolchain for Arm 19.1.5
Note: Certain Qt Quick Ultralite demo applications (such as the swipe_game, Thermostat, and Watch demo) require 1 Gbit external Octal SPI flash to run on the Infineon PSOC Edge E84 Evaluation Kit. To leverage the 1 Gbit flash, refer to Infineon's memory configuration instructions.
Preparing a ModusToolbox project
ModusToolbox projects require additional configuration to run Qt Quick Ultralite. The following configurations are required on top of an empty PSOC Edge application.
Note: This section requires knowledge of Eclipse IDE for ModusToolbox software. See Eclipse IDE for ModusToolbox User Guide for instructions on how to use the software.
Libraries
Add the following libraries for the proj_cm55 in the ModusToolbox Library Manager:
| Library name | Version |
|---|---|
| display-dsi-waveshare-4-3-lcd | 1.0.0 |
| touch-ctp-ft5406 | 1.0.0 |
| retarget-io | 1.9.0 |
| serial-memory | 3.1.0 |
QSPI configuration
Add the following QSPI configuration in the ModusToolbox QSPI Configurator to get PSRAM working in Qt Quick Ultralite:
| Configuration variable | Value |
|---|---|
| QSPI Instance | 1 |
| Slave Slot | 2 |
| Memory Part Number | S70KS1283 |
| Configuration | 200 MHz |
| Data Select | Octal SPI-Data[0:7] |
| Memory Mapped | Enabled |
| Pair with Slot | None |
| Start Address | 0x64000000 |
| Size | 0x1000000 |
| End Address | 0x64FFFFFF |
| Write Enable | Enabled |
| Config Data in Flash | Disabled |
| Encrypt | Disabled |
| Merge XIP Transactions | Within 16 Cycles |
Device configuration
Change the following configurations in the ModusToolbox Device Configurator
Enable graphics
In Peripherals -> System, enable Graphics and change the following parameter values:
| Parameter | Value |
|---|---|
| Main Clock | CLK_HF1 root_clk [SHARED] |
| MIPI DPHY PLL Clock | CLK_HF12 root_clk [USED] |
| Enable GPU | Enabled |
| Display Type | MIPI DSI Video Mode |
| Transfer Type | Video Mode Burst |
| Width | 832 |
| Height | 480 |
| Target FPS | 60 |
| Display Interface | DPI-24bit |
| HSync Width | 10 |
| HFP | 210 |
| HBP | 20 |
| VSync Width | 5 |
| VFP | 20 |
| VBP | 20 |
| Pixel clock (KHz) | 33768 |
| Number of DSI Lanes | 1 |
| Max Per Lane Mbps | 850 |
| Use Max Per Lane Mbps | Enabled |
| Required Per Lane Mbps | 850 |
| Allow CMD transfer in LP | Enabled |
| Allow LP transition in VIDEO | Enabled |
| Enable Graphics/Video Layer | Enabled |
| Enable Overlay0 | Disabled |
| Enable Overlay1 | Disabled |
| Visibility | Enabled |
| Inout Format | RGB565 |
| X Position | 0 |
| Y Position | 0 |
| Width | 832 |
| Height | 480 |
| Z Order | 0 |
Change I2C clock frequency and data rate
In Peripherals -> Communication, enable Serial Communication Block (SCB) 0 and change the parameters to the following parameter values:
| Parameter | Value |
|---|---|
| Mode | Master |
| Manual Data Rate Control | Disabled |
| Data Rate (kbps) | 100 |
| Use TX FIFO | Enabled |
| Use RX FIFO | Enabled |
| Enable Wakeup from Deep Sleep Mode | Disabled |
| Clock | 16 bit Divider 0 clk (CYBSP_I2C_CONTROLLER_CLK_DIV) [USED] |
| SCL | P8[0] digital_inout (CYBSP_I2C_SCL) [USED] |
| SDA | P8[1] digital_inout (CYBSP_I2C_SDA) [USED] |
| SCL Output (scl_trig) | <unassigned> |
| RX Trigger Output | <unassigned> |
| TX Trigger Output | <unassigned> |
| Actual Data Rate (kbps) | 97 |
| tLow (ns) | 5120 |
| tHigh (ns) | 5120 |
| Clock Frequency | 3.125 MHz |
| Store Config in Flash | Enabled |
The values in Actual Data Rate section are dependent on the clock config and cannot be changed here. You can change the values by setting the following parameters for the 16 bit Divider 0 clk (CYBSP_I2C_CONTROLLER_CLK_DIV) in Clocks -> Dividers -> Peripheral -> Peri 0 -> Peri 0 Clock Group 1 -> 16 bit -> 16 bit Divider 0:
| Parameter | Value |
|---|---|
| Source Clock | CLK_HF10 root_clk [SHARED] |
| Divider | 32 |
| Frequency | 3.125 MHz |
| Start on Reset | Enabled |
| Peripherals | Serial Communication Block (SCB) 0 clock_scb_en (CYBSP_I2C_CONTROLLER) |
Enable PSRAM memory region for Qt Quick Ultralite
Ensure Peripherals -> Communication -> Quad Serial memory Interface (QSPI) 1 -> QSPI 1 Core 0 is enabled. Go to Memory -> Memory Regions, open the Serial Memory Interface block 1, memory 2 (S70KS1283) and click the Plus button next to the UNALLOCATED region and select Add region. Set the following properties for the new region:
| Property | Value |
|---|---|
| Region id | m55_psram |
| Domain | M55 (Domain 2) |
| Offset | 0x00000000 |
| Size (bytes) | 0x01000000 |
Click OK to create the region.
Enable PSRAM support in Qt Quick Ultralite by following the instructions here.
Project configuration
The following changes are needed for the project to support Qt Quick Ultralite:
- Remove
FreeRTOSConfig.hif it exists in theproj_cm55. Exported Qt Quick Ultralite applications come with aFreeRTOSConfig.hfile that is preconfigured for Qt Quick Ultralite. - Add
COMPONENTS+=GFXSSto the common.mk.
Building the application
Setting up the environment
Before building the application, set the following environment variables:
export QUL_ROOT=$HOME/Qt/QtMCUs/2.12.1set QUL_ROOT=C:\Qt\QtMCUs\2.12.1Exporting the Qt Quick Ultralite application
Export the application code using the qmlprojectexporter:
Note: Exporting a Qt Quick Ultralite application with LLVM support requires Qt Quick Ultralite libraries to be built with the LLVM toolchain. See LLVM support on PSOC Edge E84 for building instructions.
ARM GCC:
$QUL_ROOT/bin/qmlprojectexporter \
/path/to/your/project.qmlproject \
--boarddefaults=$QUL_ROOT/platform/boards/infineon/psoc-edge-e84-freertos/cmake/BoardDefaults_16bpp_default.qmlprojectconfig \
--toolchain GNU \
--platform psoc-edge-e84-freertos \
--extend-project /path/to/mtw/your_ModusToolbox_application_project/proj_cm55/Makefile \
--project-type ModusToolbox \
--generate-entrypoint \
--platform-metadata $QUL_ROOT/lib/QulPlatformTargets_psoc-edge-e84-freertos_16bpp_Linux_armgcc-export.jsonLLVM:
$QUL_ROOT/bin/qmlprojectexporter \
/path/to/your/project.qmlproject \
--boarddefaults=$QUL_ROOT/platform/boards/infineon/psoc-edge-e84-freertos/cmake/BoardDefaults_16bpp_default.qmlprojectconfig \
--toolchain LLVM \
--platform psoc-edge-e84-freertos \
--extend-project /path/to/mtw/your_ModusToolbox_application_project/proj_cm55/Makefile \
--project-type ModusToolbox \
--generate-entrypoint \
--platform-metadata $QUL_ROOT/lib/QulPlatformTargets_psoc-edge-e84-freertos_16bpp_Linux_llvm-arm-export.jsonARM GCC:
%QUL_ROOT%\bin\qmlprojectexporter ^
C:\path\to\your\project.qmlproject ^
--boarddefaults=%QUL_ROOT%\platform\boards\infineon\psoc-edge-e84-freertos\cmake\BoardDefaults_16bpp_default.qmlprojectconfig ^
--toolchain GNU ^
--platform psoc-edge-e84-freertos ^
--extend-project C:\path\to\mtw\your_ModusToolbox_application_project\proj_cm55\Makefile ^
--project-type ModusToolbox ^
--generate-entrypoint ^
--platform-metadata %QUL_ROOT%\lib\QulPlatformTargets_psoc-edge-e84-freertos_16bpp_Windows_armgcc-export.jsonLLVM:
%QUL_ROOT%\bin\qmlprojectexporter ^
C:\path\to\your\project.qmlproject ^
--boarddefaults=%QUL_ROOT%\platform\boards\infineon\psoc-edge-e84-freertos\cmake\BoardDefaults_16bpp_default.qmlprojectconfig ^
--toolchain LLVM ^
--platform psoc-edge-e84-freertos ^
--extend-project C:\path\to\mtw\your_ModusToolbox_application_project\proj_cm55\Makefile ^
--project-type ModusToolbox ^
--generate-entrypoint ^
--platform-metadata %QUL_ROOT%\lib\QulPlatformTargets_psoc-edge-e84-freertos_16bpp_Windows_llvm-arm-export.jsonIf the export was successful, the ModusToolbox project should have a QtMCUs directory created under proj_cm55.
Edit the proj_cm55/Makefile and add the FREERTOS_DIR variable right before ## QUL BEGIN ## comment:
FREERTOS_DIR=$(patsubst %/,%,$(CY_GETLIBS_SHARED_PATH))/$(CY_GETLIBS_SHARED_NAME)/freertos/release-v10.6.202/SourceNote: This export is needed only once per application project. The ModusToolbox project automatically detects the QML file changes and regenerates the C++ code.
If the Qt Quick Ultralite application uses selectors for different variants, add them with the --selector argument for qmlprojectexporter. For example, the Qt Quick Ultralite Thermostat Demo uses the following selectors:
--selector normal,smallThe default configuration for Infineon PSOC Edge platforms is to export Qt Quick Ultralite libraries that are built with Release configuration. If you have built Qt Quick Ultralite libraries with a different build configuration (such as Debug), override the build type by adding --qul-build-type argument to the qmlprojectexporter command:
--qul-build-type DebugSeveral examples shipped with Qt Quick Ultralite do not have main() function in the application code. Use the --generate-entrypoint argument while exporting these examples, unless you are adding a main() function. For more information about writing a main() function initializing Qt Quick Ultralite, see Running Qt Quick Ultralite in applications.
See the qmlprojectexporter documentation and QmlProject Manual for more information about qmlprojectexporter and QmlProject.
Building and flashing the ModusToolbox project
Note: This section requires knowledge of Eclipse IDE for ModusToolbox software. See Eclipse IDE for ModusToolbox User Guide for instructions on how to use the software.
Follow these steps to build and flash the application from the Eclipse IDE for ModusToolbox:
- Select the ModusToolbox project.
- Click Build Application from Quick Panel -> <ModusToolbox project name> to build the project.
- Click <ModusToolbox project name> Program Application from Quick Panel -> Launches to flash the application to the board.
Debugging
Reading debug messages
By default, Qt Quick Ultralite redirects all the output from qul_printf and Qul::PlatformInterface::log calls to a virtual serial port, which you can access on the host machine using USB. The initial project configuration outputs with a baud rate of 115200 bps.
Make the following changes to change the speed of the UART port:
In Peripheral -> Communication -> Serial Communication Block (SCB) 2 (CYBSP_DEBUG_UART) change the following values:
| Parameter | Default value |
|---|---|
| Com Mode | Standard |
| Baud Rate (bps) | 115200 |
| Oversample | 10 |
| Bit Order | LSB First |
| Data Width | 8 bits |
| Parity | None |
| Stop Bits | 1 bit |
Make sure the Actual Baud Rate matches the desired baud rate:
| Parameter | Default value |
|---|---|
| Actual baud Rate (bps) | 114942 |
| Baud Rate Accuracy (%) | 0.224 |
| Clock Frequency | 1.149425 MHz |
You can change the actual baud rate by changing the Clocks -> Dividers -> Peripheral -> Peri 0 -> Peri 0 Clock Group 1 -> 16 bit -> 16 bit Divider 1 (CYBSP_DEBUG_UART_CLK_DIV):
| Parameter | Default value |
|---|---|
| Source Clock | CLK_HF10 root_clk [SHARED] |
| Divider | 87 |
| Frequency | 1.149 MHz |
| Start on Reset | Enabled |
| Peripherals | Serial Communication Block (SCB) 2 clock_scb_end (CYBSP_DEBUG_UART) [USED] |
Using a debugger
Note: This section requires knowledge of Eclipse IDE for ModusToolbox software. See Eclipse IDE for ModusToolbox User Guide for instructions on how to use the software.
The following steps show how to debug a project in Eclipse IDE for ModusToolbox:
- Select the ModusToolbox project.
- Click <ModusToolbox project name> Debug MultiCore from Quick Panel -> Launches to launch the debugger.
You can limit debugging to cover only the M55 project by selecting the proj_cm55 subproject, followed by <ModusToolbox project name> Debug from Quick Panel -> Launches.
Note: Large applications may require using Attach configuration when using the default KitProg3 debugger. You can find the configurations from Run -> Debug Configurations...
Board-specific information
The currently supported Infineon PSOC Edge targets are listed below. For more information on all the targets supported by Qt Quick Ultralite, see Supported target boards and development hosts.
Tier 2: Verified targets
| Hardware board | MCU | Compiler | Operating system(s) | Host(s) |
|---|---|---|---|---|
| Infineon PSOC Edge E84 Evaluation Kit | PSE846GPS2DBZC4 | GNU Arm GCC 14.2.1, LLVM Embedded Toolchain for Arm 19.1.5 | FreeRTOS | Windows and Linux hosts |
Resource cache policy
By default, an application's resource data is copied to SDRAM on startup. In order to retain these resources in flash and not load them to RAM on startup, add the following QmlProject option to your qmlproject file:
MCU.Config {
resourceCachePolicy: "NoCaching"
}Alternatively, it can be enabled only for individual images like this:
ImageFiles {
files: [
"big/button.png"
]
MCU.resourceCachePolicy: "NoCaching"
}Available under certain Qt licenses.
Find out more.