compile error in peripherals.c CMSIS SPI

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

compile error in peripherals.c CMSIS SPI

Jump to solution
1,443 Views
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 Kudos
Reply
1 Solution
1,434 Views
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

View solution in original post

2 Replies
1,427 Views
rjleiser
Contributor II

The wise man speaks. Awesomeness.

Thankyou.

0 Kudos
Reply
1,435 Views
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