280 ST-SDK Project Start¶
This section provides a step-by-step guide to creating a simple TouchGFX application using the 280_st_sdk_blank project included in the software release package. You will learn how to compile the project using STM32CubeIDE, flash it onto the 280 Instruments Display hardware, and test the application. Additionally, it covers how to debug the application using the ST-LINK debugger.
To kickoff the 280_st_sdk_blank make sure the development tools have been installed per Development tools setup section.
280 ST-SDK Blank Project Installation and Loading¶
Locate the 280_st_sdk_blank.7z archive containing the blank project
Extract the contents to a preferred location
After extraction, you will find a folder named 280_Project_Blank
>280_Project_Blank
¦ +---Core
¦ +---Drivers
¦ +---Middlewares
¦ +---tools
¦ +---TouchGFX
¦ +---user_modify_files
Launch STM32CubeIDE and when prompted, enter a workspace name (e.g., 280_st-sdk_blank) and click Launch
In STM32CubeIDE, go to the File menu and select Open Projects from File System
In the dialog that appears:
Click Directory… and browse to the extracted 280_Project_Blank folder
STM32CubeIDE will automatically detect the project
Click Finish to import the project into your workspace
Once imported, the project will appear in the Project Explorer, ready for development, compilation, and flashing.
Building, Flashing, and Debugging the Blank Project¶
1. Build the Project¶
Once the blank project is imported into STM32CubeIDE:
In the Project Explorer, right-click on the project folder
Select Build Project
The IDE will compile the source code and generate the binary (.elf) file
Check the Console tab for build status and ensure there are no errors
There are 2 Build Project options: Debug and Release:
The Debug option can be downloaded via STM32 ST-Link Debugger
The Release build can be programmed to the unit via Bootloader using either USB or CAN options.
Note: For the purpose of learning and development, the Debug build is the best option.
2. Flash the Application to 280 Instrument Displays Hardware¶
To flash the compiled application:
Connect the 280 Instrument Displays board to your PC via ST-LINK USB interface
Ensure the board is powered and recognized by your system
In STM32CubeIDE:
Click the Run menu and select Run As > STM32 Cortex-M C/C++ Application
Choose the correct .elf file if prompted
The IDE will flash the firmware to the board and reset it automatically
3. Debug the Application¶
To start debugging:
Click the Debug icon (bug symbol) in the toolbar or go to:
Run > Debug As > STM32 Cortex-M C/C++ Application
A pre-configured configuration will be present
STM32CubeIDE will:
Flash the firmware (if not already done)
Launch the debugger
Switch to the Debug Perspective
Use breakpoints, step-through execution, and variable inspection to analyze your application
💡 Tip: You can set breakpoints by double-clicking the left margin next to a line of code.
Customizing the TouchGFX Blank Project¶
Once the blank project is successfully imported and flashed to the 280 Instrument Displays hardware, you can begin customizing the UI and application logic using TouchGFX Designer and STM32CubeIDE.
1. Launch TouchGFX Designer¶
Open TouchGFX Designer from your Start Menu or installation directory
Click Open Project and navigate to the TouchGFX folder inside your STM32CubeIDE project directory:
C:\ST\STM32CubeIDE\workspace\280_st-sdk_blank\TouchGFX
2. Add UI Elements¶
In the Screens panel, click Add Screen to create a new screen
Use the Widget Toolbox to drag and drop UI components such as:
Buttons
Text Areas
Images
Sliders
Graphs
Customize properties (e.g., size, color, font) using the Properties panel
3. Link UI to Application Logic¶
Open the Interactions tab to define behavior for widgets
For example:
Set a button to trigger a screen change
Link a slider to update a value on the display
TouchGFX will auto-generate C++ code in the gui folder of your project
4. Generate Code and Build¶
Click Generate Code in TouchGFX Designer
Return to STM32CubeIDE
Build the project again to compile the updated UI logic
5. Flash and Test¶
Flash the updated binary to the 280 Instrument Displays hardware using STM32CubeIDE
Verify that your custom UI appears and behaves as expected