stm32f1.ini 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. #
  2. # Marlin Firmware
  3. # PlatformIO Configuration File
  4. #
  5. #################################
  6. #
  7. # STM32F1 Architecture with unified STM32 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 (T:36, C:48, V:100, Z:144, I:176)
  15. # C : 256KB Flash-memory (B: 128KB, D:384KB, E:512KB, G:1024KB)
  16. # T : LQFP package
  17. # 6 : -40...85°C (7: ...105°C)
  18. #
  19. #################################
  20. [common_STM32F103RC_variant]
  21. extends = stm32_variant
  22. board = genericSTM32F103RC
  23. board_build.variant = MARLIN_F103Rx
  24. build_flags = ${stm32_variant.build_flags} -DDEBUG_LEVEL=0
  25. monitor_speed = 115200
  26. #
  27. # STM32F103RE
  28. #
  29. [env:STM32F103RE]
  30. extends = common_stm32
  31. board = genericSTM32F103RE
  32. monitor_speed = 115200
  33. #
  34. # STM32F103VE
  35. #
  36. [env:STM32F103VE]
  37. extends = common_stm32
  38. board = genericSTM32F103VE
  39. monitor_speed = 115200
  40. #
  41. # STM32F103ZE
  42. #
  43. [env:STM32F103ZE]
  44. extends = common_stm32
  45. board = genericSTM32F103ZE
  46. monitor_speed = 115200
  47. #
  48. # BigTreeTech SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3)
  49. #
  50. # STM32F103RC_btt ............. RCT6 with 256K
  51. # STM32F103RC_btt_USB ......... RCT6 with 256K with USB Media Share Support
  52. #
  53. [env:STM32F103RC_btt]
  54. extends = common_STM32F103RC_variant
  55. build_flags = ${common_STM32F103RC_variant.build_flags}
  56. -DTIMER_SERVO=TIM5
  57. board_build.offset = 0x7000
  58. board_upload.offset_address = 0x08007000
  59. [env:STM32F103RC_btt_USB]
  60. extends = env:STM32F103RC_btt
  61. platform_packages = ${stm_flash_drive.platform_packages}
  62. build_flags = ${env:STM32F103RC_btt.build_flags}
  63. -DUSE_USB_FS
  64. -DUSBD_IRQ_PRIO=5
  65. -DUSBD_IRQ_SUBPRIO=6
  66. -DUSBD_USE_CDC_MSC
  67. build_unflags = ${env:STM32F103RC_btt.build_unflags} -DUSBD_USE_CDC
  68. #
  69. # Panda Pi V2.9 - Standalone (STM32F103RC)
  70. # Headless, without direct Pi control, but potentially hosting OctoPrint, stepdaemon, etc.
  71. #
  72. [env:PANDA_PI_V29]
  73. extends = common_STM32F103RC_variant
  74. build_flags = ${common_STM32F103RC_variant.build_flags}
  75. -DTIMER_SERVO=TIM1
  76. board_build.offset = 0x5000
  77. board_upload.offset_address = 0x08005000
  78. lib_deps = markyue/Panda_SoftMasterI2C@1.0.3
  79. #
  80. # MKS Robin (STM32F103ZET6)
  81. # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
  82. #
  83. [env:mks_robin]
  84. extends = stm32_variant
  85. board = genericSTM32F103ZE
  86. board_build.variant = MARLIN_F103Zx
  87. board_build.encrypt_mks = Robin.bin
  88. board_build.offset = 0x7000
  89. board_build.offset_address = 0x08007000
  90. build_flags = ${stm32_variant.build_flags}
  91. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  92. build_unflags = ${stm32_variant.build_unflags}
  93. -DUSBCON -DUSBD_USE_CDC
  94. #
  95. # MKS Robin E3/E3D (STM32F103RCT6) with TMC2209
  96. #
  97. [env:mks_robin_e3]
  98. extends = common_STM32F103RC_variant
  99. board_build.encrypt_mks = Robin_e3.bin
  100. board_build.offset = 0x5000
  101. board_upload.offset_address = 0x08005000
  102. build_flags = ${common_STM32F103RC_variant.build_flags}
  103. -DTIMER_SERVO=TIM5 -DDEFAULT_SPI=3
  104. build_unflags = ${common_STM32F103RC_variant.build_unflags}
  105. -DUSBCON -DUSBD_USE_CDC
  106. debug_tool = stlink
  107. #
  108. # Creality (STM32F103Rx)
  109. #
  110. [STM32F103Rx_creality]
  111. extends = stm32_variant
  112. board_build.variant = MARLIN_F103Rx
  113. board_build.offset = 0x7000
  114. board_build.rename = firmware-{date}-{time}.bin
  115. board_upload.offset_address = 0x08007000
  116. build_flags = ${stm32_variant.build_flags}
  117. -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED
  118. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  119. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  120. build_unflags = ${stm32_variant.build_unflags}
  121. -DUSBCON -DUSBD_USE_CDC
  122. monitor_speed = 115200
  123. debug_tool = jlink
  124. upload_protocol = jlink
  125. #
  126. # Creality (STM32F103Rx)
  127. # With custom upload to SD via Marlin with binary protocol.
  128. # Requires Marlin with BINARY_FILE_TRANSFER already installed on the target board.
  129. # If CUSTOM_FIRMWARE_UPLOAD is also installed, Marlin will reboot the board to install the firmware.
  130. # Currently CUSTOM_FIRMWARE_UPLOAD must also be enabled to use 'xfer' build envs.
  131. #
  132. [STM32F103Rx_creality_xfer]
  133. extends = STM32F103Rx_creality
  134. build_flags = ${STM32F103Rx_creality.build_flags} -DXFER_BUILD
  135. extra_scripts = ${STM32F103Rx_creality.extra_scripts}
  136. pre:buildroot/share/scripts/upload.py
  137. upload_protocol = custom
  138. #
  139. # Creality 512K (STM32F103RE)
  140. #
  141. [env:STM32F103RE_creality]
  142. extends = STM32F103Rx_creality
  143. board = genericSTM32F103RE
  144. #
  145. # Creality 512K (STM32F103RE) with custom binary upload to SD (see above).
  146. #
  147. [env:STM32F103RE_creality_xfer]
  148. extends = STM32F103Rx_creality_xfer
  149. board = genericSTM32F103RE
  150. #
  151. # Creality 512K (STM32F103RE) for new 64KiB bootloader (CR-10 Smart Pro printer)
  152. #
  153. [env:STM32F103RE_creality_smartPro]
  154. extends = env:STM32F103RE_creality
  155. board_build.offset = 0x10000
  156. board_upload.offset_address = 0x08010000
  157. #
  158. # Trigorilla V0.0.6 (GD32F103)
  159. # modified version of env:STM32F103RE_creality
  160. #
  161. [env:trigorilla_v006]
  162. extends = env:STM32F103RE_creality
  163. board_build.offset = 0x8000
  164. board_upload.offset_address = 0x08008000
  165. board_build.rename = main_board_{date}_{time}.bin
  166. #
  167. # Creality 256K (STM32F103RC)
  168. #
  169. [env:STM32F103RC_creality]
  170. extends = STM32F103Rx_creality
  171. board = genericSTM32F103RC
  172. #
  173. # Creality 256K (STM32F103RC) with custom binary upload to SD (see above).
  174. #
  175. [env:STM32F103RC_creality_xfer]
  176. extends = STM32F103Rx_creality_xfer
  177. board = genericSTM32F103RC
  178. #
  179. # Creality 512K (STM32F103VE)
  180. #
  181. [env:STM32F103VE_creality]
  182. extends = STM32F103Rx_creality
  183. board = genericSTM32F103VE
  184. board_build.variant = MARLIN_F103Vx
  185. build_flags = ${STM32F103Rx_creality.build_flags}
  186. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  187. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  188. #
  189. # BigTreeTech SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
  190. #
  191. # STM32F103RE_btt ............. RET6
  192. # STM32F103RE_btt_USB ......... RET6 with USB Media Share Support
  193. #
  194. [env:STM32F103RE_btt]
  195. extends = stm32_variant
  196. board = genericSTM32F103RE
  197. board_build.variant = MARLIN_F103Rx
  198. board_build.offset = 0x7000
  199. board_upload.offset_address = 0x08007000
  200. build_flags = ${stm32_variant.build_flags}
  201. -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED
  202. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  203. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  204. monitor_speed = 115200
  205. debug_tool = jlink
  206. upload_protocol = jlink
  207. [env:STM32F103RE_btt_USB]
  208. extends = env:STM32F103RE_btt
  209. platform_packages = ${stm_flash_drive.platform_packages}
  210. build_flags = ${env:STM32F103RE_btt.build_flags}
  211. -DUSE_USB_FS -DUSBD_IRQ_PRIO=5
  212. -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC
  213. build_unflags = ${env:STM32F103RE_btt.build_unflags} -DUSBD_USE_CDC
  214. #
  215. # Mingda MPX_ARM_MINI
  216. #
  217. [env:mingda_mpx_arm_mini]
  218. extends = stm32_variant
  219. board = genericSTM32F103ZE
  220. board_build.variant = MARLIN_F103Zx
  221. board_build.offset = 0x10000
  222. board_build.offset_address = 0x08010000
  223. build_flags = ${stm32_variant.build_flags}
  224. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  225. build_unflags = ${stm32_variant.build_unflags}
  226. -DUSBCON -DUSBD_USE_CDC
  227. #
  228. # Malyan M200 (STM32F103CB)
  229. #
  230. [env:STM32F103CB_malyan]
  231. extends = common_stm32
  232. board = malyanm200_f103cb
  233. build_flags = ${common_stm32.build_flags}
  234. -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB
  235. -DHAL_UART_MODULE_ENABLED
  236. build_src_filter = ${common_stm32.build_src_filter} +<src/HAL/STM32> -<src/HAL/STM32/tft>
  237. #
  238. # FLYmaker FLY Mini (STM32F103RCT6)
  239. #
  240. [env:FLY_MINI]
  241. extends = stm32_variant
  242. board = genericSTM32F103RC
  243. board_build.variant = MARLIN_F103Rx
  244. board_build.offset = 0x5000
  245. board_upload.offset_address = 0x08005000
  246. build_flags = ${stm32_variant.build_flags} -DSS_TIMER=4
  247. #
  248. # (STM32F103VE_robin)
  249. #
  250. [STM32F103VE_robin]
  251. extends = stm32_variant
  252. board = genericSTM32F103VE
  253. board_build.variant = MARLIN_F103Vx
  254. board_build.offset = 0x7000
  255. board_upload.offset_address = 0x08007000
  256. build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 -DSS_TIMER=4
  257. [mks_robin_nano_v1v2_common]
  258. extends = STM32F103VE_robin
  259. board_build.encrypt_mks = Robin_nano35.bin
  260. debug_tool = stlink
  261. upload_protocol = stlink
  262. #
  263. # MKS/ZNP Robin Nano V1.2 and V2 with native USB modification
  264. #
  265. [env:mks_robin_nano_v1v2_usbmod]
  266. extends = mks_robin_nano_v1v2_common
  267. #
  268. # MKS Robin Nano V1.2 and V2
  269. #
  270. [env:mks_robin_nano_v1v2]
  271. extends = mks_robin_nano_v1v2_common
  272. build_flags = ${mks_robin_nano_v1v2_common.build_flags} -DENABLE_HWSERIAL3
  273. build_unflags = ${mks_robin_nano_v1v2_common.build_unflags} -DUSBCON -DUSBD_USE_CDC
  274. #
  275. # MKS Robin Mini (STM32F103VET6)
  276. #
  277. [env:mks_robin_mini]
  278. extends = STM32F103VE_robin
  279. board_build.encrypt_mks = Robin_mini.bin
  280. build_unflags = ${STM32F103VE_robin.build_unflags} -DSS_TIMER=4 -DTIMER_SERVO=TIM2
  281. build_flags = ${STM32F103VE_robin.build_flags} -DTIMER_SERVO=TIM1
  282. #
  283. # MKS Robin E3p (STM32F103VET6)
  284. # - LVGL UI
  285. #
  286. [env:mks_robin_e3p]
  287. extends = STM32F103VE_robin
  288. board_build.encrypt_mks = Robin_e3p.bin
  289. debug_tool = jlink
  290. upload_protocol = jlink
  291. #
  292. # FLSUN QQS Pro (STM32F103VET6)
  293. # Hispeedv1 Robin mini variant
  294. #
  295. [env:flsun_hispeedv1]
  296. extends = STM32F103VE_robin
  297. board_build.encrypt_mks = Robin_mini.bin
  298. build_flags = ${STM32F103VE_robin.build_flags} -DENABLE_HWSERIAL3
  299. build_unflags = ${STM32F103VE_robin.build_unflags} -DUSBCON -DUSBD_USE_CDC
  300. #
  301. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  302. #
  303. [env:mks_robin_lite]
  304. extends = stm32_variant
  305. board = genericSTM32F103RC
  306. board_build.variant = MARLIN_F103Rx
  307. board_build.encrypt_mks = mksLite.bin
  308. board_build.offset = 0x5000
  309. board_upload.offset_address = 0x08005000
  310. #
  311. # MKS ROBIN LITE3 (STM32F103RCT6)
  312. #
  313. [env:mks_robin_lite3]
  314. extends = env:mks_robin_lite
  315. board_build.encrypt_mks = mksLite3.bin
  316. #
  317. # MKS Robin Pro (STM32F103ZET6)
  318. #
  319. [env:mks_robin_pro]
  320. extends = env:mks_robin
  321. board_build.encrypt_mks = Robin_pro.bin
  322. #
  323. # JGAurora A5S A1 (STM32F103ZET6)
  324. #
  325. [env:jgaurora_a5s_a1]
  326. extends = stm32_variant
  327. board = genericSTM32F103ZE
  328. board_build.variant = MARLIN_F103Zx
  329. board_build.offset = 0xA000
  330. board_upload.offset_address = 0x0800A000
  331. build_flags = ${stm32_variant.build_flags}
  332. -DSTM32F1xx -DSTM32_XL_DENSITY
  333. extra_scripts = ${stm32_variant.extra_scripts}
  334. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  335. #
  336. # FYSETC STM32F103RC
  337. #
  338. [env:STM32F103RC_fysetc]
  339. extends = common_STM32F103RC_variant
  340. extra_scripts = ${common_STM32F103RC_variant.extra_scripts}
  341. buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
  342. build_flags = ${common_STM32F103RC_variant.build_flags} -DTIMER_SERVO=TIM1
  343. lib_ldf_mode = chain
  344. debug_tool = stlink
  345. upload_protocol = serial
  346. #
  347. # Longer 3D board in Alfawise U20 (STM32F103VET6)
  348. #
  349. [env:STM32F103VE_longer]
  350. extends = stm32_variant
  351. lib_deps = ${common.lib_deps}
  352. https://github.com/tpruvot/STM32_Servo_OpenDrain/archive/2.0.zip
  353. board = genericSTM32F103VE
  354. board_build.variant = MARLIN_F103VE_LONGER
  355. board_build.rename = project.bin
  356. board_build.offset = 0x10000
  357. board_upload.offset_address = 0x08010000
  358. build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12
  359. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED
  360. extra_scripts = ${stm32_variant.extra_scripts}
  361. monitor_speed = 250000
  362. debug_tool = stlink
  363. #
  364. # TRIGORILLA PRO (STM32F103ZET6)
  365. #
  366. [env:trigorilla_pro]
  367. extends = stm32_variant
  368. board = genericSTM32F103ZE
  369. board_build.variant = MARLIN_F103Zx
  370. build_flags = ${stm32_variant.build_flags}
  371. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  372. build_unflags = ${stm32_variant.build_unflags}
  373. -DUSBCON -DUSBD_USE_CDC
  374. #
  375. # TRIGORILLA PRO DISK BASED (STM32F103ZET6)
  376. # Builds for Trigorilla to update from SD
  377. #
  378. [env:trigorilla_pro_disk]
  379. extends = stm32_variant
  380. board = genericSTM32F103ZE
  381. board_build.crypt_chitu = update.zw
  382. board_build.variant = MARLIN_F103Zx
  383. board_build.offset = 0x8800
  384. board_build.offset_address = 0x08008800
  385. build_flags = ${stm32_variant.build_flags}
  386. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  387. build_unflags = ${stm32_variant.build_unflags}
  388. -DUSBCON -DUSBD_USE_CDC
  389. extra_scripts = ${stm32_variant.extra_scripts}
  390. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  391. #
  392. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  393. #
  394. [env:chitu_f103]
  395. extends = stm32_variant
  396. board = genericSTM32F103ZE
  397. board_build.crypt_chitu = update.cbd
  398. board_build.variant = MARLIN_F103Zx
  399. board_build.offset = 0x8800
  400. board_build.offset_address = 0x08008800
  401. build_flags = ${stm32_variant.build_flags}
  402. -DSTM32F1xx
  403. build_unflags = ${stm32_variant.build_unflags}
  404. extra_scripts = ${stm32_variant.extra_scripts}
  405. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  406. #
  407. # Some Chitu V5 boards have a problem with GPIO init.
  408. # Use this target if G28 or G29 are always failing.
  409. #
  410. [env:chitu_v5_gpio_init]
  411. extends = env:chitu_f103
  412. build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  413. #
  414. # Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0
  415. #
  416. # STM32F103RC_ZM3E2_USB ........... RCT6 with 256K
  417. # STM32F103VC_ZM3E4_USB ........... VCT6 with 256K
  418. # STM32F103VE_ZM3E4V2_USB ......... VET6 with 512K
  419. #
  420. [ZONESTAR_ZM3E]
  421. extends = stm32_variant
  422. platform_packages = ${stm_flash_drive.platform_packages}
  423. board_upload.offset_address = 0x08005000
  424. board_build.offset = 0x5000
  425. board_upload.maximum_size = 237568
  426. extra_scripts = ${stm32_variant.extra_scripts}
  427. build_flags = ${stm32_variant.build_flags}
  428. -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC
  429. build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC
  430. [env:STM32F103RC_ZM3E2_USB]
  431. extends = ZONESTAR_ZM3E
  432. board = genericSTM32F103RC
  433. board_build.variant = MARLIN_F103Rx
  434. [env:STM32F103VC_ZM3E4_USB]
  435. extends = ZONESTAR_ZM3E
  436. board = genericSTM32F103VC
  437. board_build.variant = MARLIN_F103Vx
  438. build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=TIM1
  439. [env:STM32F103VE_ZM3E4V2_USB]
  440. extends = ZONESTAR_ZM3E
  441. board = genericSTM32F103VE
  442. board_build.variant = MARLIN_F103Vx
  443. build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=TIM1
  444. board_upload.maximum_size = 499712
  445. #
  446. # Mingda D2 DZ301 V1.0 (STM32F103ZE)
  447. #
  448. [env:mingda_d301]
  449. extends = stm32_variant
  450. board = genericSTM32F103ZE
  451. board_build.variant = MARLIN_F103Zx
  452. board_build.offset = 0x7000
  453. board_upload.offset_address = 0x08007000
  454. build_flags = ${stm32_variant.build_flags} -DSTM32F1xx
  455. #
  456. # ORCA 3D SPRINGER Modular Controller (STM32F103VCT6)
  457. #
  458. [env:STM32F103VC_orca3d]
  459. extends = stm32_variant
  460. board = genericSTM32F103VC
  461. board_build.variant = MARLIN_F103Vx
  462. build_flags = ${stm32_variant.build_flags} -DDEBUG_LEVEL=0
  463. monitor_speed = 115200
  464. board_build.offset = 0x8000
  465. board_upload.offset_address = 0x08008000