stm32f1-maple.ini 14 KB

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