lpcware

Getting compilation to work with projects outside the workspce directory: linker path problem

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by robin48gx on Fri Aug 08 02:01:11 MST 2014
Hi

Hope someone can help me here. I want to use git to store the code
I am producing, and git is not very good with symbolic links.
I thus need to store the project outside the ~/workspace directory.
That way my source code can be stored in git, along with my documentation/schematic
and other processor implementation directories.

I have done this and have worked out how to get the include
directories pointing back to the workspace ones (i.e. the c code compiles)
but I cannot seem to get the linker to find the libary files.

I get this:

Building target: MagneticSensor_under_git.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L/lpc_board_nxp_lpcxpresso_1549/Debug -L"/home/robin/workspace/lpc_chip_15xx/Debug" -Xlinker -Map="MagneticSensor_under_git.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "MagneticSensor_under_git_Debug.ld" -o "MagneticSensor_under_git.axf"  ./src/MagneticSensor_under_git.o ./src/can.o ./src/cr_startup_lpc15xx.o ./src/crp.o ./src/root.o ./src/sysinit.o   -lliblpc_chip_15xx -lliblpc_board_nxp_lpcxpresso_1549
/usr/local/lpcxpresso_7.3.0_186/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: cannot find -lliblpc_chip_15xx
/usr/local/lpcxpresso_7.3.0_186/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: cannot find -lliblpc_board_nxp_lpcxpresso_1549
collect2: error: ld returned 1 exit status
make: *** [MagneticSensor_under_git.axf] Error 1

I am obviously missing something, and need to get the linker to find what it should.
I have been ediing the values using project properties.

Outcomes