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.
In addition to setting optimisation to -Os, I suggest to add (-specs=nano.specs) in linker miscellaneous options.
This will forces the linker to use the nanolib (optimised for size) instead of the standard newlib