My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

stm32f1.ini 14KB

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