This generally applies to programming BIOS, hardware drivers, communication drivers ... For even more on the subject, you may like our STM32 Bootcamp series on bare-metal STM32 programming.