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.
3 years, 8 months ago.
mbed with stm32cubemx, HAL_TIM_MspPostInit, multiply defined or undefined symbol
I am trying to use some code generated by cubemx when I use the init code generated in mbed main I get an undefined symbol for void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
This is declared at the top of the generated cubemx main.c file and is called by one of the inits but is implemented in stm32f7xx_hal_msp.c . There isn't an include for this file in cubemx main. When I try to do the same in mbed main I get an undefined symbol. When I add an include for stm32f7xx_hal_msp.c I get a multiply defined error.
How do I use void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim); ?
3 years, 7 months ago.
check the differences between the origina stm32f4xx_hal_conf.h file and the one you created. Many #define's are commented by default in the smt32cube generated file. The file used by mbed, has no commented lines.
Before updating mbed-dev files I use a merging tool (i.e. WinMerge in Windows) and check the differences between files before updating them.
hope it helped.