File tree Expand file tree Collapse file tree 4 files changed +11
-16
lines changed
buildroot/share/PlatformIO/scripts Expand file tree Collapse file tree 4 files changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,3 @@ def _touch(path):
3030 print ("Done patching exception handler" )
3131
3232 print ("Libmaple modified and ready for post mortem debugging" )
33-
34- mf = env ["MARLIN_FEATURES" ]
35- rxBuf = mf ["RX_BUFFER_SIZE" ] if "RX_BUFFER_SIZE" in mf else "0"
36- txBuf = mf ["TX_BUFFER_SIZE" ] if "TX_BUFFER_SIZE" in mf else "0"
37- if int (rxBuf ) < 64 :
38- rxBuf = "64"
39- if int (txBuf ) < 64 :
40- txBuf = "64"
41-
42- build_flags = env .get ('BUILD_FLAGS' )
43- build_flags .append ("-DUSART_RX_BUF_SIZE=" + rxBuf + " -DUSART_TX_BUF_SIZE=" + txBuf )
44- env .Replace (BUILD_FLAGS = build_flags )
Original file line number Diff line number Diff line change 1313#
1414# The script will set the value as the default one (64 bytes)
1515# or the user-configured one, whichever is higher.
16+ #
17+ # Marlin has 128 and 32 as default values for RX_BUFFER_SIZE and
18+ # TX_BUFFER_SIZE respectively. We use the highest value.
1619mf = env ["MARLIN_FEATURES" ]
17- rxBuf = str (max (64 , int (mf ["RX_BUFFER_SIZE" ]) if "RX_BUFFER_SIZE" in mf else 0 ))
20+ rxBuf = str (max (128 , int (mf ["RX_BUFFER_SIZE" ]) if "RX_BUFFER_SIZE" in mf else 0 ))
1821txBuf = str (max (64 , int (mf ["TX_BUFFER_SIZE" ]) if "TX_BUFFER_SIZE" in mf else 0 ))
1922
2023build_flags = env .get ('BUILD_FLAGS' )
2124build_flags .append ("-DSERIAL_RX_BUFFER_SIZE=" + rxBuf )
2225build_flags .append ("-DSERIAL_TX_BUFFER_SIZE=" + txBuf )
26+ build_flags .append ("-DUSART_RX_BUF_SIZE=" + rxBuf )
27+ build_flags .append ("-DUSART_TX_BUF_SIZE=" + txBuf )
2328env .Replace (BUILD_FLAGS = build_flags )
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ lib_deps = ${common.lib_deps}
3636platform_packages = tool-stm32duino
3737extra_scripts = ${common.extra_scripts}
3838 pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
39+ pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py
3940
4041#
4142# STM32F103RC
@@ -325,7 +326,8 @@ lib_ignore = ${common_stm32f1.lib_ignore}
325326platform = ${common_stm32f1.platform}
326327extends = common_stm32f1
327328board = marlin_CHITU_F103
328- extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
329+ extra_scripts = ${common_stm32f1.extra_scripts}
330+ pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
329331 pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
330332 buildroot/share/PlatformIO/scripts/chitu_crypt.py
331333build_flags = ${common_stm32f1.build_flags}
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ board_build.variant = MARLIN_F103Rx
150150board_build.offset = 0x7000
151151board_upload.offset_address = 0x08007000
152152build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
153- extra_scripts = ${common .extra_scripts}
153+ extra_scripts = ${common_stm32 .extra_scripts}
154154 pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
155155 pre:buildroot/share/PlatformIO/scripts/random-bin.py
156156 buildroot/share/PlatformIO/scripts/stm32_bootloader.py
@@ -174,7 +174,7 @@ board_build.variant = MARLIN_F103Rx
174174board_build.offset = 0x7000
175175board_upload.offset_address = 0x08007000
176176build_unflags = ${common_stm32.build_unflags}
177- extra_scripts = ${common .extra_scripts}
177+ extra_scripts = ${common_stm32 .extra_scripts}
178178 pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
179179 buildroot/share/PlatformIO/scripts/stm32_bootloader.py
180180debug_tool = jlink
You can’t perform that action at this time.
0 commit comments