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

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