stm32f1.ini 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  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 = ${common_stm32.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 =
  79. markyue/Panda_SoftMasterI2C@1.0.3
  80. #
  81. # MKS Robin (STM32F103ZET6)
  82. # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
  83. #
  84. [env:mks_robin]
  85. extends = stm32_variant
  86. board = genericSTM32F103ZE
  87. board_build.variant = MARLIN_F103Zx
  88. board_build.encrypt_mks = Robin.bin
  89. board_build.offset = 0x7000
  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. #
  166. # Creality 256K (STM32F103RC)
  167. #
  168. [env:STM32F103RC_creality]
  169. extends = STM32F103Rx_creality
  170. board = genericSTM32F103RC
  171. #
  172. # Creality 256K (STM32F103RC) with custom binary upload to SD (see above).
  173. #
  174. [env:STM32F103RC_creality_xfer]
  175. extends = STM32F103Rx_creality_xfer
  176. board = genericSTM32F103RC
  177. #
  178. # Creality 512K (STM32F103VE)
  179. #
  180. [env:STM32F103VE_creality]
  181. extends = STM32F103Rx_creality
  182. board = genericSTM32F103VE
  183. board_build.variant = MARLIN_F103Vx
  184. build_flags = ${stm32_variant.build_flags}
  185. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  186. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  187. #
  188. # BigTreeTech SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
  189. #
  190. # STM32F103RE_btt ............. RET6
  191. # STM32F103RE_btt_USB ......... RET6 with USB Media Share Support
  192. #
  193. [env:STM32F103RE_btt]
  194. extends = stm32_variant
  195. board = genericSTM32F103RE
  196. board_build.variant = MARLIN_F103Rx
  197. board_build.offset = 0x7000
  198. board_upload.offset_address = 0x08007000
  199. build_flags = ${stm32_variant.build_flags}
  200. -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED
  201. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  202. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  203. monitor_speed = 115200
  204. debug_tool = jlink
  205. upload_protocol = jlink
  206. [env:STM32F103RE_btt_USB]
  207. extends = env:STM32F103RE_btt
  208. platform_packages = ${stm_flash_drive.platform_packages}
  209. build_flags = ${env:STM32F103RE_btt.build_flags}
  210. -DUSE_USB_FS -DUSBD_IRQ_PRIO=5
  211. -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC
  212. build_unflags = ${env:STM32F103RE_btt.build_unflags} -DUSBD_USE_CDC
  213. #
  214. # Mingda MPX_ARM_MINI
  215. #
  216. [env:mingda_mpx_arm_mini]
  217. extends = stm32_variant
  218. board = genericSTM32F103ZE
  219. board_build.variant = MARLIN_F103Zx
  220. board_build.offset = 0x10000
  221. build_flags = ${stm32_variant.build_flags}
  222. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  223. build_unflags = ${stm32_variant.build_unflags}
  224. -DUSBCON -DUSBD_USE_CDC
  225. #
  226. # Malyan M200 (STM32F103CB)
  227. #
  228. [env:STM32F103CB_malyan]
  229. extends = common_stm32
  230. board = malyanm200_f103cb
  231. build_flags = ${common_stm32.build_flags}
  232. -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB
  233. -DHAL_UART_MODULE_ENABLED
  234. build_src_filter = ${common.default_src_filter} +<src/HAL/STM32> -<src/HAL/STM32/tft>
  235. #
  236. # FLYmaker FLY Mini (STM32F103RCT6)
  237. #
  238. [env:FLY_MINI]
  239. extends = stm32_variant
  240. board = genericSTM32F103RC
  241. board_build.variant = MARLIN_F103Rx
  242. board_build.offset = 0x5000
  243. board_upload.offset_address = 0x08005000
  244. build_flags = ${stm32_variant.build_flags} -DSS_TIMER=4
  245. #
  246. # (STM32F103VE_robin)
  247. #
  248. [STM32F103VE_robin]
  249. extends = stm32_variant
  250. board = genericSTM32F103VE
  251. board_build.variant = MARLIN_F103Vx
  252. board_build.offset = 0x7000
  253. board_upload.offset_address = 0x08007000
  254. build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 -DSS_TIMER=4
  255. [mks_robin_nano_v1v2_common]
  256. extends = STM32F103VE_robin
  257. board_build.encrypt_mks = Robin_nano35.bin
  258. debug_tool = stlink
  259. upload_protocol = stlink
  260. #
  261. # MKS/ZNP Robin Nano V1.2 and V2 with native USB modification
  262. #
  263. [env:mks_robin_nano_v1v2_usbmod]
  264. extends = mks_robin_nano_v1v2_common
  265. #
  266. # MKS Robin Nano V1.2 and V2
  267. #
  268. [env:mks_robin_nano_v1v2]
  269. extends = mks_robin_nano_v1v2_common
  270. build_flags = ${mks_robin_nano_v1v2_common.build_flags} -DENABLE_HWSERIAL3
  271. build_unflags = ${mks_robin_nano_v1v2_common.build_unflags} -DUSBCON -DUSBD_USE_CDC
  272. #
  273. # MKS Robin Mini (STM32F103VET6)
  274. #
  275. [env:mks_robin_mini]
  276. extends = STM32F103VE_robin
  277. board_build.encrypt_mks = Robin_mini.bin
  278. build_unflags = ${STM32F103VE_robin.build_unflags} -DSS_TIMER=4 -DTIMER_SERVO=TIM2
  279. build_flags = ${STM32F103VE_robin.build_flags} -DTIMER_SERVO=TIM1
  280. #
  281. # MKS Robin E3p (STM32F103VET6)
  282. # - LVGL UI
  283. #
  284. [env:mks_robin_e3p]
  285. extends = STM32F103VE_robin
  286. board_build.encrypt_mks = Robin_e3p.bin
  287. debug_tool = jlink
  288. upload_protocol = jlink
  289. #
  290. # FLSUN QQS Pro (STM32F103VET6)
  291. # Hispeedv1 Robin mini variant
  292. #
  293. [env:flsun_hispeedv1]
  294. extends = STM32F103VE_robin
  295. board_build.encrypt_mks = Robin_mini.bin
  296. build_flags = ${STM32F103VE_robin.build_flags} -DENABLE_HWSERIAL3
  297. build_unflags = ${STM32F103VE_robin.build_unflags} -DUSBCON -DUSBD_USE_CDC
  298. #
  299. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  300. #
  301. [env:mks_robin_lite]
  302. extends = stm32_variant
  303. board = genericSTM32F103RC
  304. board_build.variant = MARLIN_F103Rx
  305. board_build.encrypt_mks = mksLite.bin
  306. board_build.offset = 0x5000
  307. board_upload.offset_address = 0x08005000
  308. #
  309. # MKS ROBIN LITE3 (STM32F103RCT6)
  310. #
  311. [env:mks_robin_lite3]
  312. extends = env:mks_robin_lite
  313. board_build.encrypt_mks = mksLite3.bin
  314. #
  315. # MKS Robin Pro (STM32F103ZET6)
  316. #
  317. [env:mks_robin_pro]
  318. extends = env:mks_robin
  319. board_build.encrypt_mks = Robin_pro.bin
  320. #
  321. # JGAurora A5S A1 (STM32F103ZET6)
  322. #
  323. [env:jgaurora_a5s_a1]
  324. extends = stm32_variant
  325. board = genericSTM32F103ZE
  326. board_build.variant = MARLIN_F103Zx
  327. board_build.offset = 0xA000
  328. board_upload.offset_address = 0x0800A000
  329. build_flags = ${stm32_variant.build_flags}
  330. -DSTM32F1xx -DSTM32_XL_DENSITY
  331. extra_scripts = ${stm32_variant.extra_scripts}
  332. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  333. #
  334. # FYSETC STM32F103RC
  335. #
  336. [env:STM32F103RC_fysetc]
  337. extends = common_STM32F103RC_variant
  338. extra_scripts = ${common_STM32F103RC_variant.extra_scripts}
  339. buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
  340. build_flags = ${common_STM32F103RC_variant.build_flags} -DTIMER_SERVO=TIM1
  341. lib_ldf_mode = chain
  342. debug_tool = stlink
  343. upload_protocol = serial
  344. #
  345. # Longer 3D board in Alfawise U20 (STM32F103VET6)
  346. #
  347. [env:STM32F103VE_longer]
  348. extends = stm32_variant
  349. lib_deps = ${common.lib_deps}
  350. https://github.com/tpruvot/STM32_Servo_OpenDrain/archive/2.0.zip
  351. board = genericSTM32F103VE
  352. board_build.variant = MARLIN_F103VE_LONGER
  353. board_build.rename = project.bin
  354. board_build.offset = 0x10000
  355. board_upload.offset_address = 0x08010000
  356. build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12
  357. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED
  358. extra_scripts = ${stm32_variant.extra_scripts}
  359. monitor_speed = 250000
  360. debug_tool = stlink
  361. #
  362. # TRIGORILLA PRO (STM32F103ZET6)
  363. #
  364. [env:trigorilla_pro]
  365. extends = stm32_variant
  366. board = genericSTM32F103ZE
  367. board_build.variant = MARLIN_F103Zx
  368. build_flags = ${stm32_variant.build_flags}
  369. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  370. build_unflags = ${stm32_variant.build_unflags}
  371. -DUSBCON -DUSBD_USE_CDC
  372. #
  373. # TRIGORILLA PRO DISK BASED (STM32F103ZET6)
  374. # Builds for Trigorilla to update from SD
  375. #
  376. [env:trigorilla_pro_disk]
  377. extends = stm32_variant
  378. board = genericSTM32F103ZE
  379. board_build.crypt_chitu = update.zw
  380. board_build.variant = MARLIN_F103Zx
  381. board_build.offset = 0x8800
  382. build_flags = ${stm32_variant.build_flags}
  383. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  384. build_unflags = ${stm32_variant.build_unflags}
  385. -DUSBCON -DUSBD_USE_CDC
  386. extra_scripts = ${stm32_variant.extra_scripts}
  387. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  388. #
  389. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  390. #
  391. [env:chitu_f103]
  392. extends = stm32_variant
  393. board = genericSTM32F103ZE
  394. board_build.crypt_chitu = update.cbd
  395. board_build.variant = MARLIN_F103Zx
  396. board_build.offset = 0x8800
  397. build_flags = ${stm32_variant.build_flags}
  398. -DSTM32F1xx
  399. build_unflags = ${stm32_variant.build_unflags}
  400. extra_scripts = ${stm32_variant.extra_scripts}
  401. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  402. #
  403. # Some Chitu V5 boards have a problem with GPIO init.
  404. # Use this target if G28 or G29 are always failing.
  405. #
  406. [env:chitu_v5_gpio_init]
  407. extends = env:chitu_f103
  408. build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  409. #
  410. # Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0
  411. #
  412. # STM32F103RC_ZM3E2_USB ........... RCT6 with 256K
  413. # STM32F103VC_ZM3E4_USB ........... VCT6 with 256K
  414. # STM32F103VE_ZM3E4V2_USB ......... VET6 with 512K
  415. #
  416. [ZONESTAR_ZM3E]
  417. extends = stm32_variant
  418. platform_packages = ${stm_flash_drive.platform_packages}
  419. board_upload.offset_address = 0x08005000
  420. board_build.offset = 0x5000
  421. board_upload.maximum_size = 237568
  422. extra_scripts = ${stm32_variant.extra_scripts}
  423. build_flags = ${common_stm32.build_flags}
  424. -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC
  425. build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC
  426. [env:STM32F103RC_ZM3E2_USB]
  427. extends = ZONESTAR_ZM3E
  428. board = genericSTM32F103RC
  429. board_build.variant = MARLIN_F103Rx
  430. [env:STM32F103VC_ZM3E4_USB]
  431. extends = ZONESTAR_ZM3E
  432. board = genericSTM32F103VC
  433. board_build.variant = MARLIN_F103Vx
  434. build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=TIM1
  435. [env:STM32F103VE_ZM3E4V2_USB]
  436. extends = ZONESTAR_ZM3E
  437. board = genericSTM32F103VE
  438. board_build.variant = MARLIN_F103Vx
  439. build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=TIM1
  440. board_upload.maximum_size = 499712