stm32f1-maple.ini 16 KB

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