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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. #
  33. # BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3)
  34. #
  35. # STM32F103RC_btt ............. RCT6 with 256K
  36. # STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage)
  37. # STM32F103RC_btt_512K ........ RCT6 with 512K
  38. # STM32F103RC_btt_512K_USB .... RCT6 with 512K (USB mass storage)
  39. #
  40. # WARNING! If you have an SKR Mini v1.1 or an SKR Mini E3 1.0 / 1.2 / 2.0 / DIP
  41. # and experience a printer freeze, re-flash Marlin using the regular (non-512K)
  42. # build option. 256K chips may be re-branded 512K chips, but this means the
  43. # upper 256K is sketchy, and failure is very likely.
  44. #
  45. [common_STM32F103RC]
  46. platform = ${common_stm32.platform}
  47. extends = common_stm32
  48. board = genericSTM32F103RC
  49. monitor_speed = 115200
  50. board_build.core = stm32
  51. board_build.variant = MARLIN_F103Rx
  52. board_build.ldscript = ldscript.ld
  53. extra_scripts = ${common.extra_scripts}
  54. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  55. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  56. #
  57. # STM32F103RE
  58. #
  59. [env:STM32F103RE]
  60. platform = ${common_stm32.platform}
  61. extends = common_stm32
  62. board = genericSTM32F103RE
  63. monitor_speed = 115200
  64. #
  65. # STM32F103VE
  66. #
  67. [env:STM32F103VE]
  68. platform = ${common_stm32.platform}
  69. extends = common_stm32
  70. board = genericSTM32F103VE
  71. monitor_speed = 115200
  72. #
  73. # STM32F103ZE
  74. #
  75. [env:STM32F103ZE]
  76. platform = ${common_stm32.platform}
  77. extends = common_stm32
  78. board = genericSTM32F103ZE
  79. monitor_speed = 115200
  80. [env:STM32F103RC_btt]
  81. platform = ${common_stm32.platform}
  82. extends = common_STM32F103RC
  83. build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5
  84. board_build.offset = 0x7000
  85. board_build.encrypt = No
  86. board_build.firmware = firmware.bin
  87. board_upload.offset_address = 0x08007000
  88. [env:STM32F103RC_btt_USB]
  89. extends = env:STM32F103RC_btt
  90. platform = ${common_stm32.platform}
  91. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-2.zip
  92. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  93. build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.build_flags}
  94. -DUSBCON
  95. -DUSE_USBHOST_HS
  96. -DUSBD_IRQ_PRIO=5
  97. -DUSBD_IRQ_SUBPRIO=6
  98. -DUSE_USB_HS_IN_FS
  99. -DUSBD_USE_CDC_MSC
  100. [env:STM32F103RC_btt_512K]
  101. platform = ${common_stm32.platform}
  102. extends = env:STM32F103RC_btt
  103. board_upload.maximum_size = 524288
  104. build_flags = ${env:STM32F103RC_btt.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
  105. [env:STM32F103RC_btt_512K_USB]
  106. platform = ${common_stm32.platform}
  107. extends = env:STM32F103RC_btt_USB
  108. board_upload.maximum_size = 524288
  109. build_flags = ${env:STM32F103RC_btt_USB.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
  110. #
  111. # MKS Robin (STM32F103ZET6)
  112. # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
  113. #
  114. [env:mks_robin]
  115. platform = ${common_stm32.platform}
  116. extends = common_stm32
  117. board = genericSTM32F103ZE
  118. board_build.core = stm32
  119. board_build.variant = MARLIN_F103Zx
  120. board_build.ldscript = ldscript.ld
  121. board_build.offset = 0x7000
  122. board_build.encrypt = Yes
  123. board_build.firmware = Robin.bin
  124. build_flags = ${common_stm32.build_flags}
  125. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  126. build_unflags = ${common_stm32.build_unflags}
  127. -DUSBCON -DUSBD_USE_CDC
  128. extra_scripts = ${common.extra_scripts}
  129. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  130. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  131. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  132. lib_deps =
  133. #
  134. # Creality (STM32F103RET6)
  135. #
  136. [env:STM32F103RET6_creality]
  137. platform = ${common_stm32.platform}
  138. extends = common_stm32
  139. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  140. board = genericSTM32F103RE
  141. monitor_speed = 115200
  142. board_build.core = stm32
  143. board_build.variant = MARLIN_F103Rx
  144. board_build.offset = 0x7000
  145. board_build.ldscript = ldscript.ld
  146. board_upload.offset_address = 0x08007000
  147. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  148. extra_scripts = ${common.extra_scripts}
  149. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  150. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  151. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  152. debug_tool = jlink
  153. upload_protocol = jlink
  154. #
  155. # FLSUN QQS Pro (STM32F103VET6)
  156. # board Hispeedv1
  157. #
  158. [env:flsun_hispeedv1]
  159. platform = ${common_stm32.platform}
  160. extends = common_stm32
  161. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  162. board = genericSTM32F103VE
  163. board_build.core = stm32
  164. board_build.variant = MARLIN_F103Vx
  165. board_build.ldscript = ldscript.ld
  166. board_build.offset = 0x7000
  167. board_build.firmware = Robin_mini.bin
  168. board_build.encrypt = Yes
  169. board_upload.offset_address = 0x08007000
  170. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  171. extra_scripts = ${common.extra_scripts}
  172. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  173. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  174. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  175. #
  176. # MKS Robin Nano V1.2 and V2
  177. #
  178. [env:mks_robin_nano35]
  179. platform = ${common_stm32.platform}
  180. extends = common_stm32
  181. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  182. board = genericSTM32F103VE
  183. board_build.core = stm32
  184. board_build.variant = MARLIN_F103Vx
  185. board_build.ldscript = ldscript.ld
  186. board_build.offset = 0x7000
  187. board_build.encrypt = Yes
  188. board_build.firmware = Robin_nano35.bin
  189. board_upload.offset_address = 0x08007000
  190. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  191. debug_tool = jlink
  192. upload_protocol = jlink
  193. extra_scripts = ${common.extra_scripts}
  194. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  195. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  196. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  197. #
  198. # Mingda MPX_ARM_MINI
  199. #
  200. [env:mingda_mpx_arm_mini]
  201. platform = ${common_stm32.platform}
  202. extends = common_stm32
  203. board = genericSTM32F103ZE
  204. board_build.core = stm32
  205. board_build.variant = MARLIN_F103Zx
  206. board_build.ldscript = ldscript.ld
  207. board_build.offset = 0x10000
  208. build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  209. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  210. extra_scripts = ${common.extra_scripts}
  211. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  212. buildroot/share/PlatformIO/scripts/stm32_bootloader.py