2020-03-25 11:04 PM
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'?
2020-03-27 05:07 AM
Hello,
just to be sure, did you follow?
https://wiki.st.com/stm32mpu/wiki/How_to_add_a_customer_application
Did you create and validate your new recipe using devtool?
https://wiki.st.com/stm32mpu/wiki/OpenEmbedded_-_devtool
BR,
Milan
2020-04-21 05:25 AM
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