2019-11-26 05:40 PM
Error 1:
MX version: STM32CubeMX 5.4.0
Firmware: STM32Cube_FW_F0_V1.11.0
Compiler: IAR
MCU: Any in F0 series
Compiling error:
Error[Pe147]: declaration is incompatible with "__interwork __softfp void assert_failed(uint8_t *, uint32_t)" (declared at line 308 of "… main.c�?
Analysis:
The function, assert_failed(), generated by STM32CubeMX in main.c is defined as follows:
void assert_failed(char *file, uint32_t line) {}
The protoypte of this function should be below as mentioned in Release notes:
void assert_failed(uint8_t *file, uint32_t line) {}
Error 2:
MX version: STM32CubeMX 5.4.0
Firmware: STM32Cube_FW_F0_V1.11.0
Compiler: IAR
MCU: STM32F042
Compiling error:
Error[Pe136]: “… stm32f0xx_hal_crc.h has no field "DefaultPolynomialUse�? “
Analysis:
On the one hand, the generating Polynomial in CRC peripheral of STM32F042 is not programmable, the macro CRC_POL_POL is undefined, as a result, DefaultPolynomialUse is not a member of struct CRC_InitTypeDef.
On the other hand, the code generated by STM342CubeMX has the statement with DefaultPolynomialUse as follows:
hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_ENABLE;
Error 3:
MX version: STM32CubeMX 5.4.0
Firmware: STM32Cube_FW_F0_V1.11.0
Compiler: IAR
MCU: STM32F072
Linker error:
Error[Li005]: no definition for "HAL_CRCEx_Init" [referenced from … crc.o]
Analysis:
The code in function MX_CRC_Init() generated by STM32CubMX has the statements below:
if (HAL_CRCEx_Init(&hcrc) != HAL_OK) …
As mentioned in Release notes, HAL_CRCEx_Init has been abandoned and undefined and should not be used.
Recommendations on STM32CubeMX:
R1: A specific channel or mailbox should be created or provided to make developers submitting bug report conveniently.
R2: The path where the STMCubMX Repository should be configurable by developers.
2019-11-28 03:13 AM
2019-11-28 03:51 AM