cancel
Showing results for 
Search instead for 
Did you mean: 

A lot of errors in STM32Cube_FW_F0_V1.11.0

TNaxi
Associate II

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.

11 REPLIES 11
You simply see if the function prototype of assert_failed() generated by CubeMX in main.c as below:
void assert_failed(char *file, uint32_t line)
 
The compiling error is generated by IAR EWARM V8.40, We don't test in its previous version. 


------------------ 原始邮件 ------------------
�?�件人: "ST Community" �?��?时间: 2019年11月28日(星期四) 下�?�5:37
收件人: "神散形�?散"<673882715@qq.com>;

主题: Khouloud Zemmeli answered you: A lot of errors in STM32Cube_FW_F0_V1.11.0

​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.  
 
   
    Khouloud Zemmeli (ST Employee)


​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.
 
View/Answer   or reply to this email
 
 
     
 
Replying to
 
A lot of errors in STM32Cube_FW_F0_V1.11.0
 
    6738827151.541988037532413E12 (Community Member)
Wednesday, November 27, 2019 5:53 PM
Dear Khouloud Zemmeli,
The attachment is the ioc file we used.
Thanks and Best Regards,
Tian Naxin
 
 
     
 

  6738827151.541988037532413E12 (Community Member)
I copy the content of our ioc file as below:
#MicroXplorer Configuration settings - do not modify
CRC.CRCLength=CRC_POLYLENGTH_16B
CRC.DefaultInitValueUse=DEFAULT_INIT_VALUE_ENABLE
CRC.DefaultPolynomialUse=DEFAULT_POLYNOMIAL_DISABLE
CRC.IPParameters=DefaultPolynomialUse,DefaultInitValueUse,CRCLength
File.Version=6
KeepUserPlacement=false
Mcu.Family=STM32F0
Mcu.IP0=CRC
Mcu.IP1=NVIC
Mcu.IP2=RCC
Mcu.IP3=SYS
Mcu.IPNb=4
Mcu.Name=STM32F072R(8-B)Tx
Mcu.Package=LQFP64
Mcu.Pin0=VP_CRC_VS_CRC
Mcu.Pin1=VP_SYS_VS_Systick
Mcu.PinsNb=2
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F072RBTx
MxCube.Version=5.4.0
MxDb.Version=DB.5.0.40
NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true
PCC.Checker=false
PCC.Line=STM32F0x2
PCC.MCU=STM32F072R(8-B)Tx
PCC.PartNumber=STM32F072RBTx
PCC.Seq0=0
PCC.Series=STM32F0
PCC.Temperature=25
PCC.Vdd=3.6
PinOutPanel.RotationAngle=0
ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=true
ProjectManager.CompilerOptimize=6
ProjectManager.ComputerToolchain=false
ProjectManager.CoupleFile=true
ProjectManager.CustomerFirmwarePackage=
ProjectManager.DefaultFWLocation=true
ProjectManager.DeletePrevious=false
ProjectManager.DeviceId=STM32F072RBTx
ProjectManager.FirmwarePackage=STM32Cube FW_F0 V1.11.0
ProjectManager.FreePins=false
ProjectManager.HalAssertFull=false
ProjectManager.HeapSize=0x20
ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=2
ProjectManager.MainLocation=Src
ProjectManager.NoMain=false
ProjectManager.PreviousToolchain=
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=CuC.ioc
ProjectManager.ProjectName=CuC
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=EWARM V8.32
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_CRC_Init-CRC-false-HAL-true
RCC.CECFreq_Value=32786.88524590164
RCC.FamilyName=M
RCC.HSICECFreq_Value=32786.88524590164
RCC.IPParameters=CECFreq_Value,FamilyName,HSICECFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,TimSysFreq_Value,VCOOutput2Freq_Value
RCC.PLLCLKFreq_Value=16000000
RCC.PLLMCOFreq_Value=16000000
RCC.TimSysFreq_Value=8000000
RCC.VCOOutput2Freq_Value=8000000
VP_CRC_VS_CRC.Mode=CRC_Activate
VP_CRC_VS_CRC.Signal=CRC_VS_CRC
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
board=custom
Thursday, November 28, 2019 12:32 AM
 
 
   
 

  Khouloud Zemmeli (ST Employee)

​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.
Thursday, November 28, 2019 1:37 AM
   
 
 
 
   
You're receiving emails when someone "Comments on my posts."
 
To change or turn off ST Community email, log in as 673882715@qq.com.st.
 
Are notifications about this post getting annoying? Reply to this email with the word " mute ".
 
STMicroelectronics N.V.
 

 
 
 
By the way, I tell you a very old problem which is present for a few years and I submitted two years ago.

the USB driver code in usbd_conf.c generated by CubeMX is not compatible with C++. Please see below:

 

MX version: any (CubeMX 4.XX / 5.XX)

Firmware: any (F0/L4/F7 …)

Compiler: IAR

IAR Language Option: C++

MCU: Any

Compiling error:

Error[Pe167]: argument of type "void *" is incompatible with parameter of type "PCD_HandleTypeDef *" …usbd_conf.c 356

 

 

Analysis:

There are 11 statements incompatible with C++ in usbd_conf.c

 

Incompatible statements appear at each reference to pdev->pData like below:

hal_status = HAL_PCD_DeInit(pdev->pData);

 

The type of (pdev->pData) is void *

The type of hal_status is PCD_HandleTypeDef *

 

In C++, we can’t make such an assignment directly and must make a type cast like below.

 

Correct statements:

hal_status = HAL_PCD_DeInit( (PCD_HandleTypeDef *) (pdev->pData));

 

We have to manually modify these code whenever generated by CubeMX for years. We hope it can be fixed as soon as possible .


------------------ 原始邮件 ------------------
�?�件人: "ST Community" �?��?时间: 2019年11月28日(星期四) 下�?�5:37
收件人: "神散形�?散"<673882715@qq.com>;

主题: Khouloud Zemmeli answered you: A lot of errors in STM32Cube_FW_F0_V1.11.0

​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.  
 
   
    Khouloud Zemmeli (ST Employee)


​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.
 
View/Answer   or reply to this email
 
 
     
 
Replying to
 
A lot of errors in STM32Cube_FW_F0_V1.11.0
 
    6738827151.541988037532413E12 (Community Member)
Wednesday, November 27, 2019 5:53 PM
Dear Khouloud Zemmeli,
The attachment is the ioc file we used.
Thanks and Best Regards,
Tian Naxin
 
 
     
 

  6738827151.541988037532413E12 (Community Member)
I copy the content of our ioc file as below:
#MicroXplorer Configuration settings - do not modify
CRC.CRCLength=CRC_POLYLENGTH_16B
CRC.DefaultInitValueUse=DEFAULT_INIT_VALUE_ENABLE
CRC.DefaultPolynomialUse=DEFAULT_POLYNOMIAL_DISABLE
CRC.IPParameters=DefaultPolynomialUse,DefaultInitValueUse,CRCLength
File.Version=6
KeepUserPlacement=false
Mcu.Family=STM32F0
Mcu.IP0=CRC
Mcu.IP1=NVIC
Mcu.IP2=RCC
Mcu.IP3=SYS
Mcu.IPNb=4
Mcu.Name=STM32F072R(8-B)Tx
Mcu.Package=LQFP64
Mcu.Pin0=VP_CRC_VS_CRC
Mcu.Pin1=VP_SYS_VS_Systick
Mcu.PinsNb=2
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F072RBTx
MxCube.Version=5.4.0
MxDb.Version=DB.5.0.40
NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true
PCC.Checker=false
PCC.Line=STM32F0x2
PCC.MCU=STM32F072R(8-B)Tx
PCC.PartNumber=STM32F072RBTx
PCC.Seq0=0
PCC.Series=STM32F0
PCC.Temperature=25
PCC.Vdd=3.6
PinOutPanel.RotationAngle=0
ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=true
ProjectManager.CompilerOptimize=6
ProjectManager.ComputerToolchain=false
ProjectManager.CoupleFile=true
ProjectManager.CustomerFirmwarePackage=
ProjectManager.DefaultFWLocation=true
ProjectManager.DeletePrevious=false
ProjectManager.DeviceId=STM32F072RBTx
ProjectManager.FirmwarePackage=STM32Cube FW_F0 V1.11.0
ProjectManager.FreePins=false
ProjectManager.HalAssertFull=false
ProjectManager.HeapSize=0x20
ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=2
ProjectManager.MainLocation=Src
ProjectManager.NoMain=false
ProjectManager.PreviousToolchain=
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=CuC.ioc
ProjectManager.ProjectName=CuC
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=EWARM V8.32
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_CRC_Init-CRC-false-HAL-true
RCC.CECFreq_Value=32786.88524590164
RCC.FamilyName=M
RCC.HSICECFreq_Value=32786.88524590164
RCC.IPParameters=CECFreq_Value,FamilyName,HSICECFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,TimSysFreq_Value,VCOOutput2Freq_Value
RCC.PLLCLKFreq_Value=16000000
RCC.PLLMCOFreq_Value=16000000
RCC.TimSysFreq_Value=8000000
RCC.VCOOutput2Freq_Value=8000000
VP_CRC_VS_CRC.Mode=CRC_Activate
VP_CRC_VS_CRC.Signal=CRC_VS_CRC
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
board=custom
Thursday, November 28, 2019 12:32 AM
 
 
   
 

  Khouloud Zemmeli (ST Employee)

​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.
Thursday, November 28, 2019 1:37 AM
   
 
 
 
   
You're receiving emails when someone "Comments on my posts."
 
To change or turn off ST Community email, log in as 673882715@qq.com.st.
 
Are notifications about this post getting annoying? Reply to this email with the word " mute ".
 
STMicroelectronics N.V.