SMBUS/PMBUS V2 (AN4502) integrated to CubeMX HAL problem
- June 17, 2017
- 4 replies
- 1769 views
Hi, I need help with using the SMBUS/PMBUS V2 library with STM32 Cube HAL,
Whaterver I do I get the error: ..\Middlewares\ST\STM32_SMBus_Stack\inc\stm32_PMBUS_stack.h(410): error: &sharp20: identifier 'HAL_StatusTypeDef' is undefined
Even when I include the stm32f0xx_hal.h file in the Keil projec.
It can find it ok when i right click and 'go to definition'
I just want to add and use the two files stm32_PMBUS_stack.c and stm32_SMBUS_stack.c with the corresponding .h files, but as soon as I include the .h files for the files in main.h then I have this problem.
I attach a cleanly generated project from CubeMx (latest version) and the example provided from ST is on this link:
Both compile fine on there own but not when I try to include the stm32_SMBUS_stack and stm32_PMBUS_stack files in my CubeMx project.
The example for my board has this path in the example.
STM32_AN4502_FW_V2.0.0\Projects\STM32F072B-Discovery\MDK-ARM\Project.uvprojx
Also I have to add the &sharpinclude <stdint.h> in the new files as it cant find the uint8_t definition otherwise, weird that it works without it in the ST example..
Thankful for all the help I can get as I have been struggling with this issue for weeks! Probably just a include chain modification somewhere that I cant find on my own.
Best regards
Christoffer
#hal #pmbus #cube-mx #smbus