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-26 11:19 PM
hello @TNaxi ,
Could you please share your iocs files for each error ?
Thanks,
Khouloud.
2019-11-27 12:13 AM
@TNaxi : Only error 2 is reproduced -> it will be fixed.
need your ioc file for error 1 and for error 3.
Thanks and Best Regards,
Khouloud
2019-11-27 05:53 PM
2019-11-27 06:53 PM
> R2: The path where the STMCubMX Repository should be configurable by developers.
The path is already configurable.
What you probably want is to have two separate independent repository paths: A. for CubeMX itself to install & update its templates(?) etc. and B. the path to use in generated projects when user chooses to create references vs. copy files.
Like it was in older Cube versions.
-- pa
2019-11-27 11:04 PM
@TNaxi I can not see any attachement.
2019-11-28 12:32 AM
2019-11-28 01:06 AM
I am facing issues in the CAN section of the STM32Cube_FW_F0_V1.11.0.
My .ioc file is attached for your reference.
The HAL_CAN_AddTxMsg(..args..) goes to Hardfault Handler at the line:
/* Store the Tx mailbox */
*pTxMailbox = (uint32_t)1 << transmitmailbox;
I wrote a simple snippet for CAN Transmit as:
void TransmitCAN(uint32_t StdID, uint8_t *data_arr, uint8_t DLC)
{
CAN_TxHeaderTypeDef TxMsg = {0};
TxMsg.StdId = StdID;
TxMsg.IDE = CAN_ID_STD;
TxMsg.RTR = CAN_RTR_DATA;
TxMsg.DLC = DLC;
TxMsg.TransmitGlobalTime = DISABLE;
HAL_CAN_AddTxMessage(&hcan, &TxMsg, data_arr, (uint32_t*)CAN_TX_MAILBOX0);
if((hcan.Instance->TSR & CAN_TSR_TXOK0) != RESET)
{
if((hcan.Instance->TSR & CAN_TSR_TXOK1) != RESET)
{
if((hcan.Instance->TSR & CAN_TSR_TXOK2) != RESET)
{
Error_Handler();
}
}
}
}
I called the same in a while(1) loop in main.c…
The same code works for F4 or F3 series controllers. Also the code I had written for CAN using the V1.9 for the same board works. So I have eliminated Hardware issues at my end.
2019-11-28 01:37 AM
Ok Thanks for the share, for the 3rd problem it's reproduced now,
And it will be fixed too.
Still the 1er error, need your ioc file , just copy the content of our ioc file as you have already did .
Best Regards,
Khouloud.
2019-11-28 03:08 AM