“It looks like it worked this way.”
[platformio]
src_dir = .
[env:genericSTM32F103C8]
platform = ststm32
board = genericSTM32F103C8
framework = stm32cube
upload_protocol = stlink
debug_tool = stlink
build_flags =
-I Core/Inc
-I Drivers/CMSIS/Device/ST/STM32F1xx/Include
-I Drivers/CMSIS/Include
-I USB_DEVICE/App
-I USB_DEVICE/Target
-I Middlewares/ST/STM32_USB_Device_Library/Core/Inc
-I Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc
-D USE_HAL_DRIVER
-D HSE_VALUE=8000000U
build_src_filter =
+<Core/Src/*.c>
-<Core/Src/system_stm32f1xx.c>
+<USB_DEVICE/App/*.c>
+<USB_DEVICE/Target/*.c>
+<Middlewares/ST/STM32_USB_Device_Library/Core/Src/*.c>
+<Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/*.c>
-<Core/Startup/*>