stm32f1-maple.ini 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. #
  2. # Marlin Firmware
  3. # PlatformIO Configuration File
  4. #
  5. #################################
  6. #
  7. # STM32F1 Architecture with LibMaple STM32F1 HAL
  8. #
  9. # Naming Example: STM32F103RCT6
  10. #
  11. # F : Foundation (sometimes High Performance F2/F4)
  12. # 1 : Cortex M3 core (0:M0, 1-2:M3, 3-4:M4, 7:M7)
  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/STM32F1 Common Environment values
  22. #
  23. [STM32F1_maple]
  24. platform = ststm32@~15.4.1
  25. board_build.core = maple
  26. build_flags = !python buildroot/share/PlatformIO/scripts/STM32F1_build_flags.py
  27. ${common.build_flags} -DARDUINO_ARCH_STM32 -DMAPLE_STM32F1 -DPLATFORM_M997_SUPPORT
  28. build_unflags = -std=gnu11 -std=gnu++11
  29. build_src_filter = ${common.default_src_filter} +<src/HAL/STM32F1> -<src/HAL/STM32F1/tft>
  30. lib_ignore = SPI, FreeRTOS701, FreeRTOS821
  31. lib_deps = ${common.lib_deps}
  32. SoftwareSerialM
  33. platform_packages = tool-stm32duino
  34. toolchain-gccarmnoneeabi@1.100301.220327
  35. extra_scripts = ${common.extra_scripts}
  36. pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
  37. pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py
  38. buildroot/share/PlatformIO/scripts/custom_board.py
  39. buildroot/share/PlatformIO/scripts/offset_and_rename.py
  40. custom_marlin.HAS_SPI_TFT = build_src_filter=+<src/HAL/STM32F1/tft/tft_spi.cpp>
  41. custom_marlin.HAS_TFT_XPT2046 = build_src_filter=+<src/HAL/STM32F1/tft/xpt2046.cpp>
  42. custom_marlin.HAS_FSMC_TFT = build_src_filter=+<src/HAL/STM32F1/tft/tft_fsmc.cpp>
  43. #
  44. # Generic STM32F103RC environment
  45. #
  46. [env:STM32F103RC_maple]
  47. extends = STM32F1_maple
  48. board = genericSTM32F103RC
  49. monitor_speed = 115200
  50. #
  51. # Generic STM32F103RE environment
  52. #
  53. [env:STM32F103RE_maple]
  54. extends = STM32F1_maple
  55. board = genericSTM32F103RE
  56. monitor_speed = 115200
  57. #
  58. # MEEB_3DP (STM32F103RCT6 with 512K)
  59. #
  60. [env:STM32F103RC_meeb_maple]
  61. extends = env:STM32F103RC_maple
  62. board = marlin_maple_MEEB_3DP
  63. platform_packages = platformio/tool-dfuutil@~1.11.0
  64. build_flags = ${env:STM32F103RC_maple.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. -DNO_MAPLE_WARNING
  73. board_build.ldscript = STM32F103RC_MEEB_3DP.ld
  74. extra_scripts = ${env:STM32F103RC_maple.extra_scripts}
  75. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  76. buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
  77. lib_deps = ${env:STM32F103RC_maple.lib_deps}
  78. USBComposite for STM32F1@0.91
  79. custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use
  80. debug_tool = stlink
  81. upload_protocol = dfu
  82. #
  83. # FYSETC STM32F103RC
  84. #
  85. [env:STM32F103RC_fysetc_maple]
  86. extends = env:STM32F103RC_maple
  87. extra_scripts = ${env:STM32F103RC_maple.extra_scripts}
  88. buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
  89. build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0
  90. platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
  91. lib_ldf_mode = chain
  92. debug_tool = stlink
  93. upload_protocol = serial
  94. #
  95. # BigTreeTech SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3)
  96. #
  97. # STM32F103RC_btt_maple ............. RCT6 with 256K
  98. # STM32F103RC_btt_USB_maple ......... RCT6 with 256K with USB Media Share Support
  99. #
  100. [env:STM32F103RC_btt_maple]
  101. extends = env:STM32F103RC_maple
  102. board_build.address = 0x08007000
  103. board_build.ldscript = STM32F103RC_SKR_MINI_256K.ld
  104. build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  105. platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
  106. monitor_speed = 115200
  107. [env:STM32F103RC_btt_USB_maple]
  108. extends = env:STM32F103RC_btt_maple
  109. build_flags = ${env:STM32F103RC_btt_maple.build_flags} -DUSE_USB_COMPOSITE
  110. lib_deps = ${env:STM32F103RC_btt_maple.lib_deps}
  111. USBComposite for STM32F1@0.91
  112. #
  113. # Creality 512K (STM32F103RET6)
  114. #
  115. [env:STM32F103RE_creality_maple]
  116. extends = env:STM32F103RE_maple
  117. build_flags = ${env:STM32F103RE_maple.build_flags} -DTEMP_TIMER_CHAN=4
  118. board_build.address = 0x08007000
  119. board_build.ldscript = creality.ld
  120. board_build.rename = firmware-{date}-{time}.bin
  121. debug_tool = jlink
  122. upload_protocol = jlink
  123. #
  124. # Creality 256K (STM32F103RCT6)
  125. #
  126. [env:STM32F103RC_creality_maple]
  127. extends = env:STM32F103RC_maple
  128. build_flags = ${env:STM32F103RC_maple.build_flags} -DTEMP_TIMER_CHAN=4
  129. platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
  130. board_build.address = 0x08007000
  131. board_build.ldscript = creality256k.ld
  132. board_build.rename = firmware-{date}-{time}.bin
  133. debug_tool = jlink
  134. upload_protocol = jlink
  135. #
  136. # Creality 512K (STM32F103RE) for new 64KiB bootloader (CR-10 Smart Pro printer)
  137. #
  138. [env:STM32F103RE_creality_smartPro_maple]
  139. extends = env:STM32F103RE_creality_maple
  140. board_build.address = 0x08010000
  141. board_build.ldscript = crealityPro.ld
  142. #
  143. # Voxelab Aquila V1.0.1
  144. #
  145. # GD32F103RC_voxelab_maple ........ GD32F103RCT6 with 256K
  146. # N32G455RE_voxelab_maple ......... N32G455REL7 - Requires ICSP to flash over 256K
  147. #
  148. [env:GD32F103RC_voxelab_maple]
  149. extends = env:STM32F103RC_maple
  150. build_flags = ${env:STM32F103RC_maple.build_flags} -DTEMP_TIMER_CHAN=4
  151. platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
  152. board_build.address = 0x08007000
  153. board_build.ldscript = creality256k.ld
  154. debug_tool = jlink
  155. upload_protocol = jlink
  156. [env:N32G455RE_voxelab_maple]
  157. extends = env:STM32F103RE_maple
  158. build_flags = ${env:STM32F103RE_maple.build_flags} -DTEMP_TIMER_CHAN=4
  159. -DVOXELAB_N32 -DSDCARD_FLASH_LIMIT_256K
  160. platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
  161. board_build.address = 0x08007000
  162. board_build.ldscript = creality.ld
  163. debug_tool = jlink
  164. upload_protocol = jlink
  165. #
  166. # BigTreeTech SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
  167. #
  168. # STM32F103RE_btt_maple ............. RET6
  169. # STM32F103RE_btt_USB_maple ......... RET6 with USB Media Share Support
  170. #
  171. [env:STM32F103RE_btt_maple]
  172. extends = env:STM32F103RE_maple
  173. board_build.address = 0x08007000
  174. board_build.ldscript = STM32F103RE_SKR_MINI_512K.ld
  175. build_flags = ${env:STM32F103RE_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  176. debug_tool = stlink
  177. upload_protocol = stlink
  178. [env:STM32F103RE_btt_USB_maple]
  179. extends = env:STM32F103RE_btt_maple
  180. build_flags = ${env:STM32F103RE_btt_maple.build_flags} -DUSE_USB_COMPOSITE
  181. lib_deps = ${env:STM32F103RE_btt_maple.lib_deps}
  182. USBComposite for STM32F1@0.91
  183. #
  184. # Geeetech GTM32 (STM32F103VET6)
  185. #
  186. [env:STM32F103VE_GTM32_maple]
  187. extends = STM32F1_maple
  188. board = genericSTM32F103VE
  189. build_flags = ${STM32F1_maple.build_flags}
  190. -ffunction-sections -fdata-sections -nostdlib -MMD
  191. -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v
  192. -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000
  193. -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  194. upload_protocol = serial
  195. #
  196. # Longer 3D board in Alfawise U20 (STM32F103VET6)
  197. #
  198. [env:STM32F103VE_longer_maple]
  199. extends = STM32F1_maple
  200. board = genericSTM32F103VE
  201. board_build.address = 0x08010000
  202. board_build.rename = project.bin
  203. board_build.ldscript = STM32F103VE_longer.ld
  204. build_flags = ${STM32F1_maple.build_flags}
  205. -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
  206. build_unflags = ${STM32F1_maple.build_unflags}
  207. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  208. #
  209. # MKS Robin Mini (STM32F103VET6)
  210. #
  211. [env:mks_robin_mini_maple]
  212. extends = STM32F1_maple
  213. board = genericSTM32F103VE
  214. board_build.address = 0x08007000
  215. board_build.encrypt_mks = Robin_mini.bin
  216. board_build.ldscript = mks_robin_mini.ld
  217. build_flags = ${STM32F1_maple.build_flags} -DMCU_STM32F103VE
  218. #
  219. # MKS Robin Nano v1.x and v2 (STM32F103VET6)
  220. #
  221. [env:mks_robin_nano_v1v2_maple]
  222. extends = STM32F1_maple
  223. board = genericSTM32F103VE
  224. board_build.address = 0x08007000
  225. board_build.encrypt_mks = Robin_nano35.bin
  226. board_build.ldscript = mks_robin_nano.ld
  227. build_flags = ${STM32F1_maple.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4
  228. #
  229. # MKS Robin (STM32F103ZET6)
  230. #
  231. [env:mks_robin_maple]
  232. extends = STM32F1_maple
  233. board = genericSTM32F103ZE
  234. board_build.address = 0x08007000
  235. board_build.encrypt_mks = Robin.bin
  236. board_build.ldscript = mks_robin.ld
  237. build_flags = ${STM32F1_maple.build_flags} -DSS_TIMER=4 -DSTM32_XL_DENSITY
  238. #
  239. # MKS Robin Pro (STM32F103ZET6)
  240. #
  241. [env:mks_robin_pro_maple]
  242. extends = env:mks_robin_maple
  243. board_build.address = 0x08007000
  244. board_build.encrypt_mks = Robin_pro.bin
  245. board_build.ldscript = mks_robin_pro.ld
  246. #
  247. # TRIGORILLA PRO (STM32F103ZET6)
  248. #
  249. [env:trigorilla_pro_maple]
  250. extends = env:mks_robin_maple
  251. #
  252. # MKS Robin E3D (STM32F103RCT6) and
  253. # MKS Robin E3 with TMC2209
  254. #
  255. [env:mks_robin_e3_maple]
  256. extends = STM32F1_maple
  257. board = genericSTM32F103RC
  258. board_build.address = 0x08005000
  259. board_build.encrypt_mks = Robin_e3.bin
  260. board_build.ldscript = mks_robin_e3.ld
  261. build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  262. #
  263. # MKS Robin E3p (STM32F103VET6)
  264. # - LVGL UI
  265. #
  266. [env:mks_robin_e3p_maple]
  267. extends = STM32F1_maple
  268. board = genericSTM32F103VE
  269. board_build.address = 0x08007000
  270. board_build.encrypt_mks = Robin_e3p.bin
  271. board_build.ldscript = mks_robin_e3p.ld
  272. build_flags = ${STM32F1_maple.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4
  273. debug_tool = jlink
  274. upload_protocol = jlink
  275. #
  276. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  277. #
  278. [env:mks_robin_lite_maple]
  279. extends = STM32F1_maple
  280. board = genericSTM32F103RC
  281. board_build.address = 0x08005000
  282. board_build.encrypt_mks = mksLite.bin
  283. board_build.ldscript = mks_robin_lite.ld
  284. #
  285. # MKS ROBIN LITE3 (STM32F103RCT6)
  286. #
  287. [env:mks_robin_lite3_maple]
  288. extends = STM32F1_maple
  289. board = genericSTM32F103RC
  290. board_build.address = 0x08005000
  291. board_build.encrypt_mks = mksLite3.bin
  292. board_build.ldscript = mks_robin_lite.ld
  293. #
  294. # JGAurora A5S A1 (STM32F103ZET6)
  295. #
  296. [env:jgaurora_a5s_a1_maple]
  297. extends = STM32F1_maple
  298. board = genericSTM32F103ZE
  299. board_build.address = 0x0800A000
  300. board_build.ldscript = jgaurora_a5s_a1.ld
  301. extra_scripts = ${STM32F1_maple.extra_scripts}
  302. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  303. build_flags = ${STM32F1_maple.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY
  304. #
  305. # Malyan M200 (STM32F103CB)
  306. #
  307. [env:STM32F103CB_malyan_maple]
  308. extends = STM32F1_maple
  309. board = marlin_malyanM200
  310. build_flags = ${STM32F1_maple.build_flags}
  311. -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
  312. -Wl,--gc-sections -DDEBUG_LEVEL=0
  313. lib_ignore = ${STM32F1_maple.lib_ignore}
  314. SoftwareSerialM
  315. #
  316. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  317. #
  318. [env:chitu_f103_maple]
  319. extends = STM32F1_maple
  320. board = marlin_maple_CHITU_F103
  321. extra_scripts = ${STM32F1_maple.extra_scripts}
  322. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  323. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  324. build_flags = ${STM32F1_maple.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY
  325. build_unflags = ${STM32F1_maple.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_maple]
  332. extends = env:chitu_f103_maple
  333. build_flags = ${env:chitu_f103_maple.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  334. #
  335. # FLYmaker FLY Mini (STM32F103RCT6)
  336. #
  337. [env:FLY_MINI_maple]
  338. extends = STM32F1_maple
  339. board = genericSTM32F103RC
  340. board_build.address = 0x08005000
  341. board_build.ldscript = fly_mini.ld
  342. build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  343. #
  344. # Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0
  345. #
  346. # STM32F103RC_ZM3E2_USB_maple ........... RCT6 with 256K
  347. # STM32F103VC_ZM3E4_USB_maple ........... VCT6 with 256K
  348. # STM32F103VE_ZM3E4V2_USB_maple ......... VET6 with 512K
  349. #
  350. [ZONESTAR_ZM3E_maple]
  351. extends = STM32F1_maple
  352. platform_packages = tool-stm32duino
  353. board_build.address = 0x08005000
  354. board_upload.maximum_size = 237568
  355. build_flags = ${STM32F1_maple.build_flags}
  356. -D__STM32F1__=1 -DDEBUG_LEVEL=0 -DSS_TIMER=4 -DSERIAL_USB
  357. lib_deps = ${STM32F1_maple.lib_deps}
  358. USBComposite for STM32F1@0.91
  359. lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster, TMCStepper
  360. [env:STM32F103RC_ZM3E2_USB_maple]
  361. extends = ZONESTAR_ZM3E_maple
  362. platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
  363. board = genericSTM32F103RC
  364. board_build.ldscript = ZONESTAR_ZM3E_256K.ld
  365. [env:STM32F103VC_ZM3E4_USB_maple]
  366. extends = ZONESTAR_ZM3E_maple
  367. platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
  368. board = genericSTM32F103VC
  369. board_build.ldscript = ZONESTAR_ZM3E_256K.ld
  370. build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2
  371. [env:STM32F103VE_ZM3E4V2_USB_maple]
  372. extends = ZONESTAR_ZM3E_maple
  373. board = genericSTM32F103VE
  374. board_build.ldscript = ZONESTAR_ZM3E_512K.ld
  375. build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2
  376. board_upload.maximum_size = 499712
  377. #
  378. # ERYONE ERY32 Mini (STM32F103VET6)
  379. #
  380. [env:ERYONE_ERY32_MINI_maple]
  381. extends = STM32F1_maple
  382. board = genericSTM32F103VE
  383. build_flags = ${STM32F1_maple.build_flags}
  384. -ffunction-sections -fdata-sections -nostdlib -MMD
  385. -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1
  386. -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
  387. -DSS_TIMER=4
  388. -DNO_MAPLE_WARNING
  389. board_build.variant = MARLIN_F103Vx
  390. board_build.ldscript = eryone_ery32_mini.ld
  391. board_build.address = 0x08004000
  392. build_unflags = ${STM32F1_maple.build_unflags}
  393. #
  394. # Sovol (GD32F103RET6)
  395. #
  396. [env:GD32F103RET6_sovol_maple]
  397. extends = env:STM32F103RE_maple
  398. build_flags = ${STM32F1_maple.build_flags} -DTEMP_TIMER_CHAN=4 -DNO_MAPLE_WARNING
  399. board_build.address = 0x08007000
  400. board_build.ldscript = sovol.ld
  401. board_build.rename = firmware-{date}-{time}.bin
  402. debug_tool = jlink
  403. upload_protocol = jlink
  404. #
  405. # Mingda D2 DZ301 V1.0 (STM32F103ZE)
  406. #
  407. [env:mingda_d301_maple]
  408. extends = STM32F1_maple
  409. board = genericSTM32F103ZE
  410. board_build.address = 0x08007000
  411. board_upload.maximum_size = 524288
  412. board_build.ldscript = md301.ld
  413. board_build.variant = MARLIN_F103Zx
  414. build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 -std=gnu++14
  415. -DSTM32_FLASH_SIZE=512 -DHAVE_SW_SERIAL -DSS_TIMER=4
  416. -DUSART_RX_BUF_SIZE=256 -DUSART_TX_BUF_SIZE=256 -DUSE_USB_COMPOSITE
  417. -DTONE_TIMER=3 -DTONE_CHANNEL=3
  418. -DSTM32F1xx -DSTM32_XL_DENSITY