User space CDT project

< How to debug a user space application with STM32CubeIDE
Revision as of 12:37, 31 March 2021 by Registered User

This article proposes to manage a Linux user space application for STM32 MPU, using standard Eclipse CDT wizard.

BackToNavigationTree button.png

1 Create a "user space" project[edit]

  • Open new C Project wizard: File -> New -> Project... C Project.
New C Project wizard
  • In first window, choose OpenSTLinux SDK
New C Project wizard
  • then Next to setup configuration
New C Project wizard
  • and Next to choose SDK version
New C Project wizard
  • To populate this project with "main.c" file, select project, right click: New -> File -> main.c and fill it with some C code.

2 Build[edit]

  • Select your project, right-click and then Build Project.
C Project build


3 Preparing Debug Configuration[edit]

Your target must be Linux booted and network connected. In order to check it, please, start Target Status widget on the bottom right. Remember that Linux console cannot be shared outside STM32CubeIDE: butterfly icon.

Target Status - green

Please also check How to set up proxy and P2P Ethernet connection with STM32CubeIDE if you are in that case.

4 Debug Configuration[edit]

  • Select your project, right-click Debug as... > Debug Configurations.
  • Then create a STM32 Cortex-A Remote Application debug configuration, double clicking on it.
C Project debug


5 Debug on STM32 MPU device[edit]

Click Debug :

  1. Executable is downloaded to the target,
  2. GDBServer is launched on the target,
  3. GDBClient is launched on the workstation and can exchange via network with GDBServer,
C Project debug
Info white.png Information
in case of error; please check if GDBServer is still running on the target.


BackToNavigationTree button.png