When using a Makefile project (instead of a CMake project) with VSCode vscode edit the STM32-for-VSCode.config.yaml file. Find the section linkerFlags: and change as follows:
linkerFlags: - -Wl,--print-memory-usage -u _printf_float