Skip to main content
gbm
Principal
March 10, 2022
Question

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

  • March 10, 2022
  • 1 reply
  • 1629 views

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

This topic has been closed for replies.

1 reply

TDK
Super User
March 11, 2022

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

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