compile error in peripherals.c CMSIS SPI

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

compile error in peripherals.c CMSIS SPI

ソリューションへジャンプ
1,511件の閲覧回数
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,502件の閲覧回数
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,495件の閲覧回数
rjleiser
Contributor II

The wise man speaks. Awesomeness.

Thankyou.

0 件の賞賛
返信
1,503件の閲覧回数
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