My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stm32f1.ini 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. #
  2. # Marlin Firmware
  3. # PlatformIO Configuration File
  4. #
  5. #################################
  6. #
  7. # STM32F1 Architecture with unified STM32 HAL
  8. #
  9. # Naming Example: STM32F103RCT6
  10. #
  11. # F : Foundation (sometimes High Performance F2/F4)
  12. # 1 : Cortex M1 core
  13. # 03 : Line/Features
  14. # R : 64 or 66 pins (V:100, Z:144, I:176)
  15. # C : 256KB Flash-memory (D:384KB, E:512KB, G:1024KB)
  16. # T : LQFP package
  17. # 6 : -40...85°C (7: ...105°C)
  18. #
  19. #################################
  20. #
  21. # HAL/STM32 Base Environment values
  22. #
  23. [common_stm32]
  24. platform = ststm32@~12.1
  25. build_flags = ${common.build_flags}
  26. -std=gnu++14
  27. -DUSBCON -DUSBD_USE_CDC
  28. -DTIM_IRQ_PRIO=13
  29. -DADC_RESOLUTION=12
  30. build_unflags = -std=gnu++11
  31. src_filter = ${common.default_src_filter} +<src/HAL/STM32> +<src/HAL/shared/backtrace>
  32. extra_scripts = ${common.extra_scripts}
  33. pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py
  34. [common_STM32F103RC]
  35. platform = ${common_stm32.platform}
  36. extends = common_stm32
  37. board = genericSTM32F103RC
  38. monitor_speed = 115200
  39. board_build.core = stm32
  40. board_build.variant = MARLIN_F103Rx
  41. board_build.ldscript = ldscript.ld
  42. extra_scripts = ${common_stm32.extra_scripts}
  43. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  44. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  45. #
  46. # STM32F103RE
  47. #
  48. [env:STM32F103RE]
  49. platform = ${common_stm32.platform}
  50. extends = common_stm32
  51. board = genericSTM32F103RE
  52. monitor_speed = 115200
  53. #
  54. # STM32F103VE
  55. #
  56. [env:STM32F103VE]
  57. platform = ${common_stm32.platform}
  58. extends = common_stm32
  59. board = genericSTM32F103VE
  60. monitor_speed = 115200
  61. #
  62. # STM32F103ZE
  63. #
  64. [env:STM32F103ZE]
  65. platform = ${common_stm32.platform}
  66. extends = common_stm32
  67. board = genericSTM32F103ZE
  68. monitor_speed = 115200
  69. #
  70. # BigTree SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3)
  71. #
  72. # STM32F103RC_btt ............. RCT6 with 256K
  73. # STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage)
  74. #
  75. [env:STM32F103RC_btt]
  76. platform = ${common_stm32.platform}
  77. extends = common_STM32F103RC
  78. build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5
  79. board_build.offset = 0x7000
  80. board_upload.offset_address = 0x08007000
  81. [env:STM32F103RC_btt_USB]
  82. extends = env:STM32F103RC_btt
  83. platform = ${common_stm32.platform}
  84. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
  85. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  86. build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.build_flags}
  87. -DUSBCON
  88. -DUSE_USB_FS
  89. -DUSBD_IRQ_PRIO=5
  90. -DUSBD_IRQ_SUBPRIO=6
  91. -DUSBD_USE_CDC_MSC
  92. #
  93. # MKS Robin (STM32F103ZET6)
  94. # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
  95. #
  96. [env:mks_robin]
  97. platform = ${common_stm32.platform}
  98. extends = common_stm32
  99. board = genericSTM32F103ZE
  100. board_build.core = stm32
  101. board_build.variant = MARLIN_F103Zx
  102. board_build.ldscript = ldscript.ld
  103. board_build.offset = 0x7000
  104. board_build.encrypt = Robin.bin
  105. build_flags = ${common_stm32.build_flags}
  106. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  107. build_unflags = ${common_stm32.build_unflags}
  108. -DUSBCON -DUSBD_USE_CDC
  109. extra_scripts = ${common_stm32.extra_scripts}
  110. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  111. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  112. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  113. lib_deps =
  114. #
  115. # MKS Robin E3/E3D (STM32F103RCT6) with TMC2209
  116. #
  117. [env:mks_robin_e3]
  118. platform = ${common_stm32.platform}
  119. extends = common_STM32F103RC
  120. build_flags = ${common_stm32.build_flags}
  121. -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5
  122. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  123. monitor_speed = 115200
  124. board_build.offset = 0x5000
  125. board_build.encrypt = Robin_e3.bin
  126. board_upload.offset_address = 0x08005000
  127. debug_tool = stlink
  128. extra_scripts = ${env:STM32F103RC.extra_scripts}
  129. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  130. #
  131. # Creality (STM32F103RET6)
  132. #
  133. [env:STM32F103RET6_creality]
  134. platform = ${common_stm32.platform}
  135. extends = common_stm32
  136. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  137. board = genericSTM32F103RE
  138. monitor_speed = 115200
  139. board_build.core = stm32
  140. board_build.variant = MARLIN_F103Rx
  141. board_build.offset = 0x7000
  142. board_build.ldscript = ldscript.ld
  143. board_upload.offset_address = 0x08007000
  144. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  145. extra_scripts = ${common.extra_scripts}
  146. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  147. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  148. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  149. debug_tool = jlink
  150. upload_protocol = jlink
  151. #
  152. # BigTree SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
  153. #
  154. # STM32F103RE_btt ............. RET6
  155. # STM32F103RE_btt_USB ......... RET6 (USB mass storage)
  156. #
  157. [env:STM32F103RE_btt]
  158. platform = ${common_stm32.platform}
  159. extends = common_stm32
  160. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  161. board = genericSTM32F103RE
  162. monitor_speed = 115200
  163. board_build.core = stm32
  164. board_build.variant = MARLIN_F103Rx
  165. board_build.offset = 0x7000
  166. board_build.ldscript = ldscript.ld
  167. board_upload.offset_address = 0x08007000
  168. build_unflags = ${common_stm32.build_unflags}
  169. extra_scripts = ${common.extra_scripts}
  170. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  171. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  172. debug_tool = jlink
  173. upload_protocol = jlink
  174. [env:STM32F103RE_btt_USB]
  175. extends = env:STM32F103RE_btt
  176. platform = ${common_stm32.platform}
  177. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
  178. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  179. build_flags = ${env:STM32F103RE_btt.build_flags} ${env:stm32_flash_drive.build_flags}
  180. -DUSBCON
  181. -DUSE_USB_FS
  182. -DUSBD_IRQ_PRIO=5
  183. -DUSBD_IRQ_SUBPRIO=6
  184. -DUSBD_USE_CDC_MSC
  185. #
  186. # FLSUN QQS Pro (STM32F103VET6)
  187. # board Hispeedv1
  188. #
  189. [env:flsun_hispeedv1]
  190. platform = ${common_stm32.platform}
  191. extends = common_stm32
  192. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  193. board = genericSTM32F103VE
  194. board_build.core = stm32
  195. board_build.variant = MARLIN_F103Vx
  196. board_build.ldscript = ldscript.ld
  197. board_build.offset = 0x7000
  198. board_build.encrypt = Robin_mini.bin
  199. board_upload.offset_address = 0x08007000
  200. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  201. extra_scripts = ${common_stm32.extra_scripts}
  202. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  203. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  204. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  205. #
  206. # MKS Robin Nano V1.2 and V2
  207. #
  208. [env:mks_robin_nano35]
  209. platform = ${common_stm32.platform}
  210. extends = common_stm32
  211. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  212. board = genericSTM32F103VE
  213. board_build.core = stm32
  214. board_build.variant = MARLIN_F103Vx
  215. board_build.ldscript = ldscript.ld
  216. board_build.offset = 0x7000
  217. board_build.encrypt = Robin_nano35.bin
  218. board_upload.offset_address = 0x08007000
  219. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  220. debug_tool = jlink
  221. upload_protocol = jlink
  222. extra_scripts = ${common_stm32.extra_scripts}
  223. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  224. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  225. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  226. #
  227. # Mingda MPX_ARM_MINI
  228. #
  229. [env:mingda_mpx_arm_mini]
  230. platform = ${common_stm32.platform}
  231. extends = common_stm32
  232. board = genericSTM32F103ZE
  233. board_build.core = stm32
  234. board_build.variant = MARLIN_F103Zx
  235. board_build.ldscript = ldscript.ld
  236. board_build.offset = 0x10000
  237. build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  238. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  239. extra_scripts = ${common_stm32.extra_scripts}
  240. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  241. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  242. #
  243. # Malyan M200 (STM32F103CB)
  244. #
  245. [env:STM32F103CB_malyan]
  246. platform = ${common_stm32.platform}
  247. extends = common_stm32
  248. board = malyanm200_f103cb
  249. build_flags = ${common_stm32.build_flags}
  250. -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
  251. src_filter = ${common.default_src_filter} +<src/HAL/STM32>