2023-12-21 06:53 AM - edited 2023-12-21 06:55 AM
Hi all,
I'm encountering a strange behaviour of STM32CubeMX: from some point on, every time I update the IOC file the generated code is missing the FDCAN function name HAL_FDCAN_GetRxMessage.
Obviously this results in a build error; the function declaration in driver file stm32g4xx_hal_fdcan.h is correct:
HAL_StatusTypeDef HAL_FDCAN_GetRxMessage(FDCAN_HandleTypeDef *hfdcan, uint32_t RxLocation, FDCAN_RxHeaderTypeDef *pRxHeader, uint8_t *pRxData);
While in stm32g4xx_hal_fdcan.c function name is missing:
HAL_StatusTypeDef (FDCAN_HandleTypeDef *hfdcan, uint32_t RxLocation, FDCAN_RxHeaderTypeDef *pRxHeader, uint8_t *pRxData)
{
uint32_t *RxAddress;
uint8_t *pData;
uint32_t ByteCounter;
uint32_t GetIndex;
HAL_FDCAN_StateTypeDef state = hfdcan->State;
//... other code
}
So I add manually the function name in .c file and everything works, but the next time I generate the code the function name will be deleted again.
Is there a way to avoid this or maybe can it be a CubeMX bug?
I'm using:
- STM32CubeIDE v1.14.0
- STM32CubeMX 6.10.0-RC9 integrated in IDE
- STM32Cube MCU Package for STM32G4 v1.5.1
Thanks,
agostino
Solved! Go to Solution.
2023-12-21 07:05 AM
It's definitely defined correctly in the latest library version:
Perhaps your library files got edited/corrupted somehow. Perhaps remove and re-download the G4 package.
2023-12-21 07:05 AM
It's definitely defined correctly in the latest library version:
Perhaps your library files got edited/corrupted somehow. Perhaps remove and re-download the G4 package.
2023-12-21 09:07 AM
Thanks @TDK ! You're totally right :)
Uninstalled and reinstalled the G4 package everything now works correctly!