My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stm32f1.ini 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  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 M1 core
  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/STM32 Base Environment values
  22. #
  23. [common_stm32]
  24. platform = ststm32@~12.1
  25. build_flags = ${common.build_flags}
  26. -std=gnu++14
  27. -DUSBCON -DUSBD_USE_CDC
  28. -DTIM_IRQ_PRIO=13
  29. -DADC_RESOLUTION=12
  30. build_unflags = -std=gnu++11
  31. src_filter = ${common.default_src_filter} +<src/HAL/STM32> +<src/HAL/shared/backtrace>
  32. extra_scripts = ${common.extra_scripts}
  33. pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py
  34. #
  35. # BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3)
  36. #
  37. # STM32F103RC_btt ............. RCT6 with 256K
  38. # STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage)
  39. # STM32F103RC_btt_512K ........ RCT6 with 512K
  40. # STM32F103RC_btt_512K_USB .... RCT6 with 512K (USB mass storage)
  41. #
  42. # WARNING! If you have an SKR Mini v1.1 or an SKR Mini E3 1.0 / 1.2 / 2.0 / DIP
  43. # and experience a printer freeze, re-flash Marlin using the regular (non-512K)
  44. # build option. 256K chips may be re-branded 512K chips, but this means the
  45. # upper 256K is sketchy, and failure is very likely.
  46. #
  47. [common_STM32F103RC]
  48. platform = ${common_stm32.platform}
  49. extends = common_stm32
  50. board = genericSTM32F103RC
  51. monitor_speed = 115200
  52. board_build.core = stm32
  53. board_build.variant = MARLIN_F103Rx
  54. board_build.ldscript = ldscript.ld
  55. extra_scripts = ${common_stm32.extra_scripts}
  56. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  57. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  58. #
  59. # STM32F103RE
  60. #
  61. [env:STM32F103RE]
  62. platform = ${common_stm32.platform}
  63. extends = common_stm32
  64. board = genericSTM32F103RE
  65. monitor_speed = 115200
  66. #
  67. # STM32F103VE
  68. #
  69. [env:STM32F103VE]
  70. platform = ${common_stm32.platform}
  71. extends = common_stm32
  72. board = genericSTM32F103VE
  73. monitor_speed = 115200
  74. #
  75. # STM32F103ZE
  76. #
  77. [env:STM32F103ZE]
  78. platform = ${common_stm32.platform}
  79. extends = common_stm32
  80. board = genericSTM32F103ZE
  81. monitor_speed = 115200
  82. [env:STM32F103RC_btt]
  83. platform = ${common_stm32.platform}
  84. extends = common_STM32F103RC
  85. build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5
  86. board_build.offset = 0x7000
  87. board_build.encrypt = No
  88. board_build.firmware = firmware.bin
  89. board_upload.offset_address = 0x08007000
  90. [env:STM32F103RC_btt_USB]
  91. extends = env:STM32F103RC_btt
  92. platform = ${common_stm32.platform}
  93. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-2.zip
  94. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  95. build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.build_flags}
  96. -DUSBCON
  97. -DUSE_USBHOST_HS
  98. -DUSBD_IRQ_PRIO=5
  99. -DUSBD_IRQ_SUBPRIO=6
  100. -DUSE_USB_HS_IN_FS
  101. -DUSBD_USE_CDC_MSC
  102. [env:STM32F103RC_btt_512K]
  103. platform = ${common_stm32.platform}
  104. extends = env:STM32F103RC_btt
  105. board_upload.maximum_size = 524288
  106. build_flags = ${env:STM32F103RC_btt.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
  107. [env:STM32F103RC_btt_512K_USB]
  108. platform = ${common_stm32.platform}
  109. extends = env:STM32F103RC_btt_USB
  110. board_upload.maximum_size = 524288
  111. build_flags = ${env:STM32F103RC_btt_USB.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
  112. #
  113. # MKS Robin (STM32F103ZET6)
  114. # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
  115. #
  116. [env:mks_robin]
  117. platform = ${common_stm32.platform}
  118. extends = common_stm32
  119. board = genericSTM32F103ZE
  120. board_build.core = stm32
  121. board_build.variant = MARLIN_F103Zx
  122. board_build.ldscript = ldscript.ld
  123. board_build.offset = 0x7000
  124. board_build.encrypt = Yes
  125. board_build.firmware = Robin.bin
  126. build_flags = ${common_stm32.build_flags}
  127. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  128. build_unflags = ${common_stm32.build_unflags}
  129. -DUSBCON -DUSBD_USE_CDC
  130. extra_scripts = ${common_stm32.extra_scripts}
  131. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  132. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  133. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  134. lib_deps =
  135. #
  136. # MKS Robin E3/E3D (STM32F103RCT6) with TMC2209
  137. #
  138. [env:mks_robin_e3]
  139. platform = ${common_stm32.platform}
  140. extends = common_STM32F103RC
  141. build_flags = ${common_stm32.build_flags}
  142. -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5
  143. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  144. monitor_speed = 115200
  145. board_build.offset = 0x5000
  146. board_build.encrypt = Yes
  147. board_build.firmware = Robin_e3.bin
  148. board_upload.offset_address = 0x08005000
  149. debug_tool = stlink
  150. extra_scripts = ${env:STM32F103RC.extra_scripts}
  151. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  152. #
  153. # Creality (STM32F103RET6)
  154. #
  155. [env:STM32F103RET6_creality]
  156. platform = ${common_stm32.platform}
  157. extends = common_stm32
  158. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  159. board = genericSTM32F103RE
  160. monitor_speed = 115200
  161. board_build.core = stm32
  162. board_build.variant = MARLIN_F103Rx
  163. board_build.offset = 0x7000
  164. board_build.ldscript = ldscript.ld
  165. board_upload.offset_address = 0x08007000
  166. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  167. extra_scripts = ${common.extra_scripts}
  168. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  169. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  170. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  171. debug_tool = jlink
  172. upload_protocol = jlink
  173. #
  174. # BigTree SKR Mini E3 DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
  175. #
  176. # STM32F103RE_btt ............. RET6
  177. # STM32F103RE_btt_USB ......... RET6 (USB mass storage)
  178. #
  179. [env:STM32F103RE_btt]
  180. platform = ${common_stm32.platform}
  181. extends = common_stm32
  182. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  183. board = genericSTM32F103RE
  184. monitor_speed = 115200
  185. board_build.core = stm32
  186. board_build.variant = MARLIN_F103Rx
  187. board_build.offset = 0x7000
  188. board_build.ldscript = ldscript.ld
  189. board_upload.offset_address = 0x08007000
  190. build_unflags = ${common_stm32.build_unflags}
  191. extra_scripts = ${common.extra_scripts}
  192. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  193. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  194. debug_tool = jlink
  195. upload_protocol = jlink
  196. [env:STM32F103RE_btt_USB]
  197. extends = env:STM32F103RE_btt
  198. platform = ${common_stm32.platform}
  199. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-2.zip
  200. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  201. build_flags = ${env:STM32F103RE_btt.build_flags} ${env:stm32_flash_drive.build_flags}
  202. -DUSBCON
  203. -DUSE_USBHOST_HS
  204. -DUSBD_IRQ_PRIO=5
  205. -DUSBD_IRQ_SUBPRIO=6
  206. -DUSE_USB_HS_IN_FS
  207. -DUSBD_USE_CDC_MSC
  208. #
  209. # FLSUN QQS Pro (STM32F103VET6)
  210. # board Hispeedv1
  211. #
  212. [env:flsun_hispeedv1]
  213. platform = ${common_stm32.platform}
  214. extends = common_stm32
  215. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  216. board = genericSTM32F103VE
  217. board_build.core = stm32
  218. board_build.variant = MARLIN_F103Vx
  219. board_build.ldscript = ldscript.ld
  220. board_build.offset = 0x7000
  221. board_build.firmware = Robin_mini.bin
  222. board_build.encrypt = Yes
  223. board_upload.offset_address = 0x08007000
  224. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  225. extra_scripts = ${common_stm32.extra_scripts}
  226. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  227. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  228. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  229. #
  230. # MKS Robin Nano V1.2 and V2
  231. #
  232. [env:mks_robin_nano35]
  233. platform = ${common_stm32.platform}
  234. extends = common_stm32
  235. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  236. board = genericSTM32F103VE
  237. board_build.core = stm32
  238. board_build.variant = MARLIN_F103Vx
  239. board_build.ldscript = ldscript.ld
  240. board_build.offset = 0x7000
  241. board_build.encrypt = Yes
  242. board_build.firmware = Robin_nano35.bin
  243. board_upload.offset_address = 0x08007000
  244. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  245. debug_tool = jlink
  246. upload_protocol = jlink
  247. extra_scripts = ${common_stm32.extra_scripts}
  248. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  249. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  250. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  251. #
  252. # Mingda MPX_ARM_MINI
  253. #
  254. [env:mingda_mpx_arm_mini]
  255. platform = ${common_stm32.platform}
  256. extends = common_stm32
  257. board = genericSTM32F103ZE
  258. board_build.core = stm32
  259. board_build.variant = MARLIN_F103Zx
  260. board_build.ldscript = ldscript.ld
  261. board_build.offset = 0x10000
  262. build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  263. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  264. extra_scripts = ${common_stm32.extra_scripts}
  265. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  266. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  267. #
  268. # Malyan M200 (STM32F103CB)
  269. #
  270. [env:STM32F103CB_malyan]
  271. platform = ${common_stm32.platform}
  272. extends = common_stm32
  273. board = malyanm200_f103cb
  274. build_flags = ${common_stm32.build_flags}
  275. -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
  276. src_filter = ${common.default_src_filter} +<src/HAL/STM32>