Bladeren bron

Support RET6 in BTT SKR Mini (#15957)

Gustavo Alvarez 5 jaren geleden
bovenliggende
commit
b2a275891c

+ 1
- 1
Marlin/src/pins/pins.h Bestand weergeven

@@ -476,7 +476,7 @@
476 476
 #elif MB(BTT_SKR_MINI_E3_V1_2)
477 477
   #include "stm32/pins_BTT_SKR_MINI_E3_V1_2.h"  // STM32F1                                env:STM32F103RC_bigtree env:STM32F103RC_bigtree_512K env:STM32F103RC_bigtree_NOUSB env:STM32F103RC_bigtree_512K_NOUSB
478 478
 #elif MB(BIGTREE_SKR_E3_DIP)
479
-  #include "stm32/pins_BTT_SKR_E3_DIP.h"        // STM32F1                                env:STM32F103RC_bigtree env:STM32F103RC_bigtree_512K env:STM32F103RC_bigtree_NOUSB env:STM32F103RC_bigtree_512K_NOUSB
479
+  #include "stm32/pins_BTT_SKR_E3_DIP.h"        // STM32F1                                env:STM32F103RC_bigtree env:STM32F103RC_bigtree_512K env:STM32F103RC_bigtree_NOUSB env:STM32F103RC_bigtree_512K_NOUSB env:STM32F103RE_bigtree
480 480
 #elif MB(JGAURORA_A5S_A1)
481 481
   #include "stm32/pins_JGAURORA_A5S_A1.h"       // STM32F1                                env:jgaurora_a5s_a1
482 482
 #elif MB(FYSETC_AIO_II)

+ 14
- 0
buildroot/share/PlatformIO/ldscripts/STM32F103RE_SKR_E3_DIP.ld Bestand weergeven

@@ -0,0 +1,14 @@
1
+MEMORY
2
+{
3
+  ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40
4
+  rom (rx)  : ORIGIN = 0x08007000, LENGTH = 512K - 28K
5
+}
6
+
7
+/* Provide memory region aliases for common.inc */
8
+REGION_ALIAS("REGION_TEXT", rom);
9
+REGION_ALIAS("REGION_DATA", ram);
10
+REGION_ALIAS("REGION_BSS", ram);
11
+REGION_ALIAS("REGION_RODATA", rom);
12
+
13
+/* Let common.inc handle the real work. */
14
+INCLUDE common.inc

+ 12
- 0
buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py Bestand weergeven

@@ -0,0 +1,12 @@
1
+import os
2
+Import("env")
3
+
4
+# Relocate firmware from 0x08000000 to 0x08007000
5
+env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000"))
6
+
7
+custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/STM32F103RE_SKR_E3_DIP.ld")
8
+for i, flag in enumerate(env["LINKFLAGS"]):
9
+    if "-Wl,-T" in flag:
10
+        env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script
11
+    elif flag == "-T":
12
+        env["LINKFLAGS"][i + 1] = custom_ld_script

+ 34
- 0
platformio.ini Bestand weergeven

@@ -298,6 +298,8 @@ upload_protocol   = serial
298 298
 #   STM32F103RC_bigtree_NOUSB ........ RCT6 with 256K (no USB)
299 299
 #   STM32F103RC_bigtree_512K.......... RCT6 with 512K
300 300
 #   STM32F103RC_bigtree_512K_NOUSB ... RCT6 with 512K (no USB)
301
+#   STM32F103RE_bigtree .............. RET6
302
+#   STM32F103RE_bigtree_NOUSB ........ RET6 (no USB)
301 303
 #
302 304
 
303 305
 [env:STM32F103RC_bigtree]
@@ -362,6 +364,38 @@ lib_ignore        = Adafruit NeoPixel, SPI
362 364
 src_filter        = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
363 365
 monitor_speed     = 115200
364 366
 
367
+[env:STM32F103RE_bigtree]
368
+platform          = ststm32
369
+framework         = arduino
370
+board             = genericSTM32F103RE
371
+board_upload.maximum_size=524288
372
+platform_packages = tool-stm32duino
373
+extra_scripts     = buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
374
+build_flags       = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
375
+  ${common.build_flags} -DDEBUG_LEVEL=0 -std=gnu++14 -DUSE_USB_COMPOSITE -DHAVE_SW_SERIAL -DSS_TIMER=4
376
+build_unflags     = -std=gnu++11
377
+lib_deps          = ${common.lib_deps}
378
+  SoftwareSerialM=https://github.com/FYSETC/SoftwareSerialM/archive/master.zip
379
+lib_ignore        = Adafruit NeoPixel, SPI
380
+src_filter        = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
381
+monitor_speed     = 115200
382
+
383
+[env:STM32F103RE_bigtree_NOUSB]
384
+platform          = ststm32
385
+framework         = arduino
386
+board             = genericSTM32F103RE
387
+board_upload.maximum_size=524288
388
+platform_packages = tool-stm32duino
389
+extra_scripts     = buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
390
+build_flags       = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
391
+  ${common.build_flags} -DDEBUG_LEVEL=0 -std=gnu++14 -DHAVE_SW_SERIAL -DSS_TIMER=4
392
+build_unflags     = -std=gnu++11
393
+lib_deps          = ${common.lib_deps}
394
+  SoftwareSerialM=https://github.com/FYSETC/SoftwareSerialM/archive/master.zip
395
+lib_ignore        = Adafruit NeoPixel, SPI
396
+src_filter        = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
397
+monitor_speed     = 115200
398
+
365 399
 #
366 400
 # STM32F4 with STM32GENERIC
367 401
 #

Laden…
Annuleren
Opslaan