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

Arm-gcc error in Mac OSX

Hi,

I am trying to set up the development tools for the NRF52 on my Mac by following this tutorial aaroneiche.com/.../

I am getting the following error when i try to compile the code using the make command

Compiling file: system_nrf52.c make: /usr/local/gcc-arm/gcc-arm-none-eabi-5_4-2016q2/ /bin/arm-none-eabi-gcc: No such file or directory make: [_build/system_nrf52.o] Error 1

What could be the reason for this? Any inputs would be appreciated?

  • Read the blog/tutorial by Nordic about Eclipse/Gcc. Especially the step about editing /components/toolchain/gcc/Makefile.posix. Change the first definition of ....ROOT to "/usr/bin" or "/usr" or where ever the arm gcc binary is installed. It seems the toolchain pieces these definitions together to get the path to the compiler. The error message shows the definitions are not correct for your installation.

    My answer is inexact from my limited experience on Linux , you will need to discover the exact details yourself.

  • Yes i tried but the same thing is happening. I also have installed using macports. Are both the things interfering with each other

  • First find out where the compiler is installed, at a terminal: >which arm-none-eabi-gcc

    (For details about the which command: >man which)

    Then edit Makefile.posix until the toolchain produces the same path. The error message tells you the path it has cobbled together from Makefile.posix definitions.

    I am not familiar with macports. I would guess that it only helps you install, and after that, does not enter into the equation.

  • Thanks butch. Using the which command, the path shown by the terminal is /opt/local/bin/arm-none-eabi-gcc. The version is 5.4.1. Now in the makefile.posix this should be the settings

    1. GNU ROOT PATH = /opt/local
    2. GNU Version = 5.4.1
    3. GNU Prefix = arm-none-eabi.

    The error is the same

    make: *** [_build/system_nrf52.o] Error 1 make: /opt/local/ /bin/arm-none-eabi-gcc: No such file or directory

  • Note that the error message says ".../ /...." i.e. there is an extra space and forward slash. Are you sure that you didn't define GNU_ROOT_PATH = "/opt/local/ " (where there is an extra forward slash, and space? If not, I don't have an explanation, but you might be able to read and debug the 'code' that cobbles together the definitions, code in the Makefiles?

Related