cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 6.9.1 Generated code Errors on Keil uVision V5.38.0.0 MDK for ST Version 6.19

Bernt
Associate II

I am generating code with CubeMX for STM32F030R8Tx

When building this code as is , I get tons of problems:

45 Error(s),  152 Warning(s)

Can someone please help me to get this working?  Perhaps this is a compatibilty issue between the CubeMX version and the Keil uVision?

It appears that this file is located in a completely different path on this PC compare to the other 'h files than where it is looking. There are 45 of the same missing file error :

Error Example:

C:/Users/Admin/AppData/Local/Arm/Packs/Keil/STM32F0xx_DFP/2.0.0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.c(50): warning: In file included from...
C:/Users/Admin/AppData/Local/Arm/Packs/Keil/STM32F0xx_DFP/2.0.0/Drivers/STM32F0xx_HAL_Driver/Inc\stm32f0xx_hal.h(46): warning: In file included from...
./RTE/Device/STM32F030R8Tx/STCubeGenerated/Inc\stm32f0xx_hal_conf.h(201): error: 'stm32f0xx_hal_exti.h' file not found
#include "stm32f0xx_hal_exti.h"

 

2) There are 145 warnings: Most relating to comments and UTF8 issues. When checking it out, the comments contain benign stuff such as ' 

Warning Example 1:

C:/Users/Admin/AppData/Local/Arm/Packs/Keil/STM32F0xx_DFP/2.0.0/Drivers/CMSIS/Device/ST/STM32F0xx/Include\stm32f0xx.h(11): warning: invalid UTF-8 in comment [-Winvalid-utf8]
* - To use or not the peripheral<92>s drivers in application code(i.e.

On this line in a comment and referring to the '

* - Macros to access peripheral’s registers hardware

************************************************************************

Warning Example 2:

compiling stm32f0xx_ll_pwr.c...
C:/Users/Admin/AppData/Local/Arm/Packs/Keil/STM32F0xx_DFP/2.0.0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c(599): warning: ISO C requires a translation unit to contain at least one declaration [-Wempty-translation-unit]
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

 

************************************************************************

 

 

 

2 REPLIES 2
Bernt
Associate II

I have just managed to get rid of all the the warnings by adding:

-Wno-invalid-utf8 -Wno-empty-translation-unit

The errors still persist and I cannot seem to fix that even by adding the correct path to where the missing file is located

Doing that, creates tons and tons more errors of duplicate declarations etc.

It appears however that this gets ignored by the compiler and the warnings are still generated as before

The errors still persist.

 

Ghofrane GSOURI
ST Employee

Hello @Bernt 

First let me thank you for posting.

Actually I created a project based on STM32F030R8Tx using CubeMX 6.9.1 where I activated few IP then I generated and built the code using keil , this is what I  got  0 errors 0 warnings 

GhofraneGSOURI_0-1693299801593.png

Could you please provide your ioc in order to push further the investigation.

Thx

Ghofrane