Hello world stm32f0xx Cannot even toggle GPIOS
In the end I did find the solution. Apparently the workbench was inserting a "generic startup file" that is not specific to my microcontroller, and definitely not running properly. This was because I generated my own board as compared to using a Devkit. The solution was downloading the Standard Peripheral library from ST's website, locating the appropriate startup file and everything went well.
Note: I was using the standard periph libray instead of CubeHal.
The link that helped is given below.