compile error in peripherals.c CMSIS SPI

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

compile error in peripherals.c CMSIS SPI

跳至解决方案
1,442 次查看
rjleiser
Contributor II

I added FlexConn3 and choose the SPI CMSIS option.

When I route the device and update the code, the code then fails to compile:

undefined reference to `SPI3_SignalEvent' peripherals.c /LPC54606_Project6/board line 419 C/C++

In peripherals.c

static void FLEXCOMM3_init(void) {
/* Initialize CMSIS SPI */
FLEXCOMM3_PERIPHERAL.Initialize(SPI3_SignalEvent);
/* Power control of CMSIS SPI */
FLEXCOMM3_PERIPHERAL.PowerControl(ARM_POWER_FULL);
}

In Peripherals.h:

/* Signal event function for component FLEXCOMM3*/
extern void SPI3_SignalEvent(uint32_t event);

 

I've tried clean and build. Deleting and then adding FlexConn3 in the peripherals view.

No joy.

The files are read-only anyway...

Any thoughts?

./board/peripherals.o: in function `FLEXCOMM3_init': LPC54606_Project6 C/C++ Problem
make: *** [makefile:64: all] Error 2 LPC54606_Project6 C/C++ Problem
make[1]: *** [makefile:73: LPC54606_Project6.axf] Error 1 LPC54606_Project6 C/C++ Problem
undefined reference to `SPI3_SignalEvent' peripherals.c /LPC54606_Project6/board line 419 C/C++ Problem

0 项奖励
回复
1 解答
1,433 次查看
Petr_H
NXP Employee
NXP Employee

Hi, 

It seems that you haven't created the SignalEvent callback. This is expected to be implement in your application code. There is a "Copy to clipboard" button that can provide you a template code that you can just paste to your C module (expecting the peripherals.h is included there).

Petr_H_0-1667554583179.png

best regards

Petr Hradsky

Config Tools Team

在原帖中查看解决方案

2 回复数
1,426 次查看
rjleiser
Contributor II

The wise man speaks. Awesomeness.

Thankyou.

0 项奖励
回复
1,434 次查看
Petr_H
NXP Employee
NXP Employee

Hi, 

It seems that you haven't created the SignalEvent callback. This is expected to be implement in your application code. There is a "Copy to clipboard" button that can provide you a template code that you can just paste to your C module (expecting the peripherals.h is included there).

Petr_H_0-1667554583179.png

best regards

Petr Hradsky

Config Tools Team