My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

stm32f1.ini 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  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. platform_packages = tool-stm32duino
  264. extra_scripts = ${common_stm32f1.extra_scripts}
  265. buildroot/share/PlatformIO/scripts/mks_robin_e3.py
  266. build_flags = ${common_stm32f1.build_flags}
  267. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  268. #
  269. # MKS Robin E3p (STM32F103VET6)
  270. # - LVGL UI
  271. #
  272. [env:mks_robin_e3p]
  273. platform = ${common_stm32f1.platform}
  274. extends = common_stm32f1
  275. board = genericSTM32F103VE
  276. extra_scripts = ${common_stm32f1.extra_scripts}
  277. buildroot/share/PlatformIO/scripts/mks_robin_e3p.py
  278. build_flags = ${common_stm32f1.build_flags}
  279. -DMCU_STM32F103VE -DSS_TIMER=4
  280. debug_tool = jlink
  281. upload_protocol = jlink
  282. #
  283. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  284. #
  285. [env:mks_robin_lite]
  286. platform = ${common_stm32f1.platform}
  287. extends = common_stm32f1
  288. board = genericSTM32F103RC
  289. extra_scripts = ${common_stm32f1.extra_scripts}
  290. buildroot/share/PlatformIO/scripts/mks_robin_lite.py
  291. #
  292. # MKS ROBIN LITE3 (STM32F103RCT6)
  293. #
  294. [env:mks_robin_lite3]
  295. platform = ${common_stm32f1.platform}
  296. extends = common_stm32f1
  297. board = genericSTM32F103RC
  298. extra_scripts = ${common_stm32f1.extra_scripts}
  299. buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
  300. #
  301. # JGAurora A5S A1 (STM32F103ZET6)
  302. #
  303. [env:jgaurora_a5s_a1]
  304. platform = ${common_stm32f1.platform}
  305. extends = common_stm32f1
  306. board = genericSTM32F103ZE
  307. extra_scripts = ${common_stm32f1.extra_scripts}
  308. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  309. build_flags = ${common_stm32f1.build_flags}
  310. -DSTM32F1xx -DSTM32_XL_DENSITY
  311. #
  312. # Malyan M200 (STM32F103CB)
  313. #
  314. [env:STM32F103CB_malyan]
  315. platform = ${common_stm32f1.platform}
  316. extends = common_stm32f1
  317. board = malyanM200
  318. build_flags = ${common_stm32f1.build_flags}
  319. -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
  320. -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
  321. lib_ignore = ${common_stm32f1.lib_ignore}
  322. SoftwareSerialM
  323. #
  324. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  325. #
  326. [env:chitu_f103]
  327. platform = ${common_stm32f1.platform}
  328. extends = common_stm32f1
  329. board = CHITU_F103
  330. extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
  331. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  332. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  333. build_flags = ${common_stm32f1.build_flags}
  334. -DSTM32F1xx -DSTM32_XL_DENSITY
  335. build_unflags = ${common_stm32f1.build_unflags}
  336. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  337. #
  338. # Some Chitu V5 boards have a problem with GPIO init.
  339. # Use this target if G28 or G29 are always failing.
  340. #
  341. [env:chitu_v5_gpio_init]
  342. platform = ${common_stm32f1.platform}
  343. extends = env:chitu_f103
  344. build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  345. #
  346. # Creality (STM32F103RET6)
  347. #
  348. [env:STM32F103RET6_creality]
  349. platform = ${env:STM32F103RE.platform}
  350. extends = env:STM32F103RE
  351. build_flags = ${env:STM32F103RE.build_flags} -DTEMP_TIMER_CHAN=4
  352. extra_scripts = ${env:STM32F103RE.extra_scripts}
  353. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  354. buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py
  355. debug_tool = jlink
  356. upload_protocol = jlink
  357. #
  358. # FLSUN QQS Pro (STM32F103VET6) using hal STM32
  359. # board Hispeedv1
  360. #
  361. [env:flsun_hispeedv1]
  362. platform = ${common_stm32.platform}
  363. extends = common_stm32
  364. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  365. board = genericSTM32F103VE
  366. board_build.core = stm32
  367. board_build.variant = MARLIN_F103Vx
  368. board_build.ldscript = ldscript.ld
  369. board_build.offset = 0x7000
  370. board_build.firmware = Robin_mini.bin
  371. board_build.encrypt = Yes
  372. board_upload.offset_address = 0x08007000
  373. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  374. extra_scripts = ${common.extra_scripts}
  375. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  376. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  377. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  378. #
  379. # MKS Robin Nano V1.2 and V2 using hal STM32
  380. #
  381. [env:mks_robin_nano35_stm32]
  382. platform = ${common_stm32.platform}
  383. extends = common_stm32
  384. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  385. board = genericSTM32F103VE
  386. board_build.core = stm32
  387. board_build.variant = MARLIN_F103Vx
  388. board_build.ldscript = ldscript.ld
  389. board_build.offset = 0x7000
  390. board_build.encrypt = Yes
  391. board_build.firmware = Robin_nano35.bin
  392. board_upload.offset_address = 0x08007000
  393. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  394. debug_tool = jlink
  395. upload_protocol = jlink
  396. extra_scripts = ${common.extra_scripts}
  397. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  398. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  399. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  400. #
  401. # Mingda MPX_ARM_MINI
  402. #
  403. [env:mingda_mpx_arm_mini]
  404. platform = ${common_stm32.platform}
  405. extends = common_stm32
  406. board = genericSTM32F103ZE
  407. board_build.core = stm32
  408. board_build.variant = MARLIN_F103Zx
  409. board_build.ldscript = ldscript.ld
  410. board_build.offset = 0x10000
  411. build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  412. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  413. extra_scripts = ${common.extra_scripts}
  414. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  415. buildroot/share/PlatformIO/scripts/stm32_bootloader.py