- Last edited one month ago ago
User space static library project
1 Create a user space static library project
In context of Cortex-A7 sub-project, MP157C-DK2_CA7 here, right click and select Create a userspace Project..
We select here Static Library project type, in C language. Note that our user space project will use by default the SDK version associated to Cortex-A7 sub-project.
- Select your project, right-click and then Build Project.
3 Update myExe project sources & properties, in order to use myStaticLib
Hereafter is an updated code in order main() to call myStaticLib function say_hello().
You also have to reference myStaticLib project inside myExe properties: C/C++ General > Paths and Symbols > References; as depicted hereafter.
4 Preparing Debug Configuration
Your target must be Linux booted and network connected. Please, start Target Status widget on the bottom right and check for the green light. Remember that Linux console cannot be shared outside STM32CubeIDE: butterfly icon.
Please also check How to set up proxy and P2P Ethernet connection with STM32CubeIDE if you are in that case.
5 Debug Configuration
Select your project, right-click Debug as... > Debug Configurations, then select STM32 Cortex-A Remote Application'.
The default Connection proposed is "MPU SSH", corresponding to the target IP address discovered by Target Status. The default destination directory is /home/root.
6 Debug: stepping into myStaticLib
Click Debug :
- Executable is downloaded to the target,
- GDBServer is launched on the target,
- GDBClient is launched on the workstation and can exchange via network with GDBServer,
|in case of error; please stop any GDBServer running on the target before launching a new debug session.|