cancel
Showing results for 
Search instead for 
Did you mean: 

New versions of Keil MDK-ARM STM32 packs - project configuration error

gbm
Lead III

I notice that the updated versions of STM32 Keil packs contain an error influencing project configuration. The problem was already signaled on STM32 forums but the root case was not identified (see for example https://community.st.com/s/question/0D53W00000m0ZcbSAE/preincludeglobalh27-warning-47d-incompatible-redefinition-of-macro-usehaldriver).

Description: if the project is generated by Keil and standalone (= no CubeMX) option is selected, it's not possible to select HAL vs. no HAL, and HAL is automatically forced by Keil, which results in missing HAL include error mesage while compiling.

With this configuration, Keil generates Pre_Include_Global.h (re-genarated automatically whene the project is opened) file with

#define USE_HAL_DRIVER

which makes it impossible to make a non-CubeMX project without HAL.

(If the CubeMX option is selected, there is a possibility to turn off HAL, disappearing with Standalone selection).

Please correct the problem in all th STM 32 packs affected by it - all the newly updated packs introduce this error which was not present in older versions of the packs.

0693W00000Kc3woQAB.png

1 REPLY 1
TDK
Guru

Shouldn't this be posted to Keil and not here?

If you feel a post has answered your question, please click "Accept as Solution".