2020-11-30 05:17 AM
Hi, i just started working/learning STM cards as an intern. I want to run C/C++ codes on STM32MP157A-DK1 ARM Cortex-A7.
I did the getting started tutorials at wiki, and im using environmet version 2.1.0 release
I followed these posts:
https://wiki.st.com/stm32mpu/wiki/How_to_manage_OpenSTLinux_project_in_STM32CubeIDE
Then I wrote an the most basic hello world code. just want to get an build, deploy and see if its working properly then i will start working on the task that i given.
#include <stdio.h>
int main()
{
printf("hello world\n");
return 0;
}
The problem is when i press : Run as -> STM33 Cortex-A Linux deployment it gives an error and says : " Activation DeviceTree... failed"
I really dont know anything about this kind of work, i worked as a programmer but with visual studio, unity engine and unreal engine so this kind of environment is completely alien to me. Im sorry if this question is stupid or have an obvious solution/answer, but i have no one ask here to help me for this task.
Solved! Go to Solution.
2020-12-01 06:25 AM
Hello @Mustafa Çerçi ,
For your information a new wiki article has been published on that giving I hope more details:
https://wiki.st.com/stm32mpu/wiki/How_to_debug_a_user_space_application_with_STM32CubeIDE
Let me know if it help,
Ludovic
2020-11-30 08:53 AM
Hi @Mustafa Çerçi ,
Seems you are not using the correct Debug Configuration .. your userspace app is then consider as a DeviceTree.
Select your project, right-click Debug as... > Debug Configurations.
Then create a C/C++ Remote Application debug configuration, double clicking on it.
Hope it help,
Olivier
2020-11-30 11:13 PM
Hi thanks again for the fast reply,
Then what should i choose other settings? do i have anything else to do because it seem like not working (sorry if i'm being annoying)
2020-12-01 06:25 AM
Hello @Mustafa Çerçi ,
For your information a new wiki article has been published on that giving I hope more details:
https://wiki.st.com/stm32mpu/wiki/How_to_debug_a_user_space_application_with_STM32CubeIDE
Let me know if it help,
Ludovic
2020-12-01 10:06 PM
ahh thank you so much i will read this and try it now.
2020-12-02 12:56 AM
Hi @LudovicR read and tried it, but there is a problem i dont have that Debug folder. What should i write C/C++ Application tab? In this tutorial it says Debug/UserSpace.elf, i assumed i need to have something like Debug/test-C_CA7.elf (for my project) but i dont have that folder/file
2020-12-02 05:44 AM
Ok i figured it out generating and generated Debug folder and .elf file also i can debug my C project, only one problem remains. I want to use linux header files like "spi.h","spidev.h" and i need to work on ARM Cortex A7. With in this context, can i import linux project into my C project after that can i import this project into an STM 32 project to use in inside CA7 ?
(i know im asking too much sorry for that, i just want to learn and start developing on CubeIDE, again im sorry if these questions sounds stupid, i have nobody to ask rather than this place.)
2020-12-02 08:22 AM
Hi @Mustafa Çerçi ,
The OpenSTLinux SDK provides you with the --sysroot= option set to the SDK rootfs.
It means you have access to the kernel header includes:
#include <linux/spi/spidev.h>
for example.
Rootfs is located in the toolchain: .../3.1-openstlinux-5-4-dunfell-mp1-20-11-12/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/
Hope it help,
Ludovic
2020-12-04 03:18 AM
ahh thank you sir! all this time i just need to create only a C project. I was trying to create STM32 Project then include OpenSTLinux into it and build a C project. I thought only way i can work with Cortex A7 core with that way, there must be a stm32 project and i need to to everything inside it. But it seems like if i had SDK it is enough you say.