Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 10 months ago.
SPI5_BASE is undefined in PeripheralNames.h
I've exported the blink project from the online MBED compiler and imported it into Keil. When I try to build it, I get the following error:
mbed/TARGET_NUCLEO_F411RE/TARGET_STM/TARGET_NUCLEO_F411RE/PeripheralNames.h(58): error: #20: identifier "SPI5_BASE" is undefined
PeripheralNames.h contains the following code
typedef enum { SPI_1 = (int)SPI1_BASE, SPI_2 = (int)SPI2_BASE, SPI_3 = (int)SPI3_BASE, SPI_4 = (int)SPI4_BASE, SPI_5 = (int)SPI5_BASE } SPIName;
If I remove the SPI_5 part of it, it compiles without problems.
typedef enum { SPI_1 = (int)SPI1_BASE, SPI_2 = (int)SPI2_BASE, SPI_3 = (int)SPI3_BASE, SPI_4 = (int)SPI4_BASE } SPIName;
Am I doing something wrong with the exporting and importing into Keil?
1 Answer
9 years, 10 months ago.
I would check paths in the project, if they are set properly. Can you share the link to the example you exported? We can look at it.
Dear Martin, I don't know what the path should be like. The link to the repository is: http://developer.mbed.org/users/WilcoBonestroo/code/Nucleo_blink_led/
posted by 12 Jan 2015
I get this error, too. menu 'Project' -> 'Option for Target ...', 'Device' : STM32F401RCTx , Not 'F411RE' 411RE has 'SPI5' but 401RC not ?
posted by zhong pl 20 Jun 2015