STM32F4 fixes

Here are a few fixes that bring STM32 slightly closer to compiling. The only remaining issue that I can see is PT-related.