Test code using STM32Cube, the CDC demo and FreeRTOS.
By changing the macro definitions at the top of usbd_conf.c you can select using either the FS or HS port.
Tested on Linux and OSX using gcc 5.3 from https://launchpad.net/gcc-arm-embedded and the stm32cubef4.zip v1.11 from ST.