2020-10-26 02:36 AM
We are using the latest STM32CubeIDE (1.4.0) and are trying to develop applications for linux user space on our STM32MP157 board. Our goal is to use the cross compiler toolchain for developing and debugging with the IDE.
When we create a new project, it seems the IDE doesn't create any ready to compile main.cpp files for the A7 processor like for the M4. See this screenshot:
For the M4, the project compiles with the template main.c just fine. But for the A7, nothing is there.
So my question is, is there any documentation on how to develop linux user space application with the STM32CubeIDE for the A7?
Thank you.
Best regards,
Kevin
Solved! Go to Solution.
2020-12-02 01:08 AM
Hi @EWalt.1 , @Community member , @Ludovic Feltz ,
FYI, as per announced earlier we have published a page in wiki in order to guide whoever want to build and debug a user space application in STM32CubeIDE :
https://wiki.st.com/stm32mpu/wiki/How_to_debug_a_user_space_application_with_STM32CubeIDE
Hope it help,
Olivier
2020-11-03 06:42 AM
Hello @Community member
Did you find a solution to your issue?
I'm stuck here too... Just a little bit further, i managed to get OpenSTLinux source generated.
1) Right click CA7 project, then click Setup OpenSTLinux
2) Linux sources is now available in CA7 project folder and compile well.
See screenshot:
But here i don't know what to do...
It looks like there is a source folder in build folder, trying to add some file in there but how to compile and execute it?
Does somebody know what to do next?
NOTE: The documentation page on How to manage OpenSTLinux project in STM32CubeIDE is under construction a this moment...:loudly_crying_face:
How_to_manage_OpenSTLinux_project_in_STM32CubeIDE
Thanks,
Ludovic.
2020-11-03 07:35 AM
Hello @Ludovic Feltz
we have not found a solution with STM32CubeIDE.
As we are using our custom yocto build (based on OpenSTLinux), we have found a solution:
Together with the TCF (Target Communication Framework) of Eclipse we now can develop, deploy, run and debug our linux user space application directly on the stm32mp1 target.
Everything is nicely described in the book "Embedded Linux Systems with the Yocto Project" from Rudolf J. Streif, so i recommend you to get the book.
Best regards,
Kevin
2020-11-03 07:39 AM
Thank you for your reply @Community member
I will do some more tests as i really want to use STM32CubeIDE but if i do not find any solution i will try yours.
In case i find a solution with STM32CubeIDE i will post the process here.
Thank you :)
Ludovic.
2020-11-04 01:21 AM
Hi @Community member , @Ludovic Feltz
Thanks for you post and participation.
Apology for difficulties you are encountering.
@Community member nice you build solution by yourself for User application and thanks to share.
Note that something is possible in STM32CubeIDE and we are close to document it.
We are also working to publish How_to_manage_OpenSTLinux_project_in_STM32CubeIDE ASAP.
I will keep you posted in coming days.
Olivier
2020-11-06 07:48 AM
Hi @Community member , @Ludovic Feltz ,
I put here a kind of draft of a coming wiki article to explain how to create a Linux Userspace application project .
1.Article purpose
This article provides guidelines to setup environment for STM32CubeIDE and explain steps that allow concurrent debug of both A7 and M4 cores.
2.HARDWARE Prerequisites
STM32MP15x board
STLink connection for debug & Linux console
Ethernet (or Ethernet over USB) for connection to A7 core
3.SOFTWARE Prerequisites
STM32CubeIDE 1.4.2 installed on a Linux station
SDK toolset installed on your Linux Station or SDK install through CubeIDE using “Setup OpenSTLinux�? CA7 contextual menu
4 - Create a new STM32 A7 project
Open wizard for creating a new C Project : File -> New -> Project .. C project
In first wizard window choose OpenSTLinux SDK
Then Next & Finish
5 -Create or add main.c ( and all needed project file )
•
•Select project, right click: New > File > “main.c�?
•
•Fill it with for example:
•
void main() {
int i;
for (i=0;i<10;i++);
i++;
i++;
i++;
return 33;
}
6 - Setup SDKPATH variable:
Project Properties > C/C++ Build > Environment > Edit variable > Variables
SDK path depends if you proceed with "internal " installation using IDE
-> it's then somewhere in a path like [CUBEIDE_INSTALLTION_PATH]/plugins/com.st.openstlinux.sdk.openstlinux_5.4_dunfell_mp1_20_06_24_5.4.0.202007020712/tools/
Or "external" SDK installation ( legacy Developper Package ) :
-> it's then
[Developper_Package_installation_PATH]/SDK
7 - Build your project
Olivier
2020-11-15 07:31 AM
Hi Oliver,
Can you please elaborate How to build and run the application you showed in your last comment?
Thanks!
2020-12-02 01:08 AM
Hi @EWalt.1 , @Community member , @Ludovic Feltz ,
FYI, as per announced earlier we have published a page in wiki in order to guide whoever want to build and debug a user space application in STM32CubeIDE :
https://wiki.st.com/stm32mpu/wiki/How_to_debug_a_user_space_application_with_STM32CubeIDE
Hope it help,
Olivier
2020-12-17 05:21 AM
Hi all,
coming back to the initial post here. So when generating a new Project in CubeIDE (File>New...>STM32 Project) there are two projects generated, one for CM4 and one for CA7 (like shown in the initial screenshot). I expected, that it is possible to also integrate user space applications into the CA7 project here. Generating separate projects seems a little bit strange.
If this is not possible. What is the purpose of the CA7 project then?
Thanks
Klaas
2020-12-17 05:29 AM
Hi @Community member ,
CA7 is there to host OpenSTLinux projects ( TF-A, Uboot, Kernel) .
Hosting of user space app will come in next CubeIDE release.
In the meantime we offer this possibility to play with separate projects.
Olivier