Added support for STM32F4Discovery board, improved HAL