E407/hal.c: copy over from Contiki/libopencm3
E407/hal.c: port to FreeRTOS/ST-demobuilder (WIP)