platformio.ini 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ; PlatformIO Project Configuration File https://docs.platformio.org/page/projectconf.html
  2. [platformio]
  3. default_envs = STM32F1
  4. [env]
  5. framework = arduino
  6. lib_deps =
  7. greiman/SdFat @ ^2.0.6
  8. upload_protocol = stlink
  9. ; Different gcc versions produce much different binaries in terms of speed.
  10. platform_packages = platformio/toolchain-gccarmnoneeabi@1.90301.200702
  11. build_flags =
  12. -w
  13. -DARDUINO_GENERIC_STM32F103C
  14. -DARDUINO_LIB_DISCOVERY_PHASE
  15. -DARDUINO=10813
  16. -DARDUINO_ARCH_STM32
  17. -DDEBUG_LEVEL=DEBUG_NONE
  18. -O2
  19. -D BUILD_TAGS="\"\""
  20. build_unflags =
  21. -Os
  22. -DARDUINO_ARCH_STM32F1
  23. upload_flags = -c set CPUTAPID 0
  24. [env:STM32F1]
  25. platform = ststm32
  26. board = genericSTM32F103C8
  27. board_build.mcu = stm32f103c8t6
  28. board_build.core = maple
  29. [env:STM32F1-XCVR]
  30. extends = env:STM32F1
  31. build_flags = ${env.build_flags}
  32. -DXCVR
  33. -D BUILD_TAGS="\"-XCVR\""
  34. [env:STM32F1-USB-128MHz]
  35. # Max overclock for STM32
  36. # Can use for APM32F1 as well.
  37. extends = env:STM32F1-USB
  38. board_build.f_cpu = 128000000L
  39. build_flags = ${env.build_flags}
  40. -D BUILD_TAGS="\"-USB-128MHz\""
  41. [env:STM32F1-USB-96MHz]
  42. # Slight overclock for STM32
  43. # Use for APM32F1's - it's default clock is 96MHz and runs unstable at 72MHz(STM32F1's default)
  44. extends = env:STM32F1-USB
  45. # Explicilty define the multiplier as maple only handles a few cases.
  46. build_flags = ${env.build_flags}
  47. -D BUILD_TAGS="\"-USB-96MHz\""
  48. -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
  49. -D USBCON
  50. -D USBD_VID=0x0483
  51. -D USB_MANUFACTURER="Unknown"
  52. -D USB_PRODUCT="\"BLUEPILL_F103C8\""
  53. -D HAL_PCD_MODULE_ENABLED
  54. -DBOARD_RCC_PLLMUL=RCC_PLLMUL_12 #96000000L
  55. # TODO: Find out why USB build flags get trampled when extending an extended env.
  56. [env:STM32F1-USB]
  57. platform = ststm32
  58. board = genericSTM32F103C8
  59. board_build.mcu = stm32f103c8t6
  60. board_build.core = maple
  61. board_build.f_cpu = 128000000L
  62. framework = arduino
  63. lib_deps =
  64. greiman/SdFat @ ^2.0.6
  65. upload_protocol = dfu
  66. ; Different gcc versions produce much different binaries in terms of speed.
  67. platform_packages = platformio/toolchain-gccarmnoneeabi@1.90301.200702
  68. build_flags =
  69. -D BUILD_TAGS="\"-USB\""
  70. -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
  71. -D USBCON
  72. -D USBD_VID=0x0483
  73. -D USB_MANUFACTURER="Unknown"
  74. -D USB_PRODUCT="\"BLUEPILL_F103C8\""
  75. -D HAL_PCD_MODULE_ENABLED
  76. -w
  77. -DARDUINO_GENERIC_STM32F103C
  78. -DARDUINO_LIB_DISCOVERY_PHASE
  79. -DARDUINO=10813
  80. -DARDUINO_ARCH_STM32
  81. -DDEBUG_LEVEL=DEBUG_NONE
  82. -O2
  83. build_unflags =
  84. -Os
  85. -DARDUINO_ARCH_STM32F1
  86. upload_flags = -c set CPUTAPID 0
  87. ; [env:debug]
  88. ; build_type = debug
  89. ; debug_tool = stlink