There is official port of arduino for some nucleo boards. I've chosen one for making commercial product. I can use arduino libraries for prototype, and if it won't fit my needs I can always go with C.
Arduino port is just wrapper around stdperiph HAL...