Platformio Arduino STM32F103

Fatal error invalid -march= option: armv7-m

If you're using PlatformIO and you're trying to program the BluePill STM32F103C8 you may see this error:
Fatal error: invalid -march= option: `armv7-m'

The fix is to edit your platformio.ini and add the following line:
platform_packages= platformio/toolchain-gccarmnoneeabi@^1.140201.0

See:
https://registry.platformio.org/tools/platformio/toolchain-gccarmnoneeabi/installation