stm32f1-maple.ini 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  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
  28. build_unflags = -std=gnu11 -std=gnu++11
  29. build_src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
  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 = ${STM32F1_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 = ${STM32F1_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 = ${STM32F1_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 = ${STM32F1_maple.extra_scripts}
  82. buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
  83. build_flags = ${STM32F1_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 (USB mass storage)
  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 = ${STM32F1_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 (STM32F103RET6)
  106. #
  107. [env:STM32F103RE_creality_maple]
  108. extends = env:STM32F103RE_maple
  109. build_flags = ${STM32F1_maple.build_flags} -DTEMP_TIMER_CHAN=4
  110. board_build.address = 0x08007000
  111. board_build.ldscript = creality.ld
  112. extra_scripts = ${STM32F1_maple.extra_scripts}
  113. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  114. debug_tool = jlink
  115. upload_protocol = jlink
  116. #
  117. # Creality (STM32F103RCT6)
  118. #
  119. [env:STM32F103RC_creality_maple]
  120. extends = env:STM32F103RC_maple
  121. build_flags = ${STM32F1_maple.build_flags} -DTEMP_TIMER_CHAN=4
  122. board_build.address = 0x08007000
  123. board_build.ldscript = creality.ld
  124. extra_scripts = ${STM32F1_maple.extra_scripts}
  125. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  126. debug_tool = jlink
  127. upload_protocol = jlink
  128. #
  129. # Creality (STM32F103RET6)
  130. #
  131. [env:STM32F103RE_creality_smartPro_maple]
  132. extends = env:STM32F103RE_creality_maple
  133. board_build.address = 0x08010000
  134. board_build.ldscript = crealityPro.ld
  135. #
  136. # BigTreeTech SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
  137. #
  138. # STM32F103RE_btt_maple ............. RET6
  139. # STM32F103RE_btt_USB_maple ......... RET6 (USB mass storage)
  140. #
  141. [env:STM32F103RE_btt_maple]
  142. extends = env:STM32F103RE_maple
  143. board_build.address = 0x08007000
  144. board_build.ldscript = STM32F103RE_SKR_MINI_512K.ld
  145. build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  146. debug_tool = stlink
  147. upload_protocol = stlink
  148. [env:STM32F103RE_btt_USB_maple]
  149. extends = env:STM32F103RE_btt_maple
  150. build_flags = ${env:STM32F103RE_btt_maple.build_flags} -DUSE_USB_COMPOSITE
  151. lib_deps = ${STM32F1_maple.lib_deps}
  152. USBComposite for STM32F1@0.91
  153. #
  154. # Geeetech GTM32 (STM32F103VET6)
  155. #
  156. [env:STM32F103VE_GTM32_maple]
  157. extends = STM32F1_maple
  158. board = genericSTM32F103VE
  159. build_flags = ${STM32F1_maple.build_flags}
  160. -ffunction-sections -fdata-sections -nostdlib -MMD
  161. -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v
  162. -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000
  163. -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  164. upload_protocol = serial
  165. #
  166. # Longer 3D board in Alfawise U20 (STM32F103VET6)
  167. #
  168. [env:STM32F103VE_longer_maple]
  169. extends = STM32F1_maple
  170. board = genericSTM32F103VE
  171. board_build.address = 0x08010000
  172. board_build.rename = project.bin
  173. board_build.ldscript = STM32F103VE_longer.ld
  174. build_flags = ${STM32F1_maple.build_flags}
  175. -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
  176. build_unflags = ${STM32F1_maple.build_unflags}
  177. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  178. #
  179. # MKS Robin Mini (STM32F103VET6)
  180. #
  181. [env:mks_robin_mini_maple]
  182. extends = STM32F1_maple
  183. board = genericSTM32F103VE
  184. board_build.address = 0x08007000
  185. board_build.rename = Robin_mini.bin
  186. board_build.ldscript = mks_robin_mini.ld
  187. build_flags = ${STM32F1_maple.build_flags} -DMCU_STM32F103VE
  188. #
  189. # MKS Robin Nano (STM32F103VET6)
  190. #
  191. [env:mks_robin_nano35_maple]
  192. extends = STM32F1_maple
  193. board = genericSTM32F103VE
  194. board_build.address = 0x08007000
  195. board_build.rename = Robin_nano35.bin
  196. board_build.ldscript = mks_robin_nano.ld
  197. build_flags = ${STM32F1_maple.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4
  198. debug_tool = jlink
  199. upload_protocol = jlink
  200. #
  201. # MKS Robin (STM32F103ZET6)
  202. #
  203. [env:mks_robin_maple]
  204. extends = STM32F1_maple
  205. board = genericSTM32F103ZE
  206. board_build.address = 0x08007000
  207. board_build.rename = Robin.bin
  208. board_build.ldscript = mks_robin.ld
  209. build_flags = ${STM32F1_maple.build_flags} -DSS_TIMER=4 -DSTM32_XL_DENSITY
  210. #
  211. # MKS Robin Pro (STM32F103ZET6)
  212. #
  213. [env:mks_robin_pro_maple]
  214. extends = env:mks_robin_maple
  215. board_build.address = 0x08007000
  216. board_build.rename = Robin_pro.bin
  217. board_build.ldscript = mks_robin_pro.ld
  218. #
  219. # TRIGORILLA PRO (STM32F103ZET6)
  220. #
  221. [env:trigorilla_pro_maple]
  222. extends = env:mks_robin_maple
  223. extra_scripts = ${STM32F1_maple.extra_scripts}
  224. #
  225. # MKS Robin E3D (STM32F103RCT6) and
  226. # MKS Robin E3 with TMC2209
  227. #
  228. [env:mks_robin_e3_maple]
  229. extends = STM32F1_maple
  230. board = genericSTM32F103RC
  231. board_build.address = 0x08005000
  232. board_build.rename = Robin_e3.bin
  233. board_build.ldscript = mks_robin_e3.ld
  234. build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  235. #
  236. # MKS Robin E3p (STM32F103VET6)
  237. # - LVGL UI
  238. #
  239. [env:mks_robin_e3p_maple]
  240. extends = STM32F1_maple
  241. board = genericSTM32F103VE
  242. board_build.address = 0x08007000
  243. board_build.rename = Robin_e3p.bin
  244. board_build.ldscript = mks_robin_e3p.ld
  245. build_flags = ${STM32F1_maple.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4
  246. debug_tool = jlink
  247. upload_protocol = jlink
  248. #
  249. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  250. #
  251. [env:mks_robin_lite_maple]
  252. extends = STM32F1_maple
  253. board = genericSTM32F103RC
  254. board_build.address = 0x08005000
  255. board_build.rename = mksLite.bin
  256. board_build.ldscript = mks_robin_lite.ld
  257. #
  258. # MKS ROBIN LITE3 (STM32F103RCT6)
  259. #
  260. [env:mks_robin_lite3_maple]
  261. extends = STM32F1_maple
  262. board = genericSTM32F103RC
  263. board_build.address = 0x08005000
  264. board_build.rename = mksLite3.bin
  265. board_build.ldscript = mks_robin_lite.ld
  266. #
  267. # JGAurora A5S A1 (STM32F103ZET6)
  268. #
  269. [env:jgaurora_a5s_a1_maple]
  270. extends = STM32F1_maple
  271. board = genericSTM32F103ZE
  272. board_build.address = 0x0800A000
  273. board_build.ldscript = jgaurora_a5s_a1.ld
  274. extra_scripts = ${STM32F1_maple.extra_scripts}
  275. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  276. build_flags = ${STM32F1_maple.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY
  277. #
  278. # Malyan M200 (STM32F103CB)
  279. #
  280. [env:STM32F103CB_malyan_maple]
  281. extends = STM32F1_maple
  282. board = marlin_malyanM200
  283. build_flags = ${STM32F1_maple.build_flags}
  284. -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
  285. -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
  286. lib_ignore = ${STM32F1_maple.lib_ignore}
  287. SoftwareSerialM
  288. #
  289. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  290. #
  291. [env:chitu_f103_maple]
  292. extends = STM32F1_maple
  293. board = marlin_maple_CHITU_F103
  294. extra_scripts = ${STM32F1_maple.extra_scripts}
  295. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  296. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  297. build_flags = ${STM32F1_maple.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY
  298. build_unflags = ${STM32F1_maple.build_unflags}
  299. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  300. #
  301. # Some Chitu V5 boards have a problem with GPIO init.
  302. # Use this target if G28 or G29 are always failing.
  303. #
  304. [env:chitu_v5_gpio_init_maple]
  305. extends = env:chitu_f103_maple
  306. build_flags = ${env:chitu_f103_maple.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  307. #
  308. # FLYmaker FLY Mini (STM32F103RCT6)
  309. #
  310. [env:FLY_MINI_maple]
  311. extends = STM32F1_maple
  312. board = genericSTM32F103RC
  313. board_build.address = 0x08005000
  314. board_build.ldscript = fly_mini.ld
  315. build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  316. #
  317. # Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0
  318. #
  319. # STM32F103RC_ZM3E2_USB_maple ........... RCT6 with 256K
  320. # STM32F103VC_ZM3E4_USB_maple ........... VCT6 with 256K
  321. # STM32F103VE_ZM3E4V2_USB_maple ......... VET6 with 512K
  322. #
  323. [ZONESTAR_ZM3E_maple]
  324. extends = STM32F1_maple
  325. platform_packages = tool-stm32duino
  326. board_build.address = 0x08005000
  327. board_build.offset = 0x5000
  328. board_upload.maximum_size = 237568
  329. build_flags = ${STM32F1_maple.build_flags}
  330. -D__STM32F1__=1 -DDEBUG_LEVEL=0 -DSS_TIMER=4 -DSERIAL_USB
  331. lib_deps = ${STM32F1_maple.lib_deps}
  332. USBComposite for STM32F1@0.91
  333. lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster, TMCStepper
  334. [env:STM32F103RC_ZM3E2_USB_maple]
  335. extends = ZONESTAR_ZM3E_maple
  336. board = genericSTM32F103RC
  337. board_build.ldscript = ZONESTAR_ZM3E_256K.ld
  338. [env:STM32F103VC_ZM3E4_USB_maple]
  339. extends = ZONESTAR_ZM3E_maple
  340. board = genericSTM32F103VC
  341. board_build.ldscript = ZONESTAR_ZM3E_256K.ld
  342. build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2
  343. [env:STM32F103VE_ZM3E4V2_USB_maple]
  344. extends = ZONESTAR_ZM3E_maple
  345. board = genericSTM32F103VE
  346. board_build.ldscript = ZONESTAR_ZM3E_512K.ld
  347. build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2
  348. board_upload.maximum_size = 499712
  349. #
  350. # ERYONE ERY32 Mini (STM32F103VET6)
  351. #
  352. [env:ERYONE_ERY32_MINI_maple]
  353. extends = STM32F1_maple
  354. board = genericSTM32F103VE
  355. build_flags = ${STM32F1_maple.build_flags}
  356. -ffunction-sections -fdata-sections -nostdlib -MMD
  357. -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1
  358. -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
  359. -DSS_TIMER=4
  360. board_build.variant = MARLIN_F103Vx
  361. board_build.ldscript = eryone_ery32_mini.ld
  362. board_build.address = 0x08004000
  363. build_unflags = ${STM32F1_maple.build_unflags}