2019-08-21 11:20 AM
I am attempting to create a program to implement SPI communication from my STM32H753XI MCU, all I did to do this was start a new project in Keil's uVision and generate the code from Cube after selecting my pinouts.
Once my code was generated, however, I attempted to compile it and got 30 errors regarding identifiers that haven't been defined. These appear to be structs and enums from other header files that haven't been included in my project when I generated the code, I've listed examples below.
C:\Users\User\AppData\Local\Arm\Packs\Keil\STM32H7xx_DFP\2.3.0\CMSIS\Driver\SPI_STM32H7xx.h(284): error: #20: identifier "SPI_HandleTypeDef" is undefined
"" "" error: #20: identifier "HAL_SPI_STATE_ABORT" is undefined
"" "" error: #20: identifier "HAL_SPI_STATE_RESET" is undefined
"" "" error: #20: identifier "HAL_SPI_STATE_ERROR" is undefined
These are just a few of them. Is this a mistake I made when generating the code from CubeMX?
Solved! Go to Solution.
2019-08-21 11:49 AM
CubeMX is supposed to generate viable projects.
You might look at the stm32h7xx_hal_conf.h file in your project directory to see what sub-components have been pulled.
Keil looks to be using it's own libraries here, not the HAL ones, so perhaps some incompatible mixing-n-matching going on. You should be using CubeMX to generate the project, not Keil.
2019-08-21 11:49 AM
CubeMX is supposed to generate viable projects.
You might look at the stm32h7xx_hal_conf.h file in your project directory to see what sub-components have been pulled.
Keil looks to be using it's own libraries here, not the HAL ones, so perhaps some incompatible mixing-n-matching going on. You should be using CubeMX to generate the project, not Keil.
2019-08-21 12:22 PM
Thank you for the super quick response!
This is my first time utilizing this software so I didn't realize it would be an issue starting the project in Keil instead of CubeMX.
I went ahead and redid everything, this time from CubeMX, and it built correctly without any errors, I think that was it!
Thank you!