arm-gcc set-up not working

Thread Starter

ep.hobbyiest

Joined Aug 26, 2014
201
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.

Code:
~/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.
Code:
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 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?
 

visionofast

Joined Oct 17, 2018
106
you have to check existance of "arm-none-eabi-gcc" file in "/home/stech/compiler/gcc/gcc-arm-none-eabi-6-2017-q2-update/bin/" location.
if there's no file,you may need to compile the sources of gcc-arm package you have downloaded.or install them automatically using package managers like synaptic,apt-get,etc and set a new location.
 

MrSoftware

Joined Oct 29, 2013
2,273
It says cannot find a file, does that file exist or do you need a different path for that file? I'm not at my computer now, but there is a config file that you need to edit to change the path, i don't remember the file name but can check later. The keil uvision compiler is really nice and free for binaries under 32k, better than eclipse/gcc. But for larger binaries gcc will get the job done.
 

MrSoftware

Joined Oct 29, 2013
2,273
The config file I was thinking of is in the SDK directory under components/toolchain/gcc/Makefile.windows (assuming you're on Windows).

If you want to get setup for Eclipse (much better than command line gcc as you will have a visual debugger), then this article will get you going:
https://devzone.nordicsemi.com/tutorials/b/getting-started/posts/development-with-gcc-and-eclipse

It's from 2015 so probably a little outdated, but I was able to get things working using that as a reference.
 
Top