Content originally posted in LPCWare by mspahr on Fri Aug 30 11:23:06 MST 2013
I know the paths are good, I can open the files it is looking for.
I can right click on the include statement and open decleration.
I have started over with a new workspace closer to the root instead of my documents.
I have imported LPWare/LPC11xx/Downloads/Software/"Sample code bundle for LPC1xx peripherals using NXP LPCXpresso".
I built LPC11Uxx_Driver_Lib
I built USB_ROM_MSC
This is the virgin sample with no modifications.
I get the following error:
10:03:58 **** 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:\Users\Mike\Ghost\Ver1\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
10:03:59 Build Finished (took 1s.375ms)
10:04:00 **** 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:\Users\Mike\Ghost\Ver1\LPC11Uxx_Driver_Lib" -I"C:\Users\Mike\Ghost\Ver1\CMSISv2p00_LPC11Uxx\inc" -I"C:\Users\Mike\Ghost\Ver1\USB_ROM_MSC\inc" -I"C:\Users\Mike\Ghost\Ver1\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
Building file: ../src/cr_startup_lpc11u.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p00_LPC11Uxx -I"C:\Users\Mike\Ghost\Ver1\LPC11Uxx_Driver_Lib" -I"C:\Users\Mike\Ghost\Ver1\CMSISv2p00_LPC11Uxx\inc" -I"C:\Users\Mike\Ghost\Ver1\USB_ROM_MSC\inc" -I"C:\Users\Mike\Ghost\Ver1\LPC11Uxx_Driver_Lib\inc" -Os -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/cr_startup_lpc11u.d" -MT"src/cr_startup_lpc11u.d" -o "src/cr_startup_lpc11u.o" "../src/cr_startup_lpc11u.c"
Finished building: ../src/cr_startup_lpc11u.c
DiskImg.c properties
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}"
The first time it tries to compile DiskImg.c it only uses the include path
"${workspace_loc:/CMSISv2p00_LPC11Uxx/inc}"
The file that it needs is in
"${workspace_loc:/USB_ROM_MSC/inc}"
It retries using all of the paths and that works.
This is the sample project with no modifications.
If I repeat the build, it gets the same error on DiskImg.c but does not retry with the other paths.
It then links using the old object file.
I tried changing the order of the includes, both for the file and for the project, same error.
I have repeated the build several times. Sometimes it retries with all paths, sometimes it doesn't.
With the sample project, it only has trouble with DiskImg.c
It I modify main.c and build, it passes all of the include paths to compile main.c.
If I add another c file to the project, it has the same problem of searching the wrong directory
and may or may not retry with all of the paths.
By the way, I am using Microsoft XP