cancel
Showing results for 
Search instead for 
Did you mean: 

Can't run gtk_hello_world example on STM32MP157A

MÇerçi
Associate III

Hi, i dont know if it is a stupid question or not but anyways, I was following the STM32MP157A-DK2 tutorial for developing on ARM Cortex A7

i maked the example given for hello_world.c with given makefike. It works fine on my linux pc but the borad i cant run it on the board. it gives this error every time.

@@@@�0hello_world: line 1: can't open @8
      0
       ��: no such file
./gtk_hello_world: line 1: ./gtk_hello_world: line 6: : not found
./gtk_hello_world: line 1: �qXX���+�l��: not found
ELF: not found
./gtk_hello_world: line 1: ?h?p?x?�?��?: not found
./gtk_hello_world: line 6: ./gtk_hello_world: line 2: �?
                                                        �?
                                                          �?�?�?�?��H�H��/H��t��H���5�/��%�h���������h���������h���������h��������h��������h��������h��������h��q��������a������h: not found
can't open-�8?8@0
               @00*@0�: no such file./gtk_hello_world: line 3: ��A������h
                                                                         ��1������h
��������h��������h�����������%�.D����%.D����%�-D����%�-D����%�-D����%�-D����%�-D����%�-D����%�-D����%�-D����%�-D����%�-D����%�-D����%�-D����%�-D����%�-D����%�-D�H�=3�z-��H�=�-H��-H9�tH�V-H��t: File name too long
 
./gtk_hello_world: line 1: can't open K: no such file
./gtk_hello_world: line 1: E�: not found
./gtk_hello_world: line 6: : not found
./gtk_hello_world: line 6: �: not found

it always gives me error i cant even run just a printf line:

#include <gtk/gtk.h>
int main ()
{
	printf("Hello_World!!");
}

it gives

root@stm32mp1:/usr/local# ./gtk_hello_world
./gtk_hello_world: line 1: syntax error: unexpected "("

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Mustafa Çerçi​ 

it's not only a matter of installation of SDK but source the env prior to make

You should get :

PC $> echo $CROSS_COMPILE

arm-ostl-linux-gnueabi-

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

8 REPLIES 8
Olivier GALLIEN
ST Employee

Hi @Mustafa Çerçi​ 

Same executable can not work both on your linux station and on Target

If working well on your station I suspect you forget, or not properly, load the SDK prior to call make command in order to cross-compile for MP1.

Double check your procedure.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thanks for the fast answer, I installed SDK before i can do it again, now deleted every file now started installing again. After i finish that i will try to build again

Hi @Mustafa Çerçi​ 

it's not only a matter of installation of SDK but source the env prior to make

You should get :

PC $> echo $CROSS_COMPILE

arm-ostl-linux-gnueabi-

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Alright, im gonna check it thanks again

it is solved after re-installation, i dont know maybe some corrupted file or my linux got confused, or maybe i got confused and forget to source SDK, thanks for the fast answer!

Btw is there any example for me to wirte code for ARM-A7 on CubeIDE? even hello world is enough for now, just want to if i need import anything or to see important project settings for A7 projects etc.

Hi @Mustafa Çerçi​ 

yes please look at this post :

https://community.st.com/s/question/0D53W00000M9GphSAF/using-stm32cubeide-for-developing-linux-user-space-applications

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

OH, thanks a lot, i will look at it as soon as possible, it is kinda hard to learn an work on this kind of environment after woking on Visual Studio and pyCharm, they are so easy to learn comparing to this.