This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3359: arm-linux-gnueabihf-gcc compiler not getting generated from yocto setup

Part Number: AM3359

Hi there,

I am trying to create an yocto image and have an application which needs to be compiled with arm-linux-gnueabihf-gcc compiler.

The current yocto setup is generating the arm-poky-linux-gnueabi-gcc compiler. 

I tried few things with updating few variables and configs too. But I was not able to do it.

the looked into the yocto setup to find out from where the naming of gcc compiler are generating in current yocto setup  

arm-poky-linux-gnueabi-gcc generated from below varable TARGET_SYS which is arm-poky-linux-gnueabi and it is coming from as shown below

  • TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
  • TARGET_ARCH  = "arm"
  • TARGET_VENDOR = "poky"
  • TARGET_OS = "linux-gnueabi"
    • TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}"
      • LIBCEXTENSION="-gnu"
      • ABIEXTENSION="eabi"
  • in poky/meta/conf/machine/include/arm/arch-arm.inc
    • TUNE_ARCH = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'armeb', 'arm', d)}"
      • TUNE_FEATURES="arm armv7a vfp thumb neon callconvention-hard"
    • ARMPKGSFX_FPU="-neon"
    • ARMPKGARCH="armv7a"
    • ARMPKGSFX_ENDIAN=""
    • ARMPKGSFX_DSP=""
    • ARMPKGSFX_EABI="hf"
    • ARMPKGSFX_THUMB="t2"

What are the proper way to generate the arm-linux-gnueabihf-gcc compiler from a yocto setup?

Or any other way I can generate needed gcc tool chain form yocto.

(Note: I am generating the SDK from the yocto setup and using that generated SDK by setting up in a linux machine and using that environment setup to compile my application.

I have a old TI SDK existing setup which is created earlier, which is having arm-linux-gnueabihf-gcc tool chain for compiling application.

My task is to generate new TI SDK from yocto with needed packages added into that SDK and use that compile my application.

Older SDK is having arm-linux-gnueabihf-gcc compiler and my yocto setup is generating arm-poky-linux-gnueabi-gcc compiler)

 

Thanks & Regards,

Bhavesh Shah

  • With AM335x Linux SDK v9.1 you should be able to generate a toolchain installer (that includes a suitable gcc) using the meta-toolchain-arago-tisdk Yocto target. It looks like the section mentioning this build target is missing from the AM335x Linux SDK documentation, but it can be found in other SDK v9.x documentation such as for AM62x here https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_02_01_09/exports/docs/linux/Overview_Building_the_SDK.html#build-options

    Can you please give this a try.

    Regards, Andreas

  • Also for your reference, here's a related post that shows where gcc is located within that toolchain installer, and how it's being used. It's for AM437x SDK v9.1 but the very much same applies to AM335x SDK v9.1 as well:

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1344666/am4378-linux-devkit-compile-code-failed-for-ti-processor-sdk-documents-need-to-be-updated/5128591#5128591

    Regards, Andreas

  • hi , thanks four reply.

    I looked into the documentations you suggested for SDK v9.1 for AM335x, also i reviewed older version of SDK v8.2 which our yocto setup was using AM335x-SDK v8.2. In there they are suggesting that, the v8.2 SDK is able to create the gnueabihf-gcc tool chain as suggested in link

    I tried compiling this TI-SDK using yocto, i was able to find out the arm-none-linux-gnueabihf-gcc compiler as output. I tired to figure out the differences in TI-SDK yocto setup and the yocto setup I have for my project I found few thing as below. I was trying to figure out that if i change few variable my yocto application setup was also able to generate gnueabihf-gcc compiler as TI-SDK is generating. 

      

    TI-SDK

    My Yocto Setup

     

    --program-prefix=arm-none-linu"\

    "x-gnueabihf-

     

    --program-prefix=arm-poky-linu"\

    "x-gnueabi-

     

    S["READELF"]="arm-none-linux-gnueabihf-readelf"

    S["OTOOL"]="arm-linux-gnueabi-otool"

    S["OBJDUMP"]="arm-none-linux-gnueabihf-objdump"

    S["OBJCOPY"]="arm-none-linux-gnueabihf-objcopy"

    S["WINDMC"]="arm-linux-gnueabi-windmc"

    S["WINDRES"]="arm-linux-gnueabi-windres"

    S["STRIP"]="arm-none-linux-gnueabihf-strip"

    S["RANLIB"]="arm-none-linux-gnueabihf-gcc-ranlib"

    S["NM"]="arm-none-linux-gnueabihf-nm"

    S["LIPO"]="arm-linux-gnueabi-lipo"

    S["LD"]="arm-none-linux-gnueabihf-ld --sysroot=/home/aws-bhavesh/ti-am335x/tisdk/build/arago-tmp-external-arm-glibc/work/armv7at2hf-neon-linux-gnueabi/gcc/ar"\

    "m-9.2-r2019.12/recipe-sysroot "

    S["DLLTOOL"]="arm-linux-gnueabi-dlltool"

    S["AS"]="arm-none-linux-gnueabihf-as "

    S["AR"]="arm-none-linux-gnueabihf-gcc-ar"

     

    S["READELF"]="arm-poky-linux-gnueabi-readelf"

    S["OTOOL"]="arm-poky-linux-gnueabi-otool"

    S["OBJDUMP"]="arm-poky-linux-gnueabi-objdump"

    S["OBJCOPY"]="arm-poky-linux-gnueabi-objcopy"

    S["WINDMC"]="arm-poky-linux-gnueabi-windmc"

    S["WINDRES"]="arm-poky-linux-gnueabi-windres"

    S["STRIP"]="arm-poky-linux-gnueabi-strip"

    S["RANLIB"]="arm-poky-linux-gnueabi-gcc-ranlib"

    S["NM"]="arm-poky-linux-gnueabi-nm"

    S["LIPO"]="arm-poky-linux-gnueabi-lipo"

    S["LD"]="arm-poky-linux-gnueabi-ld --sysroot=/home/aws-bhavesh/gs8000-platform/build-fsp-am335x-gs8k-5.10-rt-test/tmp/work/armv7at2hf-neon-poky-linux-gnueabi"\

    "/gcc/9.5.0-r0/recipe-sysroot "

    S["DLLTOOL"]="arm-poky-linux-gnueabi-dlltool"

    S["AS"]="arm-poky-linux-gnueabi-as "

    S["AR"]="arm-poky-linux-gnueabi-gcc-ar"

     

    S["RAW_CXX_FOR_TARGET"]="arm-none-linux-gnueabihf-g++

     

    S["RAW_CXX_FOR_TARGET"]="arm-poky-linux-gnueabi-g++

     

     

    'CC_FOR_TARGET=arm-none-linux-gnueabihf-gcc

     

    'CC_FOR_TARGET=arm-poky-linux-gnueabi-gcc

     

    'CC=arm-none-linux-gnueabihf-gcc

     

    CC=arm-poky-linux-gnueabi-gcc

    I looked into the commits of meta-ti for both the yocto setup (TI-SDK & My Yocto). They are both at the same location. in teams of git logs.

    I tried to create simple TI image for AM335x-sk board  that was also not able to generate the needed gnueabihf-gcc compiler.

    To conclude above point we can say that 

    1. TI-SDK is able to generate gnueabihf-gcc compiler 
    2. My Yocto set up is not able to generate the gnueabihf-gcc compiler, it is creating gnueabi-gcc compiler (soft floating)
    3. Yocto setup from TI for AM335x-evm board is also creating gnueabi-gcc compiler (soft floating)

    The SDK generated from point 2 is having below compiler settings

    bhavesh@ubuntu:~/Project/Carrier/gs8000$ echo $CC
    arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/fsp/3.1.30/sysroots/armv7at2hf-neon-poky-linux-gnueabi
    bhavesh@ubuntu:~/Project/Carrier/gs8000$ echo $CFLAGS
    -O2 -pipe -g -feliminate-unused-debug-types
    

    The questions I have

    1. As shown in above out put $CC have the value "-mfloat-abi=hard"  in that dose it mean the "arm-poky-linux-gnueabi-gcc" is hard floating point compiler?
    2. What would be the main difference between these two arm-poky-linux-gnueabi-gcc & arm-none-linux-gnueabihf-gcc?
    3. Is there any other layer other then meta-ti is putting its effect on choosing the output type of gcc compiler ?

    Thanks & Regards,

    Bhavesh Shah

  • Hi Bhavesh,

    I need to work through a critical assignment before I can spend time to look into this here closer and get back with additional answers, so it won't be until next week before I can get back. Thanks for your patience.

    Regards, Andreas

  • Hi Andreas, 

    I have been looking into few points. I tried to compile a simple C code which is dealing with floating points and I tried to compile it with gnueabi-gcc compiler and gnueabihf-gcc compiler. I found difference in both of the compiled bin files and its output.

    Currently I am using the TI-SDK 8.2 bin installer which have the gnueabihf-gcc compiler in it, and trying to compile my Application.

    It is moving forward but as my application was written with older TI-SDK which had QT4 in it. that is causing some issue with compiling the application using TI-SDK 8.2 which is having QT5 as default in it.

    My requirement is if i can achieve the gnueabihf-gcc compiler from my yocto setup in which I have merged meta-qt4 in place of meta-qt5

    In this case i can use this yocto setup and SDK generated out of this image to compile my QT4 based application. Once i make sure this application is getting compiled. I can think of creating recipes to add those application into my yocto setup

    Thanks & Regards

    Bhavesh Shah 

  • Not sure if I understand all this correctly, let me try to summarize:

    1) You are able to build Qt4 (instead of Qt5) as part of the SDK v9.2 Yocto environment. This part is ok.

    2) You have trouble building your own Qt4-based applications using the compiler / devkit generated through the using the meta-toolchain-arago-tisdk Yocto target?

    Regards, Andreas