lpcware

build does not always search all the include paths

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by mspahr on Thu Aug 29 18:12:34 MST 2013
I am using LPCXpresso V5.2.6
The project is from LPWare/LPC11xx/Downloads/Software/Sample code bundle for LPC1xx peripherals using NXP LPCXpresso.
Project USB ROM MSC

Include paths (-I)
"${workspace_loc:/LPC11Uxx_Driver_Lib}"
"${workspace_loc:/CMSISv2p00_LPC11Uxx/inc}"
"${workspace_loc:/USB_ROM_MSC/inc}"
"${workspace_loc:/LPC11Uxx_Driver_Lib/inc}"


Sometimes the comiler call uses all of the paths.
Sometimes the compiler only tries the path in the 2nd line of the include list first.
If that fails it may try all the paths.
But it doesn't always retry with all of the paths.
It may go ahead and link using an old object file.
Is there a way to force build to use all of the include paths?
Two examples follow:
in both cases the file is in USB_ROM_MSC/inc

15:24:44 **** Incremental Build of configuration Release for project USB_ROM_MSC ****
make all
Building file: ../src/DiskImg.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DNDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p00_LPC11Uxx -I"C:\Documents and Settings\Mike\My Documents\Projects\Ghost\Copy of Test4\CMSISv2p00_LPC11Uxx\inc" -Os -g -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/DiskImg.d" -MT"src/DiskImg.d" -o "src/DiskImg.o" "../src/DiskImg.c"
../src/DiskImg.c:1:26: fatal error: app_usbd_cfg.h: No such file or directory
compilation terminated.
make: *** [src/DiskImg.o] Error 1

15:24:46 Build Finished (took 2s.266ms)


15:24:47 **** Incremental Build of configuration Debug for project LPC11Uxx_Driver_Lib ****
make all
make: Nothing to be done for `all'.

15:24:47 Build Finished (took 438ms)

15:24:48 **** Incremental Build of configuration Debug for project CMSISv2p00_LPC11Uxx ****
make all
make: Nothing to be done for `all'.

15:24:48 Build Finished (took 531ms)

15:24:49 **** Incremental Build of configuration Debug for project USB_ROM_MSC ****
make all
Building file: ../src/DiskImg.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p00_LPC11Uxx -I"C:\Documents and Settings\Mike\My Documents\Projects\Ghost\Copy of Test4\LPC11Uxx_Driver_Lib" -I"C:\Documents and Settings\Mike\My Documents\Projects\Ghost\Copy of Test4\CMSISv2p00_LPC11Uxx\inc" -I"C:\Documents and Settings\Mike\My Documents\Projects\Ghost\Copy of Test4\USB_ROM_MSC\inc" -I"C:\Documents and Settings\Mike\My Documents\Projects\Ghost\Copy of Test4\LPC11Uxx_Driver_Lib\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/DiskImg.d" -MT"src/DiskImg.d" -o "src/DiskImg.o" "../src/DiskImg.c"
Finished building: ../src/DiskImg.c

I have added I2C to the project and get the same problem in I2C.c not finding the paths.



15:10:33 **** Incremental Build of configuration Release for project USB_ROM_MSC ****
make all
Building file: ../src/i2c.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DNDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p00_LPC11Uxx -I"C:\Documents and Settings\Mike\My Documents\Projects\Ghost\Test4\CMSISv2p00_LPC11Uxx\inc" -Os -g -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/i2c.d" -MT"src/i2c.d" -o "src/i2c.o" "../src/i2c.c"
../src/i2c.c:31:18: fatal error: type.h: No such file or directory
compilation terminated.
make: *** [src/i2c.o] Error 1

15:10:35 Build Finished (took 1s.516ms)

15:10:35 **** Incremental Build of configuration Debug for project USB_ROM_MSC ****
make all
Building file: ../src/i2c.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p00_LPC11Uxx -I"C:\Documents and Settings\Mike\My Documents\Projects\Ghost\Test4\LPC11Uxx_Driver_Lib" -I"C:\Documents and Settings\Mike\My Documents\Projects\Ghost\Test4\CMSISv2p00_LPC11Uxx\inc" -I"C:\Documents and Settings\Mike\My Documents\Projects\Ghost\Test4\USB_ROM_MSC\inc" -I"C:\Documents and Settings\Mike\My Documents\Projects\Ghost\Test4\LPC11Uxx_Driver_Lib\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/i2c.d" -MT"src/i2c.d" -o "src/i2c.o" "../src/i2c.c"
Finished building: ../src/i2c.c

Building target: USB_ROM_MSC.axf

Outcomes