Преглед на файлове

Let libmaple accept RX/TX_BUFFER_SIZE (#21177)

X-Ryl669 преди 3 години
родител
ревизия
0cc03f912c
No account linked to committer's email address
променени са 2 файла, в които са добавени 18 реда и са изтрити 6 реда
  1. 12
    0
      buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
  2. 6
    6
      platformio.ini

+ 12
- 0
buildroot/share/PlatformIO/scripts/fix_framework_weakness.py Целия файл

@@ -27,3 +27,15 @@ if env.MarlinFeatureIsEnabled("POSTMORTEM_DEBUGGING"):
27 27
         print("Done patching exception handler")
28 28
 
29 29
     print("Libmaple modified and ready for post mortem debugging")
30
+
31
+rxBuf = env["MARLIN_FEATURES"]["RX_BUFFER_SIZE"] if "RX_BUFFER_SIZE" in env["MARLIN_FEATURES"] else "0"
32
+txBuf = env["MARLIN_FEATURES"]["TX_BUFFER_SIZE"] if "TX_BUFFER_SIZE" in env["MARLIN_FEATURES"] else "0"
33
+if int(rxBuf) < 64:
34
+	rxBuf = "64"
35
+
36
+if int(txBuf) < 64:
37
+	txBuf = "64"
38
+
39
+build_flags = env.get('BUILD_FLAGS')
40
+build_flags.append("-DUSART_RX_BUF_SIZE=" + rxBuf + " -DUSART_TX_BUF_SIZE=" + txBuf)
41
+env.Replace(BUILD_FLAGS=build_flags)

+ 6
- 6
platformio.ini Целия файл

@@ -753,7 +753,7 @@ lib_deps          = ${common.lib_deps}
753 753
   SoftwareSerialM
754 754
 platform_packages = tool-stm32duino
755 755
 extra_scripts     = ${common.extra_scripts}
756
-  buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
756
+  pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
757 757
 
758 758
 #
759 759
 # STM32F103RC
@@ -795,7 +795,7 @@ upload_protocol   = dfu
795 795
 [env:STM32F103RC_fysetc]
796 796
 platform          = ${common_stm32f1.platform}
797 797
 extends           = env:STM32F103RC
798
-extra_scripts     = ${common.extra_scripts}
798
+extra_scripts     = ${common_stm32f1.extra_scripts}
799 799
   buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
800 800
 build_flags       = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0
801 801
 lib_ldf_mode      = chain
@@ -819,7 +819,7 @@ upload_protocol   = serial
819 819
 [env:STM32F103RC_btt]
820 820
 platform          = ${common_stm32f1.platform}
821 821
 extends           = env:STM32F103RC
822
-extra_scripts     = ${common.extra_scripts}
822
+extra_scripts     = ${common_stm32f1.extra_scripts}
823 823
   buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
824 824
 build_flags       = ${common_stm32f1.build_flags}
825 825
   -DDEBUG_LEVEL=0 -DSS_TIMER=4
@@ -861,7 +861,7 @@ monitor_speed     = 115200
861 861
 [env:STM32F103RE_btt]
862 862
 platform          = ${common_stm32f1.platform}
863 863
 extends           = env:STM32F103RE
864
-extra_scripts     = ${common.extra_scripts}
864
+extra_scripts     = ${common_stm32f1.extra_scripts}
865 865
   buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
866 866
 build_flags       = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
867 867
 debug_tool        = stlink
@@ -951,7 +951,7 @@ build_flags   = ${common_stm32f1.build_flags}
951 951
 platform        = ${common_stm32f1.platform}
952 952
 extends         = common_stm32f1
953 953
 board           = genericSTM32F103VE
954
-extra_scripts   = ${common.extra_scripts}
954
+extra_scripts   = ${common_stm32f1.extra_scripts}
955 955
   buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
956 956
 build_flags     = ${common_stm32f1.build_flags}
957 957
   -DMCU_STM32F103VE -DSS_TIMER=4
@@ -1019,7 +1019,7 @@ platform      = ${common_stm32f1.platform}
1019 1019
 extends       = common_stm32f1
1020 1020
 board         = genericSTM32F103RC
1021 1021
 platform_packages = tool-stm32duino
1022
-extra_scripts = ${common.extra_scripts}
1022
+extra_scripts = ${common_stm32f1.extra_scripts}
1023 1023
   buildroot/share/PlatformIO/scripts/mks_robin_e3.py
1024 1024
 build_flags   = ${common_stm32f1.build_flags}
1025 1025
   -DDEBUG_LEVEL=0 -DSS_TIMER=4

Loading…
Отказ
Запис