I try to compile an FC in which I also have included the SPI function.
The SPI ports are undeclared?
My target is STM32F303RE.
In my hardware, I have two peripherals connected at SPI1 and SPI3.
Here the error message
Code: Select all
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c: In function 'FC_CAL_SPI_Master_Init_1':
SalcombeV1.0_RTC.c:255:27: error: 'port' undeclared (first use in this function)
#define MX_SPI_SCK_PORT_1 port
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_SPI_SCK_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c:50:28: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_SCK_PORT_X CAL_APPEND(MX_SPI_SCK_PORT_, MX_SPI_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c:218:17: note: in expansion of macro 'MX_SPI_SCK_PORT_X'
HAL_GPIO_Init(MX_SPI_SCK_PORT_X, &GPIO_InitStruct);
^
SalcombeV1.0_RTC.c:255:27: note: each undeclared identifier is reported only once for each function it appears in
#define MX_SPI_SCK_PORT_1 port
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_SPI_SCK_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c:50:28: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_SCK_PORT_X CAL_APPEND(MX_SPI_SCK_PORT_, MX_SPI_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c:218:17: note: in expansion of macro 'MX_SPI_SCK_PORT_X'
HAL_GPIO_Init(MX_SPI_SCK_PORT_X, &GPIO_InitStruct);
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c: In function 'FC_CAL_SPI_Master_Uninit_1':
SalcombeV1.0_RTC.c:255:27: error: 'port' undeclared (first use in this function)
#define MX_SPI_SCK_PORT_1 port
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_SPI_SCK_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c:50:28: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_SCK_PORT_X CAL_APPEND(MX_SPI_SCK_PORT_, MX_SPI_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c:246:17: note: in expansion of macro 'MX_SPI_SCK_PORT_X'
HAL_GPIO_Init(MX_SPI_SCK_PORT_X, &GPIO_InitStruct);
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c: In function 'FC_CAL_SPI_Master_Init_2':
SalcombeV1.0_RTC.c:179:27: error: 'port' undeclared (first use in this function)
#define MX_SPI_SCK_PORT_2 port
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_SPI_SCK_PORT_2'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c:50:28: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_SCK_PORT_X CAL_APPEND(MX_SPI_SCK_PORT_, MX_SPI_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c:218:17: note: in expansion of macro 'MX_SPI_SCK_PORT_X'
HAL_GPIO_Init(MX_SPI_SCK_PORT_X, &GPIO_InitStruct);
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c: In function 'FC_CAL_SPI_Master_Uninit_2':
SalcombeV1.0_RTC.c:179:27: error: 'port' undeclared (first use in this function)
#define MX_SPI_SCK_PORT_2 port
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_SPI_SCK_PORT_2'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c:50:28: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_SCK_PORT_X CAL_APPEND(MX_SPI_SCK_PORT_, MX_SPI_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c:246:17: note: in expansion of macro 'MX_SPI_SCK_PORT_X'
HAL_GPIO_Init(MX_SPI_SCK_PORT_X, &GPIO_InitStruct);
^
Error(s) in build
C:\Program Files (x86)\Flowcode 7\compilers\STARM\batch\stm32comp.bat reported error code 1