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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. #
  2. # Marlin Firmware
  3. # PlatformIO Configuration File
  4. #
  5. #################################
  6. #
  7. # STM32F1 Architecture
  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.0
  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. #
  33. # HAL/STM32F1 Common Environment values
  34. #
  35. [common_stm32f1]
  36. platform = ststm32@~12.0
  37. board_build.core = maple
  38. build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
  39. ${common.build_flags}
  40. -DARDUINO_ARCH_STM32
  41. build_unflags = -std=gnu11 -std=gnu++11
  42. src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
  43. lib_ignore = SPI, FreeRTOS701, FreeRTOS821
  44. lib_deps = ${common.lib_deps}
  45. SoftwareSerialM
  46. platform_packages = tool-stm32duino
  47. extra_scripts = ${common.extra_scripts}
  48. pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
  49. #
  50. # STM32F103RC
  51. #
  52. [env:STM32F103RC]
  53. platform = ${common_stm32f1.platform}
  54. extends = common_stm32f1
  55. board = genericSTM32F103RC
  56. monitor_speed = 115200
  57. #
  58. # MEEB_3DP (STM32F103RCT6 with 512K)
  59. #
  60. [env:STM32F103RC_meeb]
  61. platform = ${common_stm32f1.platform}
  62. extends = common_stm32f1
  63. board = MEEB_3DP
  64. build_flags = ${common_stm32f1.build_flags}
  65. -DDEBUG_LEVEL=0
  66. -DSS_TIMER=4
  67. -DSTM32_FLASH_SIZE=512
  68. -DHSE_VALUE=12000000U
  69. -DUSE_USB_COMPOSITE
  70. -DVECT_TAB_OFFSET=0x2000
  71. -DGENERIC_BOOTLOADER
  72. extra_scripts = ${common_stm32f1.extra_scripts}
  73. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  74. buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
  75. lib_deps = ${common.lib_deps}
  76. SoftwareSerialM
  77. USBComposite for STM32F1@0.91
  78. custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use
  79. debug_tool = stlink
  80. upload_protocol = dfu
  81. #
  82. # STM32F103RC_fysetc
  83. #
  84. [env:STM32F103RC_fysetc]
  85. platform = ${common_stm32f1.platform}
  86. extends = env:STM32F103RC
  87. extra_scripts = ${common_stm32f1.extra_scripts}
  88. buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
  89. build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0
  90. lib_ldf_mode = chain
  91. debug_tool = stlink
  92. upload_protocol = serial
  93. #
  94. # BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3)
  95. #
  96. # STM32F103RC_btt ............. RCT6 with 256K
  97. # STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage)
  98. # STM32F103RC_btt_512K ........ RCT6 with 512K
  99. # STM32F103RC_btt_512K_USB .... RCT6 with 512K (USB mass storage)
  100. #
  101. # WARNING! If you have an SKR Mini v1.1 or an SKR Mini E3 1.0 / 1.2 / 2.0 / DIP
  102. # and experience a printer freeze, re-flash Marlin using the regular (non-512K)
  103. # build option. 256K chips may be re-branded 512K chips, but this means the
  104. # upper 256K is sketchy, and failure is very likely.
  105. #
  106. [env:STM32F103RC_btt]
  107. platform = ${common_stm32f1.platform}
  108. extends = env:STM32F103RC
  109. extra_scripts = ${common_stm32f1.extra_scripts}
  110. buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
  111. build_flags = ${common_stm32f1.build_flags}
  112. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  113. monitor_speed = 115200
  114. [env:STM32F103RC_btt_USB]
  115. platform = ${common_stm32f1.platform}
  116. extends = env:STM32F103RC_btt
  117. build_flags = ${env:STM32F103RC_btt.build_flags} -DUSE_USB_COMPOSITE
  118. lib_deps = ${env:STM32F103RC_btt.lib_deps}
  119. USBComposite for STM32F1@0.91
  120. [env:STM32F103RC_btt_512K]
  121. platform = ${common_stm32f1.platform}
  122. extends = env:STM32F103RC_btt
  123. board_upload.maximum_size=524288
  124. build_flags = ${env:STM32F103RC_btt.build_flags} -DSTM32_FLASH_SIZE=512
  125. [env:STM32F103RC_btt_512K_USB]
  126. platform = ${common_stm32f1.platform}
  127. extends = env:STM32F103RC_btt_512K
  128. build_flags = ${env:STM32F103RC_btt_512K.build_flags} -DUSE_USB_COMPOSITE
  129. lib_deps = ${env:STM32F103RC_btt_512K.lib_deps}
  130. USBComposite for STM32F1@0.91
  131. #
  132. # STM32F103RE
  133. #
  134. [env:STM32F103RE]
  135. platform = ${common_stm32f1.platform}
  136. extends = common_stm32f1
  137. board = genericSTM32F103RE
  138. monitor_speed = 115200
  139. #
  140. # STM32F103RE_btt ............. RET6
  141. # STM32F103RE_btt_USB ......... RET6 (USB mass storage)
  142. #
  143. [env:STM32F103RE_btt]
  144. platform = ${common_stm32f1.platform}
  145. extends = env:STM32F103RE
  146. extra_scripts = ${common_stm32f1.extra_scripts}
  147. buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
  148. build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  149. debug_tool = stlink
  150. upload_protocol = stlink
  151. [env:STM32F103RE_btt_USB]
  152. platform = ${common_stm32f1.platform}
  153. extends = env:STM32F103RE_btt
  154. build_flags = ${env:STM32F103RE_btt.build_flags} -DUSE_USB_COMPOSITE
  155. lib_deps = ${common_stm32f1.lib_deps}
  156. USBComposite for STM32F1@0.91
  157. #
  158. # Geeetech GTM32 (STM32F103VET6)
  159. #
  160. [env:STM32F103VE_GTM32]
  161. platform = ${common_stm32f1.platform}
  162. extends = common_stm32f1
  163. board = genericSTM32F103VE
  164. build_flags = ${common_stm32f1.build_flags}
  165. -ffunction-sections -fdata-sections -nostdlib -MMD
  166. -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v
  167. -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000
  168. -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  169. upload_protocol = serial
  170. #
  171. # Longer 3D board in Alfawise U20 (STM32F103VET6)
  172. #
  173. [env:STM32F103VE_longer]
  174. platform = ${common_stm32f1.platform}
  175. extends = common_stm32f1
  176. board = genericSTM32F103VE
  177. extra_scripts = ${common_stm32f1.extra_scripts}
  178. buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
  179. build_flags = ${common_stm32f1.build_flags}
  180. -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
  181. build_unflags = ${common_stm32f1.build_unflags}
  182. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  183. #
  184. # MKS Robin Mini (STM32F103VET6)
  185. #
  186. [env:mks_robin_mini]
  187. platform = ${common_stm32f1.platform}
  188. extends = common_stm32f1
  189. board = genericSTM32F103VE
  190. extra_scripts = ${common_stm32f1.extra_scripts}
  191. buildroot/share/PlatformIO/scripts/mks_robin_mini.py
  192. build_flags = ${common_stm32f1.build_flags}
  193. -DMCU_STM32F103VE
  194. #
  195. # MKS Robin Nano (STM32F103VET6)
  196. #
  197. [env:mks_robin_nano35]
  198. platform = ${common_stm32f1.platform}
  199. extends = common_stm32f1
  200. board = genericSTM32F103VE
  201. extra_scripts = ${common_stm32f1.extra_scripts}
  202. buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
  203. build_flags = ${common_stm32f1.build_flags}
  204. -DMCU_STM32F103VE -DSS_TIMER=4
  205. debug_tool = jlink
  206. upload_protocol = jlink
  207. #
  208. # MKS Robin (STM32F103ZET6)
  209. #
  210. [env:mks_robin]
  211. platform = ${common_stm32f1.platform}
  212. extends = common_stm32f1
  213. board = genericSTM32F103ZE
  214. extra_scripts = ${common_stm32f1.extra_scripts}
  215. buildroot/share/PlatformIO/scripts/mks_robin.py
  216. build_flags = ${common_stm32f1.build_flags}
  217. -DSS_TIMER=4 -DSTM32_XL_DENSITY
  218. # MKS Robin (STM32F103ZET6)
  219. # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
  220. #
  221. [env:mks_robin_stm32]
  222. platform = ${common_stm32.platform}
  223. extends = common_stm32
  224. board = genericSTM32F103ZE
  225. board_build.core = stm32
  226. board_build.variant = MARLIN_F103Zx
  227. board_build.ldscript = ldscript.ld
  228. board_build.offset = 0x7000
  229. board_build.encrypt = Yes
  230. board_build.firmware = Robin.bin
  231. build_flags = ${common_stm32.build_flags}
  232. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  233. build_unflags = ${common_stm32.build_unflags}
  234. -DUSBCON -DUSBD_USE_CDC
  235. extra_scripts = ${common.extra_scripts}
  236. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  237. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  238. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  239. lib_deps =
  240. #
  241. # MKS Robin Pro (STM32F103ZET6)
  242. #
  243. [env:mks_robin_pro]
  244. platform = ${common_stm32f1.platform}
  245. extends = env:mks_robin
  246. extra_scripts = ${common_stm32f1.extra_scripts}
  247. buildroot/share/PlatformIO/scripts/mks_robin_pro.py
  248. #
  249. # TRIGORILLA PRO (STM32F103ZET6)
  250. #
  251. [env:trigorilla_pro]
  252. platform = ${common_stm32f1.platform}
  253. extends = env:mks_robin
  254. extra_scripts = ${common_stm32f1.extra_scripts}
  255. #
  256. # MKS Robin E3D (STM32F103RCT6) and
  257. # MKS Robin E3 with TMC2209
  258. #
  259. [env:mks_robin_e3]
  260. platform = ${common_stm32f1.platform}
  261. extends = common_stm32f1
  262. board = genericSTM32F103RC
  263. extra_scripts = ${common_stm32f1.extra_scripts}
  264. buildroot/share/PlatformIO/scripts/mks_robin_e3.py
  265. build_flags = ${common_stm32f1.build_flags}
  266. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  267. #
  268. # MKS Robin E3p (STM32F103VET6)
  269. # - LVGL UI
  270. #
  271. [env:mks_robin_e3p]
  272. platform = ${common_stm32f1.platform}
  273. extends = common_stm32f1
  274. board = genericSTM32F103VE
  275. extra_scripts = ${common_stm32f1.extra_scripts}
  276. buildroot/share/PlatformIO/scripts/mks_robin_e3p.py
  277. build_flags = ${common_stm32f1.build_flags}
  278. -DMCU_STM32F103VE -DSS_TIMER=4
  279. debug_tool = jlink
  280. upload_protocol = jlink
  281. #
  282. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  283. #
  284. [env:mks_robin_lite]
  285. platform = ${common_stm32f1.platform}
  286. extends = common_stm32f1
  287. board = genericSTM32F103RC
  288. extra_scripts = ${common_stm32f1.extra_scripts}
  289. buildroot/share/PlatformIO/scripts/mks_robin_lite.py
  290. #
  291. # MKS ROBIN LITE3 (STM32F103RCT6)
  292. #
  293. [env:mks_robin_lite3]
  294. platform = ${common_stm32f1.platform}
  295. extends = common_stm32f1
  296. board = genericSTM32F103RC
  297. extra_scripts = ${common_stm32f1.extra_scripts}
  298. buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
  299. #
  300. # JGAurora A5S A1 (STM32F103ZET6)
  301. #
  302. [env:jgaurora_a5s_a1]
  303. platform = ${common_stm32f1.platform}
  304. extends = common_stm32f1
  305. board = genericSTM32F103ZE
  306. extra_scripts = ${common_stm32f1.extra_scripts}
  307. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  308. build_flags = ${common_stm32f1.build_flags}
  309. -DSTM32F1xx -DSTM32_XL_DENSITY
  310. #
  311. # Malyan M200 (STM32F103CB)
  312. #
  313. [env:STM32F103CB_malyan]
  314. platform = ${common_stm32f1.platform}
  315. extends = common_stm32f1
  316. board = malyanM200
  317. build_flags = ${common_stm32f1.build_flags}
  318. -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
  319. -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
  320. lib_ignore = ${common_stm32f1.lib_ignore}
  321. SoftwareSerialM
  322. #
  323. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  324. #
  325. [env:chitu_f103]
  326. platform = ${common_stm32f1.platform}
  327. extends = common_stm32f1
  328. board = CHITU_F103
  329. extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
  330. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  331. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  332. build_flags = ${common_stm32f1.build_flags}
  333. -DSTM32F1xx -DSTM32_XL_DENSITY
  334. build_unflags = ${common_stm32f1.build_unflags}
  335. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  336. #
  337. # Some Chitu V5 boards have a problem with GPIO init.
  338. # Use this target if G28 or G29 are always failing.
  339. #
  340. [env:chitu_v5_gpio_init]
  341. platform = ${common_stm32f1.platform}
  342. extends = env:chitu_f103
  343. build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  344. #
  345. # Creality (STM32F103RET6)
  346. #
  347. [env:STM32F103RET6_creality]
  348. platform = ${env:STM32F103RE.platform}
  349. extends = env:STM32F103RE
  350. build_flags = ${env:STM32F103RE.build_flags} -DTEMP_TIMER_CHAN=4
  351. extra_scripts = ${env:STM32F103RE.extra_scripts}
  352. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  353. buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py
  354. debug_tool = jlink
  355. upload_protocol = jlink
  356. #
  357. # FLSUN QQS Pro (STM32F103VET6) using hal STM32
  358. # board Hispeedv1
  359. #
  360. [env:flsun_hispeedv1]
  361. platform = ${common_stm32.platform}
  362. extends = common_stm32
  363. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  364. board = genericSTM32F103VE
  365. board_build.core = stm32
  366. board_build.variant = MARLIN_F103Vx
  367. board_build.ldscript = ldscript.ld
  368. board_build.offset = 0x7000
  369. board_build.firmware = Robin_mini.bin
  370. board_build.encrypt = Yes
  371. board_upload.offset_address = 0x08007000
  372. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  373. extra_scripts = ${common.extra_scripts}
  374. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  375. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  376. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  377. #
  378. # MKS Robin Nano V1.2 and V2 using hal STM32
  379. #
  380. [env:mks_robin_nano35_stm32]
  381. platform = ${common_stm32.platform}
  382. extends = common_stm32
  383. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  384. board = genericSTM32F103VE
  385. board_build.core = stm32
  386. board_build.variant = MARLIN_F103Vx
  387. board_build.ldscript = ldscript.ld
  388. board_build.offset = 0x7000
  389. board_build.encrypt = Yes
  390. board_build.firmware = Robin_nano35.bin
  391. board_upload.offset_address = 0x08007000
  392. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  393. debug_tool = jlink
  394. upload_protocol = jlink
  395. extra_scripts = ${common.extra_scripts}
  396. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  397. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  398. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  399. #
  400. # Mingda MPX_ARM_MINI
  401. #
  402. [env:mingda_mpx_arm_mini]
  403. platform = ${common_stm32.platform}
  404. extends = common_stm32
  405. board = genericSTM32F103ZE
  406. board_build.core = stm32
  407. board_build.variant = MARLIN_F103Zx
  408. board_build.ldscript = ldscript.ld
  409. board_build.offset = 0x10000
  410. build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  411. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  412. extra_scripts = ${common.extra_scripts}
  413. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  414. buildroot/share/PlatformIO/scripts/stm32_bootloader.py