While initially more time consuming, working close to the metal ... For even more on the subject, you may like our STM32 Bootcamp series on bare-metal STM32 programming.