Hi Omar. All projects, including the ones you mentioned, were open and the build still fails. However, I did find the problem.
The problem occurs when compiling peripherals_lib. gpio.c compiles correctly, then the compilation of i2c.c fails as follows:
13:54:22 **** Build of configuration flash for project peripherals_lib ****
make -r all
Building file: ../src/gpio.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -D__USE_CMSIS -DDEBUG -D__CODE_RED -DCORE_M0PLUS -DCR_INTEGER_PRINTF -D__LPC84X__ -I"/home/albert/Documents/MCUXpresso_11.0.0_2516/workspace/peripherals_lib/inc" -I"/home/albert/Documents/MCUXpresso_11.0.0_2516/workspace/utilities_lib/inc" -I"/home/albert/Documents/MCUXpresso_11.0.0_2516/workspace/common/inc" -O0 -fno-common -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -D__REDLIB__ -fstack-usage -specs=redlib.specs -MMD -MP -MF"src/gpio.d" -MT"src/gpio.o" -MT"src/gpio.d" -o "src/gpio.o" "../src/gpio.c"
Finished building: ../src/gpio.c
Building file: ../src/i2c.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -D__USE_CMSIS -DDEBUG -D__CODE_RED -DCORE_M0PLUS -DCR_INTEGER_PRINTF -D__LPC84X__ -I"/home/albert/Documents/MCUXpresso_11.0.0_2516/workspace/peripherals_lib/inc" -I"/home/albert/Documents/MCUXpresso_11.0.0_2516/workspace/utilities_lib/inc" -I"/home/albert/Documents/MCUXpresso_11.0.0_2516/workspace/common/inc" -O0 -fno-common -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -D__REDLIB__ -fstack-usage -specs=redlib.specs -MMD -MP -MF"src/i2c.d" -MT"src/i2c.o" -MT"src/i2c.d" -o "src/i2c.o" "../src/i2c.c"
In file included from ../src/i2c.c:10:
/home/albert/Documents/MCUXpresso_11.0.0_2516/workspace/peripherals_lib/inc/i2c.h:24:10: fatal error: lpc8xx.h: No such file or directory
#include "lpc8xx.h"
^~~~~~~~~~
compilation terminated.
src/subdir.mk:27: recipe for target 'src/i2c.o' failed
make: *** [src/i2c.o] Error 1
"make -r all" terminated with exit code 2. Build might be incomplete.
13:54:22 Build Failed. 3 errors, 0 warnings. (took 495ms)
Here is how I fixed it. In i2c.h, find the following include statement:
#include "lpc8xx.h"
This statement fails on Linux because the search is case sensitive, and the file it is searching for is named LPC8xx.h (capital letters on LPC) contained in common. I believe this will not fail under Windows because Windows is not case-sensitive about file names.
Note that i2c.c and gpio.c both have the correct include statement, but i2c.h does not, and i2c.h is encountered during the compilation of i2c.c. Since the compiler cannot find lpc8xx.h it flags an error and the peripherals library is not built.
I changed the include statement in i2c.h from lpc8xx.h to LPC8xx.h and now everything works. :smileyhappy:
Also, I found another instance of the same problem: In the Ctimer_PWM example, Ctimer_PWM_main.c includes Ctimer_PWM.h, however the file is actually named Ctimer_pwm.h. Also, Ctimer_PWM_main.c includes SWM.h but the file is actually named swm.h.
I suspect there are more of these, so it might be worth checking the other examples.
Thanks for your assistance, Omar, and please let the people at NXP know the problem so they can correct it on the next revision.