AnsweredAssumed Answered

Project set up using MCUxpresso configuration tool won't compile

Question asked by Andrew Clifford on Feb 27, 2019
Latest reply on Feb 27, 2019 by ZhangJennie

Hi, I'm sure I'm doign something stupid here, but I have created a new project for my QN9080DK and set it up using the pin configuration tool. I set up various GPIOs, interrupts and ports (SPI, PWMs).

 

When I then compile it, I get a load of errors that suggest it can't find fsl_gpio.h. It is listed in the files in the project explorer, but I can't work out where to include it in the source code. 


The errors I get are as follows:

 

07:33:07 **** Incremental Build of configuration Debug for project CoreOrientationPrototype2 ****
make -r -j8 all
Building file: ../source/CoreOrientationPrototype2.c
Building file: ../board/pin_mux.c
Invoking: MCU C Compiler
Invoking: MCU C Compiler
arm-none-eabi-gcc -DSDK_OS_BAREMETAL -DFSL_RTOS_BM -DCR_INTEGER_PRINTF -DPRINTF_FLOAT_ENABLE=0 -DCPU_QN9080C -DCPU_QN9080C_cm4 -DSDK_DEBUGCONSOLE=0 -D__MCUXPRESSO -D__USE_CMSIS -DDEBUG -D__REDLIB__ -I../board -I../source -I../ -I../drivers -I../CMSIS -I../utilities -I../startup -O0 -fno-common -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -D__REDLIB__ -specs=redlib.specs -MMD -MP -MF"source/CoreOrientationPrototype2.d" -MT"source/CoreOrientationPrototype2.o" -MT"source/CoreOrientationPrototype2.d" -o "source/CoreOrientationPrototype2.o" "../source/CoreOrientationPrototype2.c"
arm-none-eabi-gcc -DSDK_OS_BAREMETAL -DFSL_RTOS_BM -DCR_INTEGER_PRINTF -DPRINTF_FLOAT_ENABLE=0 -DCPU_QN9080C -DCPU_QN9080C_cm4 -DSDK_DEBUGCONSOLE=0 -D__MCUXPRESSO -D__USE_CMSIS -DDEBUG -D__REDLIB__ -I../board -I../source -I../ -I../drivers -I../CMSIS -I../utilities -I../startup -O0 -fno-common -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -D__REDLIB__ -specs=redlib.specs -MMD -MP -MF"board/pin_mux.d" -MT"board/pin_mux.o" -MT"board/pin_mux.d" -o "board/pin_mux.o" "../board/pin_mux.c"
../board/pin_mux.c: In function 'BOARD_InitPins':
../board/pin_mux.c:77:5: error: unknown type name 'gpio_pin_config_t'
gpio_pin_config_t SW1_INPUT_config = {
^~~~~~~~~~~~~~~~~
../board/pin_mux.c:78:9: error: field name not in record or union initializer
.pinDirection = kGPIO_DigitalInput,
^
../board/pin_mux.c:78:9: note: (near initialization for 'SW1_INPUT_config')
../board/pin_mux.c:78:25: error: 'kGPIO_DigitalInput' undeclared (first use in this function)
.pinDirection = kGPIO_DigitalInput,
^~~~~~~~~~~~~~~~~~
../board/pin_mux.c:78:25: note: each undeclared identifier is reported only once for each function it appears in
../board/pin_mux.c:79:9: error: field name not in record or union initializer
.outputLogic = 0U
^
../board/pin_mux.c:79:9: note: (near initialization for 'SW1_INPUT_config')
../board/pin_mux.c:79:24: warning: excess elements in scalar initializer
.outputLogic = 0U
^~
../board/pin_mux.c:79:24: note: (near initialization for 'SW1_INPUT_config')
../board/pin_mux.c:82:5: warning: implicit declaration of function 'GPIO_PinInit'; did you mean 'GPIO_IRQS'? [-Wimplicit-function-declaration]
GPIO_PinInit(BOARD_INITPINS_SW1_INPUT_GPIO, BOARD_INITPINS_SW1_INPUT_PIN, &SW1_INPUT_config);
^~~~~~~~~~~~
GPIO_IRQS
../board/pin_mux.c:84:5: error: unknown type name 'gpio_pin_config_t'
gpio_pin_config_t SW2_INPUT_config = {
^~~~~~~~~~~~~~~~~
../board/pin_mux.c:85:9: error: field name not in record or union initializer
.pinDirection = kGPIO_DigitalInput,
^
../board/pin_mux.c:85:9: note: (near initialization for 'SW2_INPUT_config')
../board/pin_mux.c:86:9: error: field name not in record or union initializer
.outputLogic = 0U
^
../board/pin_mux.c:86:9: note: (near initialization for 'SW2_INPUT_config')
../board/pin_mux.c:86:24: warning: excess elements in scalar initializer
.outputLogic = 0U
^~
../board/pin_mux.c:86:24: note: (near initialization for 'SW2_INPUT_config')
../board/pin_mux.c:91:5: error: unknown type name 'gpio_pin_config_t'
gpio_pin_config_t ADXL350_INT1_config = {
^~~~~~~~~~~~~~~~~
../board/pin_mux.c:92:9: error: field name not in record or union initializer
.pinDirection = kGPIO_DigitalInput,
^
../board/pin_mux.c:92:9: note: (near initialization for 'ADXL350_INT1_config')
../board/pin_mux.c:93:9: error: field name not in record or union initializer
.outputLogic = 0U
^
../board/pin_mux.c:93:9: note: (near initialization for 'ADXL350_INT1_config')
../board/pin_mux.c:93:24: warning: excess elements in scalar initializer
.outputLogic = 0U
^~
../board/pin_mux.c:93:24: note: (near initialization for 'ADXL350_INT1_config')
../board/pin_mux.c:98:5: error: unknown type name 'gpio_pin_config_t'
gpio_pin_config_t ADXL350_INT2_config = {
^~~~~~~~~~~~~~~~~
../board/pin_mux.c:99:9: error: field name not in record or union initializer
.pinDirection = kGPIO_DigitalInput,
^
../board/pin_mux.c:99:9: note: (near initialization for 'ADXL350_INT2_config')
../board/pin_mux.c:100:9: error: field name not in record or union initializer
.outputLogic = 0U
^
../board/pin_mux.c:100:9: note: (near initialization for 'ADXL350_INT2_config')
../board/pin_mux.c:100:24: warning: excess elements in scalar initializer
.outputLogic = 0U
^~
../board/pin_mux.c:100:24: note: (near initialization for 'ADXL350_INT2_config')
../board/pin_mux.c:215:5: warning: implicit declaration of function 'GPIO_SetRisingEdgeInterrupt' [-Wimplicit-function-declaration]
GPIO_SetRisingEdgeInterrupt(GPIOA, BOARD_INITPINS_ADXL350_INT1_PIN | BOARD_INITPINS_ADXL350_INT2_PIN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../board/pin_mux.c:217:5: warning: implicit declaration of function 'GPIO_SetFallingEdgeInterrupt' [-Wimplicit-function-declaration]
GPIO_SetFallingEdgeInterrupt(GPIOA, BOARD_INITPINS_SW1_INPUT_PIN | BOARD_INITPINS_SW2_INPUT_PIN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../board/pin_mux.c:219:5: warning: implicit declaration of function 'GPIO_EnableInterrupt' [-Wimplicit-function-declaration]
GPIO_EnableInterrupt(GPIOA, BOARD_INITPINS_SW1_INPUT_PIN | BOARD_INITPINS_SW2_INPUT_PIN | BOARD_INITPINS_ADXL350_INT1_PIN | BOARD_INITPINS_ADXL350_INT2_PIN);
^~~~~~~~~~~~~~~~~~~~
make: *** [board/subdir.mk:29: board/pin_mux.o] Error 1
make: *** Waiting for unfinished jobs....
Finished building: ../source/CoreOrientationPrototype2.c

07:33:08 Build Finished (took 599ms)

Any suggestions?

 

Thanks!

Outcomes