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 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  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 M3 core (0:M0, 1-2:M3, 3-4:M4, 7:M7)
  13. # 03 : Line/Features
  14. # R : 64 or 66 pins (T:36, C:48, V:100, Z:144, I:176)
  15. # C : 256KB Flash-memory (B: 128KB, D:384KB, E:512KB, G:1024KB)
  16. # T : LQFP package
  17. # 6 : -40...85°C (7: ...105°C)
  18. #
  19. #################################
  20. [common_STM32F103RC_variant]
  21. extends = stm32_variant
  22. board = genericSTM32F103RC
  23. board_build.variant = MARLIN_F103Rx
  24. build_flags = ${stm32_variant.build_flags} -DDEBUG_LEVEL=0
  25. monitor_speed = 115200
  26. #
  27. # STM32F103RE
  28. #
  29. [env:STM32F103RE]
  30. extends = common_stm32
  31. board = genericSTM32F103RE
  32. monitor_speed = 115200
  33. #
  34. # STM32F103VE
  35. #
  36. [env:STM32F103VE]
  37. extends = common_stm32
  38. board = genericSTM32F103VE
  39. monitor_speed = 115200
  40. #
  41. # STM32F103ZE
  42. #
  43. [env:STM32F103ZE]
  44. extends = common_stm32
  45. board = genericSTM32F103ZE
  46. monitor_speed = 115200
  47. #
  48. # BigTreeTech SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3)
  49. #
  50. # STM32F103RC_btt ............. RCT6 with 256K
  51. # STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage)
  52. #
  53. [env:STM32F103RC_btt]
  54. extends = common_STM32F103RC_variant
  55. build_flags = ${common_STM32F103RC_variant.build_flags}
  56. -DTIMER_SERVO=TIM5
  57. board_build.offset = 0x7000
  58. board_upload.offset_address = 0x08007000
  59. [env:STM32F103RC_btt_USB]
  60. extends = env:STM32F103RC_btt
  61. platform_packages = ${stm_flash_drive.platform_packages}
  62. build_flags = ${env:STM32F103RC_btt.build_flags}
  63. -DUSE_USB_FS
  64. -DUSBD_IRQ_PRIO=5
  65. -DUSBD_IRQ_SUBPRIO=6
  66. -DUSBD_USE_CDC_MSC
  67. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  68. #
  69. # Panda Pi V2.9 - Standalone (STM32F103RC)
  70. # Headless, without direct Pi control, but potentially hosting OctoPrint, stepdaemon, etc.
  71. #
  72. [env:PANDA_PI_V29]
  73. extends = common_STM32F103RC_variant
  74. build_flags = ${common_STM32F103RC_variant.build_flags}
  75. -DTIMER_SERVO=TIM1
  76. board_build.offset = 0x5000
  77. board_upload.offset_address = 0x08005000
  78. lib_deps =
  79. markyue/Panda_SoftMasterI2C@1.0.3
  80. #
  81. # MKS Robin (STM32F103ZET6)
  82. # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
  83. #
  84. [env:mks_robin]
  85. extends = stm32_variant
  86. board = genericSTM32F103ZE
  87. board_build.variant = MARLIN_F103Zx
  88. board_build.encrypt_mks = Robin.bin
  89. board_build.offset = 0x7000
  90. build_flags = ${stm32_variant.build_flags}
  91. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  92. build_unflags = ${stm32_variant.build_unflags}
  93. -DUSBCON -DUSBD_USE_CDC
  94. #
  95. # MKS Robin E3/E3D (STM32F103RCT6) with TMC2209
  96. #
  97. [env:mks_robin_e3]
  98. extends = common_STM32F103RC_variant
  99. board_build.encrypt_mks = Robin_e3.bin
  100. board_build.offset = 0x5000
  101. board_upload.offset_address = 0x08005000
  102. build_flags = ${common_STM32F103RC_variant.build_flags}
  103. -DTIMER_SERVO=TIM5 -DDEFAULT_SPI=3
  104. build_unflags = ${common_STM32F103RC_variant.build_unflags}
  105. -DUSBCON -DUSBD_USE_CDC
  106. debug_tool = stlink
  107. #
  108. # Creality (STM32F103Rx)
  109. #
  110. [STM32F103Rx_creality]
  111. extends = stm32_variant
  112. board_build.variant = MARLIN_F103Rx
  113. board_build.offset = 0x7000
  114. board_upload.offset_address = 0x08007000
  115. build_flags = ${stm32_variant.build_flags}
  116. -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED
  117. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  118. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  119. build_unflags = ${stm32_variant.build_unflags}
  120. -DUSBCON -DUSBD_USE_CDC
  121. extra_scripts = ${stm32_variant.extra_scripts}
  122. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  123. monitor_speed = 115200
  124. debug_tool = jlink
  125. upload_protocol = jlink
  126. #
  127. # Custom upload to SD via Marlin with Binary Protocol
  128. #
  129. [STM32F103Rx_creality_xfer]
  130. extends = STM32F103Rx_creality
  131. build_flags = ${STM32F103Rx_creality.build_flags} -DXFER_BUILD
  132. extra_scripts = ${STM32F103Rx_creality.extra_scripts}
  133. pre:buildroot/share/scripts/upload.py
  134. upload_protocol = custom
  135. #
  136. # Creality 512K (STM32F103RE)
  137. #
  138. [env:STM32F103RE_creality]
  139. extends = STM32F103Rx_creality
  140. board = genericSTM32F103RE
  141. [env:STM32F103RE_creality_xfer]
  142. extends = STM32F103Rx_creality_xfer
  143. board = genericSTM32F103RE
  144. [env:STM32F103RE_creality_smartPro]
  145. extends = STM32F103Rx_creality
  146. board_build.offset = 0x10000
  147. board_upload.offset_address = 0x08010000
  148. #
  149. # Creality 256K (STM32F103RC)
  150. #
  151. [env:STM32F103RC_creality]
  152. extends = STM32F103Rx_creality
  153. board = genericSTM32F103RC
  154. [env:STM32F103RC_creality_xfer]
  155. extends = STM32F103Rx_creality_xfer
  156. board = genericSTM32F103RC
  157. #
  158. # BigTreeTech SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
  159. #
  160. # STM32F103RE_btt ............. RET6
  161. # STM32F103RE_btt_USB ......... RET6 (USB mass storage)
  162. #
  163. [env:STM32F103RE_btt]
  164. extends = stm32_variant
  165. board = genericSTM32F103RE
  166. board_build.variant = MARLIN_F103Rx
  167. board_build.offset = 0x7000
  168. board_upload.offset_address = 0x08007000
  169. build_flags = ${stm32_variant.build_flags}
  170. -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED
  171. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  172. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  173. monitor_speed = 115200
  174. debug_tool = jlink
  175. upload_protocol = jlink
  176. [env:STM32F103RE_btt_USB]
  177. extends = env:STM32F103RE_btt
  178. platform_packages = ${stm_flash_drive.platform_packages}
  179. build_flags = ${env:STM32F103RE_btt.build_flags}
  180. -DUSE_USB_FS -DUSBD_IRQ_PRIO=5
  181. -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC
  182. build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC
  183. #
  184. # FLSUN QQS Pro (STM32F103VET6)
  185. # board Hispeedv1
  186. #
  187. [env:flsun_hispeedv1]
  188. extends = stm32_variant
  189. board = genericSTM32F103VE
  190. board_build.variant = MARLIN_F103Vx
  191. board_build.encrypt_mks = Robin_mini.bin
  192. board_build.offset = 0x7000
  193. board_upload.offset_address = 0x08007000
  194. build_flags = ${stm32_variant.build_flags}
  195. -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  196. -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
  197. build_unflags = ${stm32_variant.build_unflags}
  198. -DUSBCON -DUSBD_USE_CDC
  199. [mks_robin_nano_v1v2_common]
  200. extends = stm32_variant
  201. board = genericSTM32F103VE
  202. board_build.variant = MARLIN_F103Vx
  203. board_build.encrypt_mks = Robin_nano35.bin
  204. board_build.offset = 0x7000
  205. board_upload.offset_address = 0x08007000
  206. debug_tool = stlink
  207. upload_protocol = stlink
  208. #
  209. # MKS Robin Nano V1.2 and V2
  210. #
  211. [env:mks_robin_nano_v1v2]
  212. extends = mks_robin_nano_v1v2_common
  213. build_flags = ${stm32_variant.build_flags}
  214. -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  215. -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
  216. build_unflags = ${stm32_variant.build_unflags}
  217. -DUSBCON -DUSBD_USE_CDC
  218. #
  219. # MKS/ZNP Robin Nano V1.2 and V2 with native USB modification
  220. #
  221. [env:mks_robin_nano_v1v2_usbmod]
  222. extends = mks_robin_nano_v1v2_common
  223. build_flags = ${common_stm32.build_flags}
  224. -DMCU_STM32F103VE -DSS_TIMER=4
  225. -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
  226. #
  227. # Mingda MPX_ARM_MINI
  228. #
  229. [env:mingda_mpx_arm_mini]
  230. extends = stm32_variant
  231. board = genericSTM32F103ZE
  232. board_build.variant = MARLIN_F103Zx
  233. board_build.offset = 0x10000
  234. build_flags = ${stm32_variant.build_flags}
  235. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  236. build_unflags = ${stm32_variant.build_unflags}
  237. -DUSBCON -DUSBD_USE_CDC
  238. #
  239. # Malyan M200 (STM32F103CB)
  240. #
  241. [env:STM32F103CB_malyan]
  242. extends = common_stm32
  243. board = malyanm200_f103cb
  244. build_flags = ${common_stm32.build_flags}
  245. -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB
  246. -DHAL_UART_MODULE_ENABLED
  247. build_src_filter = ${common.default_src_filter} +<src/HAL/STM32>
  248. #
  249. # FLYmaker FLY Mini (STM32F103RCT6)
  250. #
  251. [env:FLY_MINI]
  252. extends = stm32_variant
  253. board = genericSTM32F103RC
  254. board_build.variant = MARLIN_F103Rx
  255. board_build.offset = 0x5000
  256. board_upload.offset_address = 0x08005000
  257. build_flags = ${stm32_variant.build_flags} -DSS_TIMER=4
  258. #
  259. # MKS Robin Mini (STM32F103VET6)
  260. #
  261. [env:mks_robin_mini]
  262. extends = stm32_variant
  263. board = genericSTM32F103VE
  264. board_build.variant = MARLIN_F103Vx
  265. board_build.encrypt_mks = Robin_mini.bin
  266. board_build.offset = 0x7000
  267. board_upload.offset_address = 0x08007000
  268. build_flags = ${stm32_variant.build_flags}
  269. -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
  270. #
  271. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  272. #
  273. [env:mks_robin_lite]
  274. extends = stm32_variant
  275. board = genericSTM32F103RC
  276. board_build.variant = MARLIN_F103Rx
  277. board_build.encrypt_mks = mksLite.bin
  278. board_build.offset = 0x5000
  279. board_upload.offset_address = 0x08005000
  280. #
  281. # MKS ROBIN LITE3 (STM32F103RCT6)
  282. #
  283. [env:mks_robin_lite3]
  284. extends = env:mks_robin_lite
  285. board_build.encrypt_mks = mksLite3.bin
  286. #
  287. # MKS Robin Pro (STM32F103ZET6)
  288. #
  289. [env:mks_robin_pro]
  290. extends = env:mks_robin
  291. board_build.encrypt_mks = Robin_pro.bin
  292. #
  293. # MKS Robin E3p (STM32F103VET6)
  294. # - LVGL UI
  295. #
  296. [env:mks_robin_e3p]
  297. extends = stm32_variant
  298. board = genericSTM32F103VE
  299. board_build.variant = MARLIN_F103Vx
  300. board_build.encrypt_mks = Robin_e3p.bin
  301. board_build.offset = 0x7000
  302. board_upload.offset_address = 0x08007000
  303. build_flags = ${stm32_variant.build_flags}
  304. -DMCU_STM32F103VE -DSS_TIMER=4
  305. -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
  306. debug_tool = jlink
  307. upload_protocol = jlink
  308. #
  309. # JGAurora A5S A1 (STM32F103ZET6)
  310. #
  311. [env:jgaurora_a5s_a1]
  312. extends = stm32_variant
  313. board = genericSTM32F103ZE
  314. board_build.variant = MARLIN_F103Zx
  315. board_build.offset = 0xA000
  316. board_upload.offset_address = 0x0800A000
  317. build_flags = ${stm32_variant.build_flags}
  318. -DSTM32F1xx -DSTM32_XL_DENSITY
  319. extra_scripts = ${stm32_variant.extra_scripts}
  320. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  321. #
  322. # FYSETC STM32F103RC
  323. #
  324. [env:STM32F103RC_fysetc]
  325. extends = common_STM32F103RC_variant
  326. extra_scripts = ${common_STM32F103RC_variant.extra_scripts}
  327. buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
  328. lib_ldf_mode = chain
  329. debug_tool = stlink
  330. upload_protocol = serial
  331. #
  332. # Longer 3D board in Alfawise U20 (STM32F103VET6)
  333. #
  334. [env:STM32F103VE_longer]
  335. extends = stm32_variant
  336. lib_deps = ${common.lib_deps}
  337. https://github.com/tpruvot/STM32_Servo_OpenDrain/archive/2.0.zip
  338. board = genericSTM32F103VE
  339. board_build.variant = MARLIN_F103VE_LONGER
  340. board_build.rename = project.bin
  341. board_build.offset = 0x10000
  342. board_upload.offset_address = 0x08010000
  343. build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12
  344. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED
  345. extra_scripts = ${stm32_variant.extra_scripts}
  346. monitor_speed = 250000
  347. debug_tool = stlink
  348. #
  349. # TRIGORILLA PRO (STM32F103ZET6)
  350. #
  351. [env:trigorilla_pro]
  352. extends = stm32_variant
  353. board = genericSTM32F103ZE
  354. board_build.variant = MARLIN_F103Zx
  355. build_flags = ${stm32_variant.build_flags}
  356. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  357. build_unflags = ${stm32_variant.build_unflags}
  358. -DUSBCON -DUSBD_USE_CDC
  359. #
  360. # TRIGORILLA PRO DISK BASED (STM32F103ZET6)
  361. # Builds for Trigorilla to update from SD
  362. #
  363. [env:trigorilla_pro_disk]
  364. extends = stm32_variant
  365. board = genericSTM32F103ZE
  366. board_build.crypt_chitu = update.zw
  367. board_build.variant = MARLIN_F103Zx
  368. board_build.offset = 0x8800
  369. build_flags = ${stm32_variant.build_flags}
  370. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  371. build_unflags = ${stm32_variant.build_unflags}
  372. -DUSBCON -DUSBD_USE_CDC
  373. extra_scripts = ${stm32_variant.extra_scripts}
  374. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  375. #
  376. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  377. #
  378. [env:chitu_f103]
  379. extends = stm32_variant
  380. board = genericSTM32F103ZE
  381. board_build.crypt_chitu = update.cbd
  382. board_build.variant = MARLIN_F103Zx
  383. board_build.offset = 0x8800
  384. build_flags = ${stm32_variant.build_flags}
  385. -DSTM32F1xx
  386. build_unflags = ${stm32_variant.build_unflags}
  387. extra_scripts = ${stm32_variant.extra_scripts}
  388. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  389. #
  390. # Some Chitu V5 boards have a problem with GPIO init.
  391. # Use this target if G28 or G29 are always failing.
  392. #
  393. [env:chitu_v5_gpio_init]
  394. extends = env:chitu_f103
  395. build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  396. #
  397. # Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0
  398. #
  399. # STM32F103RC_ZM3E2_USB ........... RCT6 with 256K
  400. # STM32F103VC_ZM3E4_USB ........... VCT6 with 256K
  401. # STM32F103VE_ZM3E4V2_USB ......... VET6 with 512K
  402. #
  403. [ZONESTAR_ZM3E]
  404. extends = stm32_variant
  405. platform_packages = ${stm_flash_drive.platform_packages}
  406. board_upload.offset_address = 0x08005000
  407. board_build.offset = 0x5000
  408. board_upload.maximum_size = 237568
  409. extra_scripts = ${stm32_variant.extra_scripts}
  410. build_flags = ${common_stm32.build_flags}
  411. -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC
  412. build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC
  413. [env:STM32F103RC_ZM3E2_USB]
  414. extends = ZONESTAR_ZM3E
  415. board = genericSTM32F103RC
  416. board_build.variant = MARLIN_F103Rx
  417. [env:STM32F103VC_ZM3E4_USB]
  418. extends = ZONESTAR_ZM3E
  419. board = genericSTM32F103VC
  420. board_build.variant = MARLIN_F103Vx
  421. build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=TIM1
  422. [env:STM32F103VE_ZM3E4V2_USB]
  423. extends = ZONESTAR_ZM3E
  424. board = genericSTM32F103VE
  425. board_build.variant = MARLIN_F103Vx
  426. build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=TIM1
  427. board_upload.maximum_size = 499712