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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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. # FLSUN QQS Pro (STM32F103VET6)
  175. # board Hispeedv1
  176. #
  177. [env:flsun_hispeedv1]
  178. platform = ${common_stm32.platform}
  179. extends = common_stm32
  180. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  181. board = genericSTM32F103VE
  182. board_build.core = stm32
  183. board_build.variant = MARLIN_F103Vx
  184. board_build.ldscript = ldscript.ld
  185. board_build.offset = 0x7000
  186. board_build.firmware = Robin_mini.bin
  187. board_build.encrypt = Yes
  188. board_upload.offset_address = 0x08007000
  189. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  190. extra_scripts = ${common_stm32.extra_scripts}
  191. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  192. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  193. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  194. #
  195. # MKS Robin Nano V1.2 and V2
  196. #
  197. [env:mks_robin_nano35]
  198. platform = ${common_stm32.platform}
  199. extends = common_stm32
  200. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  201. board = genericSTM32F103VE
  202. board_build.core = stm32
  203. board_build.variant = MARLIN_F103Vx
  204. board_build.ldscript = ldscript.ld
  205. board_build.offset = 0x7000
  206. board_build.encrypt = Yes
  207. board_build.firmware = Robin_nano35.bin
  208. board_upload.offset_address = 0x08007000
  209. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  210. debug_tool = jlink
  211. upload_protocol = jlink
  212. extra_scripts = ${common_stm32.extra_scripts}
  213. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  214. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  215. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  216. #
  217. # Mingda MPX_ARM_MINI
  218. #
  219. [env:mingda_mpx_arm_mini]
  220. platform = ${common_stm32.platform}
  221. extends = common_stm32
  222. board = genericSTM32F103ZE
  223. board_build.core = stm32
  224. board_build.variant = MARLIN_F103Zx
  225. board_build.ldscript = ldscript.ld
  226. board_build.offset = 0x10000
  227. build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  228. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  229. extra_scripts = ${common_stm32.extra_scripts}
  230. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  231. buildroot/share/PlatformIO/scripts/stm32_bootloader.py