cancel
Showing results for 
Search instead for 
Did you mean: 

Troubles with compilation helloworld.c on arm-ostl-linux-gnueabi-gcc for STM32MP157-DK1

NK..1
Associate

Hello there

I'm not familiar with building linux for embedded systems. 

I need to build an yocto openstlinux distro with arm-ostl-linux-gnueabi-gcc to be able to compile at least simple "helloworld" on STM32MP157-DK1

My extra packages in local.conf are:

CORE_IMAGE_EXTRA_INSTALL += " \

mc \

minicom \

gcc \

libgcc \

glibc \

bluez5 \

binutils \

"

But when i run compilation (DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh , bitbake st-image-weston), i get errors:

root@stm32mp1:~# arm-ostl-linux-gnueabi-gcc -o helloworld helloworld.c

helloworld.c:1:10: fatal error: stdio.h: No such file or directory

 #include <stdio.h>

     ^~~~~~~~~

compilation terminated.

/usr/local/include doesn't exist and do not contain any headers

Which packages should I add in local.conf to avoid this error and compile 'helloworld'?

2 REPLIES 2
NK..1
Associate

the problem was solved by adding the following packages

binutils \

binutils-symlinks \

coreutils \

cpp \

cpp-symlinks \

diffutils \

elfutils elfutils-binutils \

file \

gcc \

gcc-symlinks \

gdb \

gettext \

ldd \

libstdc ++ \

libstdc ++ - dev \

libtool \

ltrace \

Now I can run

gcc -o helloworld helloworld.c