Project set up using MCUxpresso configuration tool won't compile

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Project set up using MCUxpresso configuration tool won't compile

1,521 次查看
andrew_clifford
Contributor II

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!

0 项奖励
回复
4 回复数

1,303 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Andrew

For QN9080,  PIN config tool and Clock config tool are supported. But Peripheral config tool are not.

I tested Pin config update from my side, I didn't see any build error. Can you please refer it ?

If you still meet problem, could you please provide me more information of how to reproduce your issue? Thanks.

Have a great day,
Jun Zhang

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复

1,303 次查看
andrew_clifford
Contributor II

Hi Jun Zhang,

Thank you for your reply and the video.

I see from your video that you started with one of the demo projects. If I do this, mine compiles as well, but i wanted to start with a "clean" project, so I followed the instructions in section 6 of the MCUXpresso IDE USer Guide to creat a new project using installed SDK part support (my guess is that it is here that I have gone wrong). 

I have also attached an image of my pin setup. When the project first opened and only had one of the debug pins selected, it compiled fine.

PinSetup.jpg

0 项奖励
回复

1,303 次查看
andrew_clifford
Contributor II

Looking through the forums, I found a similar problem (but in Chinese, which is why I didn't see it before!). Interestingly, the guy had the problem the day before me!

Anyway, here is the link to it: https://community.nxp.com/thread/496544

Lukas Heczko provided the solution (if you are reading this lukash, thank you!):

Hi Jon,

 

I was able to reproduce your issue. It's caused by missing #include "fsl_gpio.h" in the generated pin_mux.c file when GPIO pin direction is configured in the Pins tool.

 

Attached you can find patch with hot fix of the issue. To apply the patch, please copy the content of the archive into the tool's data folder:

  • Windows: c:\ProgramData\NXP\mcu_data_v5
  • Linux/Mac: /home/<USER>/.nxp/mcu_data_v5

 

This issue will be fixed in the next MCUXpresso Configuration Tools release.

 

Thank you for reporting this issue and we are sorry for the inconvenience!

 

Regards,

Lukas

If you go to the linked post, you can download the hotfix (I can't see how to add attachments).

As an aside, to the moderators, is every post moderated, or after a few do my posts come through straight away?

0 项奖励
回复

1,303 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

HI Andrew,

I saw Lukas' response this morning. That's very good.

Regarding to the moderators, I am not sure if every post needs to be moderated. but from what I view, nearly every post. we have many moderators worldwide manage our community space. For example, if we see malicious intrusion flood the screen, we can tackle it in time.

Best Regards,

Jun Zhang

0 项奖励
回复