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.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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. [env:STM32F103RC_btt]
  57. platform = ${common_stm32.platform}
  58. extends = common_STM32F103RC
  59. build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5
  60. board_build.offset = 0x7000
  61. board_build.encrypt = No
  62. board_build.firmware = firmware.bin
  63. board_upload.offset_address = 0x08007000
  64. [env:STM32F103RC_btt_USB]
  65. extends = env:STM32F103RC_btt
  66. platform = ${common_stm32.platform}
  67. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip
  68. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  69. build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.build_flags}
  70. -DUSBCON
  71. -DUSE_USBHOST_HS
  72. -DUSBD_IRQ_PRIO=5
  73. -DUSBD_IRQ_SUBPRIO=6
  74. -DUSE_USB_HS_IN_FS
  75. -DUSBD_USE_CDC_MSC
  76. [env:STM32F103RC_btt_512K]
  77. platform = ${common_stm32.platform}
  78. extends = env:STM32F103RC_btt
  79. board_upload.maximum_size = 524288
  80. build_flags = ${env:STM32F103RC_btt.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
  81. [env:STM32F103RC_btt_512K_USB]
  82. platform = ${common_stm32.platform}
  83. extends = env:STM32F103RC_btt_USB
  84. board_upload.maximum_size = 524288
  85. build_flags = ${env:STM32F103RC_btt_USB.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
  86. #
  87. # MKS Robin (STM32F103ZET6)
  88. # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
  89. #
  90. [env:mks_robin]
  91. platform = ${common_stm32.platform}
  92. extends = common_stm32
  93. board = genericSTM32F103ZE
  94. board_build.core = stm32
  95. board_build.variant = MARLIN_F103Zx
  96. board_build.ldscript = ldscript.ld
  97. board_build.offset = 0x7000
  98. board_build.encrypt = Yes
  99. board_build.firmware = Robin.bin
  100. build_flags = ${common_stm32.build_flags}
  101. -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  102. build_unflags = ${common_stm32.build_unflags}
  103. -DUSBCON -DUSBD_USE_CDC
  104. extra_scripts = ${common.extra_scripts}
  105. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  106. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  107. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  108. lib_deps =
  109. #
  110. # Creality (STM32F103RET6)
  111. #
  112. [env:STM32F103RET6_creality]
  113. platform = ${common_stm32.platform}
  114. extends = common_stm32
  115. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  116. board = genericSTM32F103RE
  117. monitor_speed = 115200
  118. board_build.core = stm32
  119. board_build.variant = MARLIN_F103Rx
  120. board_build.offset = 0x7000
  121. board_build.ldscript = ldscript.ld
  122. board_upload.offset_address = 0x08007000
  123. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  124. extra_scripts = ${common.extra_scripts}
  125. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  126. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  127. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  128. debug_tool = jlink
  129. upload_protocol = jlink
  130. #
  131. # FLSUN QQS Pro (STM32F103VET6)
  132. # board Hispeedv1
  133. #
  134. [env:flsun_hispeedv1]
  135. platform = ${common_stm32.platform}
  136. extends = common_stm32
  137. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  138. board = genericSTM32F103VE
  139. board_build.core = stm32
  140. board_build.variant = MARLIN_F103Vx
  141. board_build.ldscript = ldscript.ld
  142. board_build.offset = 0x7000
  143. board_build.firmware = Robin_mini.bin
  144. board_build.encrypt = Yes
  145. board_upload.offset_address = 0x08007000
  146. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  147. extra_scripts = ${common.extra_scripts}
  148. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  149. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  150. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  151. #
  152. # MKS Robin Nano V1.2 and V2
  153. #
  154. [env:mks_robin_nano35]
  155. platform = ${common_stm32.platform}
  156. extends = common_stm32
  157. build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  158. board = genericSTM32F103VE
  159. board_build.core = stm32
  160. board_build.variant = MARLIN_F103Vx
  161. board_build.ldscript = ldscript.ld
  162. board_build.offset = 0x7000
  163. board_build.encrypt = Yes
  164. board_build.firmware = Robin_nano35.bin
  165. board_upload.offset_address = 0x08007000
  166. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  167. debug_tool = jlink
  168. upload_protocol = jlink
  169. extra_scripts = ${common.extra_scripts}
  170. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  171. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  172. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  173. #
  174. # Mingda MPX_ARM_MINI
  175. #
  176. [env:mingda_mpx_arm_mini]
  177. platform = ${common_stm32.platform}
  178. extends = common_stm32
  179. board = genericSTM32F103ZE
  180. board_build.core = stm32
  181. board_build.variant = MARLIN_F103Zx
  182. board_build.ldscript = ldscript.ld
  183. board_build.offset = 0x10000
  184. build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
  185. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  186. extra_scripts = ${common.extra_scripts}
  187. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  188. buildroot/share/PlatformIO/scripts/stm32_bootloader.py