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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  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. [stm32f1_variant]
  35. extra_scripts = ${common_stm32.extra_scripts}
  36. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  37. buildroot/share/PlatformIO/scripts/offset_and_rename.py
  38. [common_STM32F103RC]
  39. platform = ${common_stm32.platform}
  40. extends = common_stm32
  41. board = genericSTM32F103RC
  42. monitor_speed = 115200
  43. board_build.core = stm32
  44. board_build.variant = MARLIN_F103Rx
  45. extra_scripts = ${stm32f1_variant.extra_scripts}
  46. #
  47. # STM32F103RE
  48. #
  49. [env:STM32F103RE]
  50. platform = ${common_stm32.platform}
  51. extends = common_stm32
  52. board = genericSTM32F103RE
  53. monitor_speed = 115200
  54. #
  55. # STM32F103VE
  56. #
  57. [env:STM32F103VE]
  58. platform = ${common_stm32.platform}
  59. extends = common_stm32
  60. board = genericSTM32F103VE
  61. monitor_speed = 115200
  62. #
  63. # STM32F103ZE
  64. #
  65. [env:STM32F103ZE]
  66. platform = ${common_stm32.platform}
  67. extends = common_stm32
  68. board = genericSTM32F103ZE
  69. monitor_speed = 115200
  70. #
  71. # BigTree SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3)
  72. #
  73. # STM32F103RC_btt ............. RCT6 with 256K
  74. # STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage)
  75. #
  76. [env:STM32F103RC_btt]
  77. platform = ${common_stm32.platform}
  78. extends = common_STM32F103RC
  79. build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5
  80. board_build.offset = 0x7000
  81. board_upload.offset_address = 0x08007000
  82. [env:STM32F103RC_btt_USB]
  83. extends = env:STM32F103RC_btt
  84. platform = ${common_stm32.platform}
  85. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
  86. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  87. build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.build_flags}
  88. -DUSBCON
  89. -DUSE_USB_FS
  90. -DUSBD_IRQ_PRIO=5
  91. -DUSBD_IRQ_SUBPRIO=6
  92. -DUSBD_USE_CDC_MSC
  93. #
  94. # MKS Robin (STM32F103ZET6)
  95. # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
  96. #
  97. [env:mks_robin]
  98. platform = ${common_stm32.platform}
  99. extends = common_stm32
  100. board = genericSTM32F103ZE
  101. board_build.core = stm32
  102. board_build.variant = MARLIN_F103Zx
  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 = ${stm32f1_variant.extra_scripts}
  110. lib_deps =
  111. #
  112. # MKS Robin E3/E3D (STM32F103RCT6) with TMC2209
  113. #
  114. [env:mks_robin_e3]
  115. platform = ${common_stm32.platform}
  116. extends = common_STM32F103RC
  117. build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5 -DDEFAULT_SPI=3
  118. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  119. monitor_speed = 115200
  120. board_build.offset = 0x5000
  121. board_build.encrypt = Robin_e3.bin
  122. board_upload.offset_address = 0x08005000
  123. debug_tool = stlink
  124. extra_scripts = ${common_STM32F103RC.extra_scripts}
  125. #
  126. # Creality (STM32F103RET6)
  127. #
  128. [env:STM32F103RET6_creality]
  129. platform = ${common_stm32.platform}
  130. extends = common_stm32
  131. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  132. board = genericSTM32F103RE
  133. monitor_speed = 115200
  134. board_build.core = stm32
  135. board_build.variant = MARLIN_F103Rx
  136. board_build.offset = 0x7000
  137. board_upload.offset_address = 0x08007000
  138. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  139. extra_scripts = ${stm32f1_variant.extra_scripts}
  140. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  141. debug_tool = jlink
  142. upload_protocol = jlink
  143. #
  144. # BigTree SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
  145. #
  146. # STM32F103RE_btt ............. RET6
  147. # STM32F103RE_btt_USB ......... RET6 (USB mass storage)
  148. #
  149. [env:STM32F103RE_btt]
  150. platform = ${common_stm32.platform}
  151. extends = common_stm32
  152. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  153. board = genericSTM32F103RE
  154. monitor_speed = 115200
  155. board_build.core = stm32
  156. board_build.variant = MARLIN_F103Rx
  157. board_build.offset = 0x7000
  158. board_upload.offset_address = 0x08007000
  159. build_unflags = ${common_stm32.build_unflags}
  160. extra_scripts = ${stm32f1_variant.extra_scripts}
  161. debug_tool = jlink
  162. upload_protocol = jlink
  163. [env:STM32F103RE_btt_USB]
  164. extends = env:STM32F103RE_btt
  165. platform = ${common_stm32.platform}
  166. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
  167. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  168. build_flags = ${env:STM32F103RE_btt.build_flags} ${env:stm32_flash_drive.build_flags}
  169. -DUSBCON
  170. -DUSE_USB_FS
  171. -DUSBD_IRQ_PRIO=5
  172. -DUSBD_IRQ_SUBPRIO=6
  173. -DUSBD_USE_CDC_MSC
  174. #
  175. # FLSUN QQS Pro (STM32F103VET6)
  176. # board Hispeedv1
  177. #
  178. [env:flsun_hispeedv1]
  179. platform = ${common_stm32.platform}
  180. extends = common_stm32
  181. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
  182. board = genericSTM32F103VE
  183. board_build.core = stm32
  184. board_build.variant = MARLIN_F103Vx
  185. board_build.offset = 0x7000
  186. board_build.encrypt = Robin_mini.bin
  187. board_upload.offset_address = 0x08007000
  188. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  189. extra_scripts = ${stm32f1_variant.extra_scripts}
  190. #
  191. # MKS Robin Nano V1.2 and V2
  192. #
  193. [env:mks_robin_nano35]
  194. platform = ${common_stm32.platform}
  195. extends = common_stm32
  196. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
  197. board = genericSTM32F103VE
  198. board_build.core = stm32
  199. board_build.variant = MARLIN_F103Vx
  200. board_build.offset = 0x7000
  201. board_build.encrypt = Robin_nano35.bin
  202. board_upload.offset_address = 0x08007000
  203. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  204. debug_tool = jlink
  205. upload_protocol = jlink
  206. extra_scripts = ${stm32f1_variant.extra_scripts}
  207. #
  208. # Mingda MPX_ARM_MINI
  209. #
  210. [env:mingda_mpx_arm_mini]
  211. platform = ${common_stm32.platform}
  212. extends = common_stm32
  213. board = genericSTM32F103ZE
  214. board_build.core = stm32
  215. board_build.variant = MARLIN_F103Zx
  216. board_build.offset = 0x10000
  217. build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  218. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  219. extra_scripts = ${stm32f1_variant.extra_scripts}
  220. #
  221. # Malyan M200 (STM32F103CB)
  222. #
  223. [env:STM32F103CB_malyan]
  224. platform = ${common_stm32.platform}
  225. extends = common_stm32
  226. board = malyanm200_f103cb
  227. build_flags = ${common_stm32.build_flags}
  228. -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
  229. src_filter = ${common.default_src_filter} +<src/HAL/STM32>
  230. #
  231. # FLYmaker FLY Mini (STM32F103RCT6)
  232. #
  233. [env:FLY_MINI]
  234. platform = ${common_stm32.platform}
  235. extends = common_stm32
  236. build_flags = ${common_stm32.build_flags} -DSS_TIMER=4
  237. board = genericSTM32F103RC
  238. board_build.core = stm32
  239. board_build.variant = MARLIN_F103Rx
  240. board_build.offset = 0x5000
  241. board_upload.offset_address = 0x08005000
  242. extra_scripts = ${stm32f1_variant.extra_scripts}
  243. #
  244. # MKS Robin Mini (STM32F103VET6)
  245. #
  246. [env:mks_robin_mini]
  247. platform = ${common_stm32.platform}
  248. extends = common_stm32
  249. board = genericSTM32F103VE
  250. board_build.core = stm32
  251. board_build.variant = MARLIN_F103Vx
  252. board_build.offset = 0x7000
  253. board_build.encrypt = Robin_mini.bin
  254. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
  255. board_upload.offset_address = 0x08007000
  256. extra_scripts = ${stm32f1_variant.extra_scripts}
  257. #
  258. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  259. #
  260. [env:mks_robin_lite]
  261. platform = ${common_stm32.platform}
  262. extends = common_stm32
  263. board = genericSTM32F103RC
  264. board_build.core = stm32
  265. board_build.variant = MARLIN_F103Rx
  266. board_build.offset = 0x5000
  267. board_build.encrypt = mksLite.bin
  268. build_flags = ${common_stm32.build_flags}
  269. board_upload.offset_address = 0x08005000
  270. extra_scripts = ${stm32f1_variant.extra_scripts}
  271. #
  272. # MKS ROBIN LITE3 (STM32F103RCT6)
  273. #
  274. [env:mks_robin_lite3]
  275. platform = ${common_stm32.platform}
  276. extends = common_stm32
  277. board = genericSTM32F103RC
  278. board_build.core = stm32
  279. board_build.variant = MARLIN_F103Rx
  280. board_build.offset = 0x5000
  281. board_build.encrypt = mksLite3.bin
  282. build_flags = ${common_stm32.build_flags}
  283. board_upload.offset_address = 0x08005000
  284. extra_scripts = ${stm32f1_variant.extra_scripts}
  285. #
  286. # MKS Robin Pro (STM32F103ZET6)
  287. #
  288. [env:mks_robin_pro]
  289. platform = ${common_stm32.platform}
  290. extends = env:mks_robin
  291. board_build.encrypt = Robin_pro.bin
  292. #
  293. # MKS Robin E3p (STM32F103VET6)
  294. # - LVGL UI
  295. #
  296. [env:mks_robin_e3p]
  297. platform = ${common_stm32.platform}
  298. extends = common_stm32
  299. board = genericSTM32F103VE
  300. board_build.core = stm32
  301. board_build.variant = MARLIN_F103Vx
  302. board_build.offset = 0x7000
  303. board_build.encrypt = Robin_e3p.bin
  304. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
  305. board_upload.offset_address = 0x08007000
  306. extra_scripts = ${stm32f1_variant.extra_scripts}
  307. debug_tool = jlink
  308. upload_protocol = jlink
  309. #
  310. # JGAurora A5S A1 (STM32F103ZET6)
  311. #
  312. [env:jgaurora_a5s_a1]
  313. platform = ${common_stm32.platform}
  314. extends = common_stm32
  315. board = genericSTM32F103ZE
  316. board_build.core = stm32
  317. board_build.variant = MARLIN_F103Zx
  318. board_build.offset = 0xA000
  319. board_build.rename = firmware_for_sd_upload.bin
  320. build_flags = ${common_stm32.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY
  321. board_build.address = 0x0800A000
  322. extra_scripts = ${stm32f1_variant.extra_scripts}
  323. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  324. #
  325. # FYSETC STM32F103RC
  326. #
  327. [env:STM32F103RC_fysetc]
  328. platform = ${common_stm32.platform}
  329. extends = common_STM32F103RC
  330. extra_scripts = ${stm32f1_variant.extra_scripts}
  331. buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
  332. build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0
  333. lib_ldf_mode = chain
  334. debug_tool = stlink
  335. upload_protocol = serial
  336. #
  337. # Longer 3D board in Alfawise U20 (STM32F103VET6)
  338. #
  339. [env:STM32F103VE_longer]
  340. platform = ${common_stm32.platform}
  341. extends = common_stm32
  342. board = genericSTM32F103VE
  343. board_build.core = stm32
  344. board_build.variant = MARLIN_F103Vx
  345. board_build.offset = 0x10000
  346. board_build.address = 0x08010000
  347. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12
  348. -DLED_BUILTIN=PC2 -UPIN_WIRE_SDA -UPIN_WIRE_SCL -DPIN_WIRE_SDA=PB11 -DPIN_WIRE_SCL=PB10
  349. -DHAL_DAC_MODULE_DISABLED -DHAL_I2S_MODULE_DISABLED
  350. build_unflags = ${common_stm32.build_unflags}
  351. -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED
  352. extra_scripts = ${stm32f1_variant.extra_scripts}
  353. buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
  354. #
  355. # TRIGORILLA PRO (STM32F103ZET6)
  356. #
  357. [env:trigorilla_pro]
  358. platform = ${common_stm32.platform}
  359. extends = env:mks_robin
  360. extra_scripts = ${common_stm32.extra_scripts}
  361. #
  362. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  363. #
  364. [env:chitu_f103]
  365. platform = ${common_stm32.platform}
  366. extends = common_stm32
  367. board = genericSTM32F103ZE
  368. board_build.core = stm32
  369. board_build.variant = MARLIN_F103Zx
  370. extra_scripts = ${stm32f1_variant.extra_scripts}
  371. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  372. build_flags = ${common_stm32.build_flags} -DSTM32_XL_DENSITY
  373. build_unflags = ${common_stm32.build_unflags}
  374. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  375. #
  376. # Some Chitu V5 boards have a problem with GPIO init.
  377. # Use this target if G28 or G29 are always failing.
  378. #
  379. [env:chitu_v5_gpio_init]
  380. platform = ${common_stm32.platform}
  381. extends = env:chitu_f103
  382. build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX