Hi,
I am working a project with a lpc1754 and using MCUXpresso IDE v11.4.1 to compile the code.
The following is defined at the top of the source file :
#ifdef __USE_CMSIS
#include "LPC17xx.h"
#endif
#include <cr_section_macros.h>
#include "board.h"
The compiler will find lpc17xx.h and cr_section_macros.h but not board.h even though the directory path is included in the settings :
-I"/media/data/tek/can_modules/can-interface/versie_1/fw-mcux11/lpc_chip_175x_6x/inc"
-I"/media/data/tek/can_modules/can-interface/versie_1/fw-mcux11/can-interface_board_lpc1754/inc"
-I"/media/data/tek/can_modules/can-interface/versie_1/fw-mcux11/cmsis_core_lpc17xx/inc"
-I"/media/data/tek/can_modules/can-interface/versie_1/fw-mcux11/2020011-test/inc"
../src/2020011-test.c:14:10: fatal error: board.h: No such file or directory
When using the Open declaration function (F3) it will jump to the subroutine.
I have been at this for the last two days, but can not find why it happens and not how to solve it.
Can someone give me a hint where to start looking or how to solve this ?
Most appreciated,
Roelof
Hi @roelofth68,
Are you trying to port a project into MCUXpresso? Or was this project built inside of this IDE? MCUXpresso has the LPCOpen libraries. I would recommend you to import an example project for your MCU, using the LPCXpresso1769 board and work from there.
One last thing, to ensure the proper functionality of our products, we highly encourage you to use the latest version of our IDE (version 11.6.0 build 8187).
BR,
Edwin.
Hi Edwin,
I imported projects from lpcopen_v2p10 : lpc_board_nxp_lpcexpresso_1769, lpc_chip_175x_6x and also some example projects.
cmsisv2p00_17xx was also imported.
Then I made a copy of the lpc_board_nxp_lpcxpresso_1769 project to can-interface_board_lpc1754 and started adapting this to my project/board. It compiles without errors/warnings into a library. The lpc_chip_175x_6x project compiles into a library without errors/warnings.
This is all done in the IDE now at version 11p6p0.
I created a new test project just for trying to figure out the directory path settings as I am having trouble with just that. The IDE will load the header file with F3 but the arm-none-eabi-gcc compiler will not.
Ok, just found a problem (or I hope so) :
My settings in C build -> C compiler -> Includes resolve to :
-I"/media/data/tek/can_modules/can-interface/versie_1/fw-mcux11/cmsis_core_lpc17xx/inc"
-I"/media/data/tek/can_modules/can-interface/versie_1/fw-mcux11/lpc_chip_175x_6x/inc"
-I"/media/data/tek/can_modules/can-interface/versie_1/fw-mcux11/can-interface_board_lpc1754/inc"
-I"/media/data/tek/can_modules/can-interface/versie_1/fw-mcux11/2020011-test/inc"
But when looking at the compiler command line only two includes appear :
-I"/media/data/tek/can_modules/can-interface/versie_1/fw-mcux11/2020011-test/inc"
-I"/media/data/tek/can_modules/can-interface/versie_1/fw-mcux11/cmsis_core_lpc17xx/inc"
Checking if the include for board.h is ok :
rth@castle:~$ ll /media/data/tek/can_modules/can-interface/versie_1/fw-mcux11/can-interface_board_lpc1754/inc
total 12
-rw-rw-rw-+ 1 rth domainuser 7401 Jul 24 22:38 board_api.h
-rw-rw-rw-+ 1 rth domainuser 1991 Aug 16 18:00 board.h
I changed the order of the include lines, got an error on loading the board.h file but all four include settings are on the command line for the sysinit.c file but not the 2020011-test.c file which is in the same directory.
Ok, when looking at the properties of the 2020011-test.c file (I did not look at the file properties in detail before) I am missing the needed includes which are there for the sysinit.c file.
Now I included the missing include lines in the properties for the 2020011-test.c file. Something changes because now I got a whole different list of warnings and errors
The questions are now :
Why do the (global) settings not propagate to the included source files ?
How can I make sure that the (global) settings I make are also true for the included source files ?
Roelof