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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  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 = marlin_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. board_build.address = 0x08007000
  110. board_build.ldscript = STM32F103RC_SKR_MINI_256K.ld
  111. extra_scripts = ${common_stm32f1.extra_scripts}
  112. buildroot/share/PlatformIO/scripts/custom_board.py
  113. build_flags = ${common_stm32f1.build_flags}
  114. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  115. monitor_speed = 115200
  116. [env:STM32F103RC_btt_USB]
  117. platform = ${common_stm32f1.platform}
  118. extends = env:STM32F103RC_btt
  119. build_flags = ${env:STM32F103RC_btt.build_flags} -DUSE_USB_COMPOSITE
  120. lib_deps = ${env:STM32F103RC_btt.lib_deps}
  121. USBComposite for STM32F1@0.91
  122. [env:STM32F103RC_btt_512K]
  123. platform = ${common_stm32f1.platform}
  124. extends = env:STM32F103RC_btt
  125. board_build.ldscript = STM32F103RC_SKR_MINI_512K.ld
  126. board_upload.maximum_size=524288
  127. build_flags = ${env:STM32F103RC_btt.build_flags} -DSTM32_FLASH_SIZE=512
  128. [env:STM32F103RC_btt_512K_USB]
  129. platform = ${common_stm32f1.platform}
  130. extends = env:STM32F103RC_btt_512K
  131. build_flags = ${env:STM32F103RC_btt_512K.build_flags} -DUSE_USB_COMPOSITE
  132. lib_deps = ${env:STM32F103RC_btt_512K.lib_deps}
  133. USBComposite for STM32F1@0.91
  134. #
  135. # STM32F103RE
  136. #
  137. [env:STM32F103RE]
  138. platform = ${common_stm32f1.platform}
  139. extends = common_stm32f1
  140. board = genericSTM32F103RE
  141. monitor_speed = 115200
  142. #
  143. # STM32F103RE_btt ............. RET6
  144. # STM32F103RE_btt_USB ......... RET6 (USB mass storage)
  145. #
  146. [env:STM32F103RE_btt]
  147. platform = ${common_stm32f1.platform}
  148. extends = env:STM32F103RE
  149. board_build.address = 0x08007000
  150. board_build.ldscript = STM32F103RE_SKR_E3_DIP.ld
  151. extra_scripts = ${common_stm32f1.extra_scripts}
  152. buildroot/share/PlatformIO/scripts/custom_board.py
  153. build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  154. debug_tool = stlink
  155. upload_protocol = stlink
  156. [env:STM32F103RE_btt_USB]
  157. platform = ${common_stm32f1.platform}
  158. extends = env:STM32F103RE_btt
  159. build_flags = ${env:STM32F103RE_btt.build_flags} -DUSE_USB_COMPOSITE
  160. lib_deps = ${common_stm32f1.lib_deps}
  161. USBComposite for STM32F1@0.91
  162. #
  163. # Geeetech GTM32 (STM32F103VET6)
  164. #
  165. [env:STM32F103VE_GTM32]
  166. platform = ${common_stm32f1.platform}
  167. extends = common_stm32f1
  168. board = genericSTM32F103VE
  169. build_flags = ${common_stm32f1.build_flags}
  170. -ffunction-sections -fdata-sections -nostdlib -MMD
  171. -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v
  172. -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000
  173. -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  174. upload_protocol = serial
  175. #
  176. # Longer 3D board in Alfawise U20 (STM32F103VET6)
  177. #
  178. [env:STM32F103VE_longer]
  179. platform = ${common_stm32f1.platform}
  180. extends = common_stm32f1
  181. board = genericSTM32F103VE
  182. board_build.address = 0x08010000
  183. board_build.ldscript = STM32F103VE_longer.ld
  184. extra_scripts = ${common_stm32f1.extra_scripts}
  185. buildroot/share/PlatformIO/scripts/custom_board.py
  186. buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
  187. build_flags = ${common_stm32f1.build_flags}
  188. -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
  189. build_unflags = ${common_stm32f1.build_unflags}
  190. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  191. #
  192. # MKS Robin Mini (STM32F103VET6)
  193. #
  194. [env:mks_robin_mini]
  195. platform = ${common_stm32f1.platform}
  196. extends = common_stm32f1
  197. board = genericSTM32F103VE
  198. extra_scripts = ${common_stm32f1.extra_scripts}
  199. buildroot/share/PlatformIO/scripts/mks_robin_mini.py
  200. build_flags = ${common_stm32f1.build_flags}
  201. -DMCU_STM32F103VE
  202. #
  203. # MKS Robin Nano (STM32F103VET6)
  204. #
  205. [env:mks_robin_nano35]
  206. platform = ${common_stm32f1.platform}
  207. extends = common_stm32f1
  208. board = genericSTM32F103VE
  209. extra_scripts = ${common_stm32f1.extra_scripts}
  210. buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
  211. build_flags = ${common_stm32f1.build_flags}
  212. -DMCU_STM32F103VE -DSS_TIMER=4
  213. debug_tool = jlink
  214. upload_protocol = jlink
  215. #
  216. # MKS Robin (STM32F103ZET6)
  217. #
  218. [env:mks_robin]
  219. platform = ${common_stm32f1.platform}
  220. extends = common_stm32f1
  221. board = genericSTM32F103ZE
  222. extra_scripts = ${common_stm32f1.extra_scripts}
  223. buildroot/share/PlatformIO/scripts/mks_robin.py
  224. build_flags = ${common_stm32f1.build_flags}
  225. -DSS_TIMER=4 -DSTM32_XL_DENSITY
  226. # MKS Robin (STM32F103ZET6)
  227. # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
  228. #
  229. [env:mks_robin_stm32]
  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 = 0x7000
  237. board_build.encrypt = Yes
  238. board_build.firmware = Robin.bin
  239. build_flags = ${common_stm32.build_flags}
  240. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  241. build_unflags = ${common_stm32.build_unflags}
  242. -DUSBCON -DUSBD_USE_CDC
  243. extra_scripts = ${common.extra_scripts}
  244. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  245. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  246. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  247. lib_deps =
  248. #
  249. # MKS Robin Pro (STM32F103ZET6)
  250. #
  251. [env:mks_robin_pro]
  252. platform = ${common_stm32f1.platform}
  253. extends = env:mks_robin
  254. extra_scripts = ${common_stm32f1.extra_scripts}
  255. buildroot/share/PlatformIO/scripts/mks_robin_pro.py
  256. #
  257. # TRIGORILLA PRO (STM32F103ZET6)
  258. #
  259. [env:trigorilla_pro]
  260. platform = ${common_stm32f1.platform}
  261. extends = env:mks_robin
  262. extra_scripts = ${common_stm32f1.extra_scripts}
  263. #
  264. # MKS Robin E3D (STM32F103RCT6) and
  265. # MKS Robin E3 with TMC2209
  266. #
  267. [env:mks_robin_e3]
  268. platform = ${common_stm32f1.platform}
  269. extends = common_stm32f1
  270. board = genericSTM32F103RC
  271. extra_scripts = ${common_stm32f1.extra_scripts}
  272. buildroot/share/PlatformIO/scripts/mks_robin_e3.py
  273. build_flags = ${common_stm32f1.build_flags}
  274. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  275. #
  276. # MKS Robin E3p (STM32F103VET6)
  277. # - LVGL UI
  278. #
  279. [env:mks_robin_e3p]
  280. platform = ${common_stm32f1.platform}
  281. extends = common_stm32f1
  282. board = genericSTM32F103VE
  283. extra_scripts = ${common_stm32f1.extra_scripts}
  284. buildroot/share/PlatformIO/scripts/mks_robin_e3p.py
  285. build_flags = ${common_stm32f1.build_flags}
  286. -DMCU_STM32F103VE -DSS_TIMER=4
  287. debug_tool = jlink
  288. upload_protocol = jlink
  289. #
  290. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  291. #
  292. [env:mks_robin_lite]
  293. platform = ${common_stm32f1.platform}
  294. extends = common_stm32f1
  295. board = genericSTM32F103RC
  296. extra_scripts = ${common_stm32f1.extra_scripts}
  297. buildroot/share/PlatformIO/scripts/mks_robin_lite.py
  298. #
  299. # MKS ROBIN LITE3 (STM32F103RCT6)
  300. #
  301. [env:mks_robin_lite3]
  302. platform = ${common_stm32f1.platform}
  303. extends = common_stm32f1
  304. board = genericSTM32F103RC
  305. extra_scripts = ${common_stm32f1.extra_scripts}
  306. buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
  307. #
  308. # JGAurora A5S A1 (STM32F103ZET6)
  309. #
  310. [env:jgaurora_a5s_a1]
  311. platform = ${common_stm32f1.platform}
  312. extends = common_stm32f1
  313. board = genericSTM32F103ZE
  314. board_build.address = 0x0800A000
  315. board_build.ldscript = jgaurora_a5s_a1.ld
  316. extra_scripts = ${common_stm32f1.extra_scripts}
  317. buildroot/share/PlatformIO/scripts/custom_board.py
  318. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  319. build_flags = ${common_stm32f1.build_flags}
  320. -DSTM32F1xx -DSTM32_XL_DENSITY
  321. #
  322. # Malyan M200 (STM32F103CB)
  323. #
  324. [env:STM32F103CB_malyan]
  325. platform = ${common_stm32f1.platform}
  326. extends = common_stm32f1
  327. board = marlin_malyanM200
  328. build_flags = ${common_stm32f1.build_flags}
  329. -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
  330. -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
  331. lib_ignore = ${common_stm32f1.lib_ignore}
  332. SoftwareSerialM
  333. #
  334. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  335. #
  336. [env:chitu_f103]
  337. platform = ${common_stm32f1.platform}
  338. extends = common_stm32f1
  339. board = marlin_CHITU_F103
  340. extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
  341. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  342. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  343. build_flags = ${common_stm32f1.build_flags}
  344. -DSTM32F1xx -DSTM32_XL_DENSITY
  345. build_unflags = ${common_stm32f1.build_unflags}
  346. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  347. #
  348. # Some Chitu V5 boards have a problem with GPIO init.
  349. # Use this target if G28 or G29 are always failing.
  350. #
  351. [env:chitu_v5_gpio_init]
  352. platform = ${common_stm32f1.platform}
  353. extends = env:chitu_f103
  354. build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  355. #
  356. # Creality (STM32F103RET6)
  357. #
  358. [env:STM32F103RET6_creality]
  359. platform = ${env:STM32F103RE.platform}
  360. extends = env:STM32F103RE
  361. build_flags = ${env:STM32F103RE.build_flags} -DTEMP_TIMER_CHAN=4
  362. board_build.address = 0x08007000
  363. board_build.ldscript = creality.ld
  364. extra_scripts = ${env:STM32F103RE.extra_scripts}
  365. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  366. buildroot/share/PlatformIO/scripts/custom_board.py
  367. debug_tool = jlink
  368. upload_protocol = jlink
  369. #
  370. # FLSUN QQS Pro (STM32F103VET6) using hal STM32
  371. # board Hispeedv1
  372. #
  373. [env:flsun_hispeedv1]
  374. platform = ${common_stm32.platform}
  375. extends = common_stm32
  376. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  377. board = genericSTM32F103VE
  378. board_build.core = stm32
  379. board_build.variant = MARLIN_F103Vx
  380. board_build.ldscript = ldscript.ld
  381. board_build.offset = 0x7000
  382. board_build.firmware = Robin_mini.bin
  383. board_build.encrypt = Yes
  384. board_upload.offset_address = 0x08007000
  385. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  386. extra_scripts = ${common.extra_scripts}
  387. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  388. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  389. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  390. #
  391. # MKS Robin Nano V1.2 and V2 using hal STM32
  392. #
  393. [env:mks_robin_nano35_stm32]
  394. platform = ${common_stm32.platform}
  395. extends = common_stm32
  396. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  397. board = genericSTM32F103VE
  398. board_build.core = stm32
  399. board_build.variant = MARLIN_F103Vx
  400. board_build.ldscript = ldscript.ld
  401. board_build.offset = 0x7000
  402. board_build.encrypt = Yes
  403. board_build.firmware = Robin_nano35.bin
  404. board_upload.offset_address = 0x08007000
  405. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  406. debug_tool = jlink
  407. upload_protocol = jlink
  408. extra_scripts = ${common.extra_scripts}
  409. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  410. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  411. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  412. #
  413. # Mingda MPX_ARM_MINI
  414. #
  415. [env:mingda_mpx_arm_mini]
  416. platform = ${common_stm32.platform}
  417. extends = common_stm32
  418. board = genericSTM32F103ZE
  419. board_build.core = stm32
  420. board_build.variant = MARLIN_F103Zx
  421. board_build.ldscript = ldscript.ld
  422. board_build.offset = 0x10000
  423. build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  424. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  425. extra_scripts = ${common.extra_scripts}
  426. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  427. buildroot/share/PlatformIO/scripts/stm32_bootloader.py