Development tools for Zephyr on STM32Workbench for Zephyr: VS Code extension to set up, build, flash and debug Zephyr applications on STM32.Devicetree manager: browse, edit and visualize Zephyr devicetree, STM32CubeMX-like for Zephyr.
Thanks Andrei for the help. Unfortunatly no joy.
I've attached my code below which is pretty much the same as you suggested, just formated as CUBE likes it.
One thing to note there doesn't appear to be a syscalls.c file in the project generated by CUBE.