PROCESSOR-SDK-OMAPL138: Issues in cross compiling

Part Number: PROCESSOR-SDK-OMAPL138
Other Parts Discussed in Thread: OMAPL138

Hi,

    I am using OMAPL138 SDK v6.03. While compiling a simply C Hello world program, it shows an error saying that "stdio.h: no file found". I set the PATH as export PATH=”<SDK INSTALL DIR>/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH same as specified in the guide https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Overview/GCC_ToolChain.html. I don't know what I am missing. 

  • Hi Rejin,

    Please see the file Rules.make in the SDK installation directory:

    export CROSS_COMPILE=$(LINUX_DEVKIT_PATH)/sysroots/x86_64-arago-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-
    export CC=$(CROSS_COMPILE)gcc --sysroot=$(SDK_PATH_TARGET)

    So please ensure you setup the cross compile toolchain correctly, especially to use '--sysroot' in the compile command.

  • Hi Rejin,

    what Bin suggested should work but why not simple use ("source") the environment-setup script from the linux-devkit folder? And then you can compile using $CC and $CXX and $LD and such and it all should just work including headers and libraries etc.

    Regards, Andreas

  • Hi Bin,

         While doing the above export command I got an error as "bash: export: `--sysroot=$(SDK_PATH)/linux-devkit/sysroots/armv5e-oe-linux-gnueabi/': not a valid identifier". 

  • Hi Andreas,

       I have no idea how to use $CC, $CXX and $LD command. I am completely new with all this commands. Any guide to use this. 

  •      While doing the above export command I got an error as "bash: export: `--sysroot=$(SDK_PATH)/linux-devkit/sysroots/armv5e-oe-linux-gnueabi/': not a valid identifier". 

    Please instead do what Andreas recommended, it will resolve this error.

    cd linux-devkit/
    source environment-setup