Hi everyone! This is my first post here. Thank you everybody in advance for your help.
I am using:
KEIL MDK version 5.38.0.0
STM32F030R8
DFP version 2.1.1
I created a project from scratch. I didn´t select the use of HAL in the Run-Time-Environment. The problem is the auto generated Pre_Include_Global.h file that Keil generates. In this file there is a #define directive that forces the use of HAL. Because of this, you can´t compile the program, as the compiler can´t find the HAL header files.
You can comment out the line #define USE_HAL_DRIVER , but every time the project is opened, Pre_Include_Global.h is regenerated. Because of this, #define USE_HAL_DRIVER is uncommented again and the problem persists.
Could anyone help? Thanks.
This is a known issue/limitation of the current STM32F0xx_DFP.
There are two workaround options:
1) deselect everything under "Device" in Manage Run-Time Environment dialog in uVision to avoid having "-include "Pre_Include_Global.h""
But in this way the startup code is not added to the project, so that you need to manually add those startup code to your project
2) open the Keil.STM32F0xx_DFP.pdsc file stored in your DFP pack folder using a text editor and move the settings for Pre_Include_Global_h in bundle Standalone from component startup to component Cgroup="STM32Cube HAL" Csub="COMMON".
Namely move lines #2329..2332 after line #2372.
The result would be that the file Pre_include_global.h is only created if STM32Cube HAL.Common is selected in Manage Run-Time Environment dialog.
This issue is expected to be resolved in the next STM32F0xx_DFP release
Thank you very much for your time and help.