Creating libraries for hal and usb functions.
This code is taken from the STM32Cube_FW_F4_V1.1.0 SDK.