Browse Source

📦️ STM32F103RE_btt(_USB) with HAL/STM32 (#22040)

Victor Oliveira 3 years ago
parent
commit
c73d47327b
No account linked to committer's email address

+ 2
- 2
Marlin/src/pins/pins.h View File

@@ -518,9 +518,9 @@
518 518
 #elif MB(BTT_SKR_MINI_MZ_V1_0)
519 519
   #include "stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h"  // STM32F1                              env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_maple env:STM32F103RC_btt_512K_maple env:STM32F103RC_btt_USB_maple env:STM32F103RC_btt_512K_USB_maple
520 520
 #elif MB(BTT_SKR_E3_DIP)
521
-  #include "stm32f1/pins_BTT_SKR_E3_DIP.h"      // STM32F1                                env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt env:STM32F103RC_btt_512K
521
+  #include "stm32f1/pins_BTT_SKR_E3_DIP.h"      // STM32F1                                env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RE_btt_maple env:STM32F103RE_btt_USB_maple env:STM32F103RC_btt env:STM32F103RC_btt_512K
522 522
 #elif MB(BTT_SKR_CR6)
523
-  #include "stm32f1/pins_BTT_SKR_CR6.h"         // STM32F1                                env:STM32F103RE_btt env:STM32F103RE_btt_USB
523
+  #include "stm32f1/pins_BTT_SKR_CR6.h"         // STM32F1                                env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RE_btt_maple env:STM32F103RE_btt_USB_maple
524 524
 #elif MB(JGAURORA_A5S_A1)
525 525
   #include "stm32f1/pins_JGAURORA_A5S_A1.h"     // STM32F1                                env:jgaurora_a5s_a1
526 526
 #elif MB(FYSETC_AIO_II)

+ 1
- 3
Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h View File

@@ -21,9 +21,7 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-#if NOT_TARGET(TARGET_STM32F1)
25
-  #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
26
-#endif
24
+#include "env_validate.h"
27 25
 
28 26
 #define BOARD_INFO_NAME "BTT SKR E3 DIP V1.x"
29 27
 

+ 1
- 3
Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h View File

@@ -21,9 +21,7 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-#if NOT_TARGET(__STM32F1__, STM32F1)
25
-  #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
26
-#endif
24
+#include "env_validate.h"
27 25
 
28 26
 // Release PB3/PB4 (E0 STP/DIR) from JTAG pins
29 27
 #define DISABLE_JTAG

+ 1
- 3
Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h View File

@@ -21,9 +21,7 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-#if NOT_TARGET(TARGET_STM32F1)
25
-  #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
26
-#endif
24
+#include "env_validate.h"
27 25
 
28 26
 #define BOARD_INFO_NAME "BTT SKR Mini V1.1"
29 27
 

+ 3
- 3
Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h View File

@@ -21,9 +21,9 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-#if NOT_TARGET(TARGET_STM32F1)
25
-  #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
26
-#elif HOTENDS > 1 || E_STEPPERS > 1
24
+#include "env_validate.h"
25
+
26
+#if HOTENDS > 1 || E_STEPPERS > 1
27 27
   #error "CCROBOT-ONLINE MEEB_3DP only supports one hotend / E-stepper. Comment out this line to continue."
28 28
 #endif
29 29
 

+ 6
- 6
ini/stm32f1-maple.ini View File

@@ -157,10 +157,10 @@ upload_protocol      = jlink
157 157
 #
158 158
 # BigTree SKR Mini E3 DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
159 159
 #
160
-#   STM32F103RE_btt ............. RET6
161
-#   STM32F103RE_btt_USB ......... RET6 (USB mass storage)
160
+#   STM32F103RE_btt_maple ............. RET6
161
+#   STM32F103RE_btt_USB_maple ......... RET6 (USB mass storage)
162 162
 #
163
-[env:STM32F103RE_btt]
163
+[env:STM32F103RE_btt_maple]
164 164
 platform          = ${common_stm32f1.platform}
165 165
 extends           = env:STM32F103RE_maple
166 166
 board_build.address  = 0x08007000
@@ -171,10 +171,10 @@ build_flags       = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
171 171
 debug_tool        = stlink
172 172
 upload_protocol   = stlink
173 173
 
174
-[env:STM32F103RE_btt_USB]
174
+[env:STM32F103RE_btt_USB_maple]
175 175
 platform          = ${common_stm32f1.platform}
176
-extends           = env:STM32F103RE_btt
177
-build_flags       = ${env:STM32F103RE_btt.build_flags} -DUSE_USB_COMPOSITE
176
+extends           = env:STM32F103RE_btt_maple
177
+build_flags       = ${env:STM32F103RE_btt_maple.build_flags} -DUSE_USB_COMPOSITE
178 178
 lib_deps          = ${common_stm32f1.lib_deps}
179 179
   USBComposite for STM32F1@0.91
180 180
 

+ 37
- 0
ini/stm32f1.ini View File

@@ -185,6 +185,43 @@ debug_tool           = jlink
185 185
 upload_protocol      = jlink
186 186
 
187 187
 #
188
+# BigTree SKR Mini E3 DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
189
+#
190
+#   STM32F103RE_btt ............. RET6
191
+#   STM32F103RE_btt_USB ......... RET6 (USB mass storage)
192
+#
193
+[env:STM32F103RE_btt]
194
+platform             = ${common_stm32.platform}
195
+extends              = common_stm32
196
+build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
197
+board                = genericSTM32F103RE
198
+monitor_speed        = 115200
199
+board_build.core     = stm32
200
+board_build.variant  = MARLIN_F103Rx
201
+board_build.offset   = 0x7000
202
+board_build.ldscript = ldscript.ld
203
+board_upload.offset_address = 0x08007000
204
+build_unflags        = ${common_stm32.build_unflags}
205
+extra_scripts        = ${common.extra_scripts}
206
+  pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
207
+  buildroot/share/PlatformIO/scripts/stm32_bootloader.py
208
+debug_tool           = jlink
209
+upload_protocol      = jlink
210
+
211
+[env:STM32F103RE_btt_USB]
212
+extends           = env:STM32F103RE_btt
213
+platform          = ${common_stm32.platform}
214
+platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-2.zip
215
+build_unflags     = ${common_stm32.build_unflags} -DUSBD_USE_CDC
216
+build_flags       = ${env:STM32F103RE_btt.build_flags} ${env:stm32_flash_drive.build_flags}
217
+  -DUSBCON
218
+  -DUSE_USBHOST_HS
219
+  -DUSBD_IRQ_PRIO=5
220
+  -DUSBD_IRQ_SUBPRIO=6
221
+  -DUSE_USB_HS_IN_FS
222
+  -DUSBD_USE_CDC_MSC
223
+
224
+#
188 225
 # FLSUN QQS Pro (STM32F103VET6)
189 226
 # board Hispeedv1
190 227
 #

Loading…
Cancel
Save