3

I'm trying to compile the FreeRTOS port to Raspberry Pi, but when I compile, I get the error:

arm-none-eabi-ld: cannot find -lgcc
arm-none-eabi-ld: cannot find -lc
make: *** [kernel.elf] Error 1

I'm not sure why this is so. I'm very new to crosscompiling, so I'm suessing I've not set a flag somewhere. I've downloaded the GNU toolchain for ARM from https://launchpad.net/gcc-arm-embedded and extracted it into my /usr/local directory and updated the path variable too. If i run a 'arm-none-eabi-gcc --version', I get the correct output:

arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.7.4 20140401      
(release) [ARM/embedded-4_7-branch revision 209195]
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The makefile for the project specifies two lines, which I've modified as follows:

kernel.elf: LDFLAGS += -L "/usr/local/gcc-arm-none-eabi-4_7-2014q2/bin/" -lgcc
kernel.elf: LDFLAGS += -L "/usr/local/gcc-arm-none-eabi-4_7-2014q2/lib/" -lc

I'm guessing this is where I need to change to the correct path, but I'm unsure what the correct path is...

I'm running Ubuntu 12.04, if that matters...

Any pointers much appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.