This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52 gcc set-up error

Hi,

After long time again started working on nordic controller's. 
Previously my pc was properly configured for NRF5x environment which includes gcc and flahser.

Recently i got nrf52832 board and i started working on..

now, I set up the path for arm-none-eabi-gcc toolchain. and export the path arm-none-eabi-gcc toolchain..
But while compiling i got following error's.

~/projects/nrf5x/sdk/nRF5_SDK_15.2.0_9412b96/examples/peripheral/blinky/pca10040/blank/armgcc
/home/stech/compiler/gcc/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc: 1: /home/stech/compiler/gcc/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc: ELF: not found
/home/stech/compiler/gcc/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc: 2: /home/stech/compiler/gcc/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc: Syntax error: "(" unexpected
Cannot find: '/home/stech/compiler/gcc/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc'.
Please set values in: "/home/stech/projects/nrf5x/sdk/nRF5_SDK_15.2.0_9412b96/components/toolchain/gcc/Makefile.posix"
according to the actual configuration of your system.
../../../../../../components/toolchain/gcc/Makefile.common:129: *** Cannot continue.  Stop.

And changed the file nRF5_SDK_15.2.0_9412b96/components/toolchain/gcc/Makefile.posix.

following is the updated file.

GNU_INSTALL_ROOT ?= /home/stech/compiler/gcc/gcc-arm-none-eabi-6-2017-q2-update/bin/
GNU_VERSION ?= 6.3.1
GNU_PREFIX ?= arm-none-eabi

I am using SDK 15.02 and i was trying the blinky from following path

/examples/peripheral/blinky/pca10040/blank/armgcc

  • Hi Again,

    Here are few more details,

    when i tried to check the version then also getting error.

    arm-none-eabi-gcc --version
    bash: /opt/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc: cannot execute binary file: Exec format error

    i am using ubuntu 16.04 32-bit..

    here are the arm-gcc version i tried.

    gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2

    gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2

    gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2

    what could be the problem?

  • Hi,

     

    I suspect you've downloaded the 64-bit binary of gcc.

    You can check this with the "file" program:

    file /path/to/arm-none-eabi-gcc

    Here's the output on my PC, which is a 64-bit installation:

    $ file /opt/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-gcc
    /opt/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=285d78b4cb3e9beed1eb7191539803fc960f16f6, stripped

    the prebuild binaries were switched to 64 bit some years ago. The latest one with 32 bit linux binaries is "5-2016-q3-update"

    Kind regards,

    Håkon

  • yes, the issue was of os version. I was using 64-bit version and my os is of 32-bit.

    It is working fine now...

Related