This evening I found out that almost all peripheral driver initializations can be generated by STM32CubeMX using LL alone instead of HAL, which means I can easily get rid of HAL completely in my STM32F103 project!
Not so fast though. I would have to substitute the call to the following functions with equivalent ones that only rely on LL:
The first one is the simplest one to deal with, as I can replace it with
LL_GPIO_TogglePin, which I already use elsewhere.
Obviously I also have to avoid using the data structures, defines, etc. used by the above functions. I might do that in the longer run.
Unfortunately, the USB_DEVICE middleware is only provided for HAL, which means I won’t be able to completely move away from HAL in my STM32F4 and STM32H7 implementations.
Stay tuned for more!