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 9.4KB

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