cancel
Showing results for 
Search instead for 
Did you mean: 

project busted because of a short sighted engineer. no stm32f1xx_hal_conf.h ?

ulao
Associate III

I have a project I'm taking over where it appears the last developer ignored the fact there was an IOC File. So when I added spi, the code generation had many conflicts. I have no choice now to do this all manually. When I add all the SPI init code it complains about

error: unknown type name 'SPI_HandleTypeDef'; did you mean 'TIM_HandleTypeDef'?

Guessing because there is no header included. I also have no stm32f1xx_hal_conf.h file, is this a cube thing? Should I not have that?

So what do I need to include to use SPI_HandleTypeDef'

2 REPLIES 2
ulao
Associate III

Oh nevermin, I was able to copy the main file, re do the IOC, have it change code, copy back in the SPI parts. Pain in the *** but it worked.

Many developers don't use the code generators to keep recreating code, it was initially envisioned as a tool to create startup and pin configuration code, and morphed into this thing where functionality keeps getting added or changed and you pound on the button again..

The stm32fxx_hal_conf.h is a top level way of controlling what gets pulled in. Others just include the individual include files, or do what works for them, and as they've had to port from SPL or other libraries.

The C compiler is somewhat ambivalent to what structural form a project has, it just pulls in the files it's directed too.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..