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.

PROCESSOR-SDK-AM62X: aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mthumb’ ‘-mfpu=neon’ ‘-mfloat-abi=hard’

Part Number: PROCESSOR-SDK-AM62X

I modified the configuration of a customer board based on the AM62x-evm, and the image and sdk can be successfully compiled through the command.
$ MACHINE=am62xx-customer bitbake tisdk-customer-image
$ MACHINE=am62xx-customer bitbake meta-toolchain-arago-tisdk

But encountered a problem with the compiler parameters when using the SDK to compile the APP. 

aarch64-oe-linux-gcc -g -ggdb -rdynamic -ldl -D_DEBUG=1 -W -Wall -fPIC -Wstrict-prototypes -Wundef -Wunknown-pragmas -Wunreachable-code -D_HAS_LCD_UI=1 -march=armv8-a -mthumb -mfpu=neon -mfloat-abi=hard -fvisibility=default -Wfloat-equal -W -Wimplicit -Wconversion -I/home/user/APP/src/include --sysroot=/home/user/cross_compile/sysroots/aarch64-oe-linux -c -o config_parser/cfg_parser.o config_parser/cfg_parser.c
aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mthumb’
aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mfpu=neon’
aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mfloat-abi=hard’
<builtin>: recipe for target 'config_parser/cfg_parser.o' failed
make[1]: *** [config_parser/cfg_parser.o] Error 1

https://developer.arm.com/Processors/Cortex-A53 

In the properties of Cortex-A53, it supports neon and fpu. How to make cross-compilation tools support this? Thanks.

Reagrds,
Stephen

  • The expected use of the SDK-installer included cross-toolchain is as follows (based on https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/09_00_01/exports/docs/linux/Overview/GCC_ToolChain.html, it will work the same for any other SDK v8.x and SDK v9.x releases for all AM62xx devices)

    a0797059@dasso:~/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_00_01_03
    $ source linux-devkit/environment-setup
    [linux-devkit]:~/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_00_01_03> cat << EOF > helloworld.c
    > #include <stdio.h>
    
     int main() {
         printf ("Hello World from TI!!!\n");
         return 0;
     }
    > EOF
    [linux-devkit]:~/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_00_01_03> $CC helloworld.c -o helloworld
    [linux-devkit]:~/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_00_01_03> file helloworld
    helloworld: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=45febe658a46c3c7f09bad18f9828b8ebb3f8f4e, for GNU/Linux 3.14.0, with debug_info, not stripped

    Can you see if you can re-create this?

    Regards, Andreas

  • Hi Andreas,

    The toolchain is worked well. Just don't recognize these three parameters.

    $ source ~/cross_compile/environment-setup
    [linux-devkit]:~/tmp> vi helloworld.c
    [linux-devkit]:~/tmp> $CC helloworld.c -o helloworld
    [linux-devkit]:~/tmp> file helloworld
    helloworld: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=45febe658a46c3c7f09bad18f9828b8ebb3f8f4e, for GNU/Linux 3.14.0, with debug_info, not stripped
    [linux-devkit]:~/tmp>
    [linux-devkit]:~/tmp> $CC -mthumb -mfpu=neon -mfloat-abi=hard
    aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mthumb’
    aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mfpu=neon’
    aarch64-oe-linux-gcc: error: unrecognized command-line option ‘-mfloat-abi=hard’
    aarch64-oe-linux-gcc: fatal error: no input files
    compilation terminated.
    [linux-devkit]:~/tmp>

    Regards,Stephen

  • Just don't recognize these three parameters.

    Ah ok good. I just consulted with a colleague, he said those particular options are only available on the 32bit compiler, and this is the aarch64 gcc, so they do not apply. So if you are trying to port an "old" project to 64bit you'd want to remove them from your make environment.

    Regards, Andreas

  • It was indeed encountered when porting a 32bit program. I will remove these,thanks.