Skip to main content
NK..1
Associate
March 26, 2020
Question

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

  • March 26, 2020
  • 2 replies
  • 1591 views

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'?

This topic has been closed for replies.

2 replies

NK..1
NK..1Author
Associate
April 21, 2020

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