RED HAT
DIIDevHeads IoT Integration Server
•Created by Sterling on 8/6/2024 in #firmware-and-baremetal
Compilation Issues with STM32 HAL Libraries in Strict ANSI-C Mode
@Sterling The errors you’re encountering suggest that there are features in the
STM32 HAL
code that are not compatible with C89
. For instance, the inline keyword is not part of C89
but was introduced in C99
.
The STM32 HAL
documentation may use "Strict ANSI-C
" loosely, possibly meaning they aim for high portability rather than strict adherence to C89
. you can use C99
standard, Instead of -std=c89
, try using -std=c99
. The inline
keyword and other features would then be recognized.
If you must use C89
, you may need to manually adjust the HAL
code or find alternative ways to handle inline
and other incompatible constructs. This can be very labor-intensive.3 replies