Skip to content

Commit

Permalink
Merge pull request #347 from TBArchives/extui
Browse files Browse the repository at this point in the history
Patch for "buildroot\share\PlatformIO\scripts\marlin.py"
  • Loading branch information
Sebazzz committed Mar 7, 2024
2 parents 7f86597 + 8a7c834 commit 4a373e1
Show file tree
Hide file tree
Showing 11 changed files with 493 additions and 492 deletions.
20 changes: 10 additions & 10 deletions buildroot/share/PlatformIO/scripts/common-dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def add_to_feat_cnf(feature, flines):
for line in atoms:
parts = line.split('=')
name = parts.pop(0)
if name in ['build_flags', 'extra_scripts', 'src_filter', 'lib_ignore']:
if name in ['build_flags', 'extra_scripts', 'build_src_filter', 'lib_ignore']:
feat[name] = '='.join(parts)
blab("[%s] %s=%s" % (feature, name, feat[name]), 3)
else:
Expand Down Expand Up @@ -176,19 +176,19 @@ def apply_features_config():
blab("Running extra_scripts for %s... " % feature, 2)
env.SConscript(feat['extra_scripts'], exports="env")

if 'src_filter' in feat:
blab("========== Adding src_filter for %s... " % feature, 2)
src_filter = ' '.join(env.GetProjectOption('src_filter'))
if 'build_src_filter' in feat:
blab("========== Adding build_src_filter for %s... " % feature, 2)
build_src_filter = ' '.join(env.GetProjectOption('build_src_filter'))
# first we need to remove the references to the same folder
my_srcs = re.findall(r'[+-](<.*?>)', feat['src_filter'])
cur_srcs = re.findall(r'[+-](<.*?>)', src_filter)
my_srcs = re.findall(r'[+-](<.*?>)', feat['build_src_filter'])
cur_srcs = re.findall(r'[+-](<.*?>)', build_src_filter)
for d in my_srcs:
if d in cur_srcs:
src_filter = re.sub(r'[+-]' + d, '', src_filter)
build_src_filter = re.sub(r'[+-]' + d, '', build_src_filter)

src_filter = feat['src_filter'] + ' ' + src_filter
set_env_field('src_filter', [src_filter])
env.Replace(SRC_FILTER=src_filter)
build_src_filter = feat['build_src_filter'] + ' ' + build_src_filter
set_env_field('build_src_filter', [build_src_filter])
env.Replace(BUILD_SRC_FILTER=build_src_filter)

if 'lib_ignore' in feat:
blab("========== Adding lib_ignore for %s... " % feature, 2)
Expand Down
3 changes: 2 additions & 1 deletion buildroot/share/PlatformIO/scripts/marlin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def copytree(src, dst, symlinks=False, ignore=None):
shutil.copy2(s, d)

def replace_define(field, value):
for define in env['CPPDEFINES']:
envdefs = env['CPPDEFINES'].copy()
for define in envdefs:
if define[0] == field:
env['CPPDEFINES'].remove(define)
env['CPPDEFINES'].append((field, value))
Expand Down
2 changes: 1 addition & 1 deletion ini/due.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[env:DUE]
platform = atmelsam
board = due
src_filter = ${common.default_src_filter} +<src/HAL/DUE> +<src/HAL/shared/backtrace>
build_src_filter = ${common.default_src_filter} +<src/HAL/DUE> +<src/HAL/shared/backtrace>

[env:DUE_USB]
platform = atmelsam
Expand Down
2 changes: 1 addition & 1 deletion ini/esp32.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
platform = espressif32@2.1.0
board = esp32dev
build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0
src_filter = ${common.default_src_filter} +<src/HAL/ESP32>
build_src_filter = ${common.default_src_filter} +<src/HAL/ESP32>
lib_ignore = NativeEthernet
upload_speed = 500000
monitor_speed = 250000
Expand Down
390 changes: 195 additions & 195 deletions ini/features.ini

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions ini/native.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
platform = native
framework =
build_flags = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined
src_build_flags = -Wall -IMarlin/src/HAL/LINUX/include
build_src_flags = -Wall -IMarlin/src/HAL/LINUX/include
build_unflags = -Wall
lib_ldf_mode = off
lib_deps =
src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
build_src_filter = ${common.default_src_filter} +<src/HAL/LINUX>

#
# Native Simulation
Expand Down Expand Up @@ -125,6 +125,6 @@ build_unflags = ${simulator_macos.build_unflags}
[env:simulator_windows]
platform = ${simulator_common.platform}
extends = simulator_common
src_build_flags = ${simulator_common.src_build_flags} -fpermissive
build_src_flags = ${simulator_common.src_build_flags} -fpermissive
build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} -IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp
build_type = debug
2 changes: 1 addition & 1 deletion ini/samd51.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ platform = atmelsam
board = adafruit_grandcentral_m4
build_flags = ${common.build_flags} -std=gnu++17
build_unflags = -std=gnu++11
src_filter = ${common.default_src_filter} +<src/HAL/SAMD51>
build_src_filter = ${common.default_src_filter} +<src/HAL/SAMD51>
lib_deps = ${common.lib_deps}
SoftwareSerialM
extra_scripts = ${common.extra_scripts}
Expand Down
2 changes: 1 addition & 1 deletion ini/stm32f0.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ board = malyanm300_f070cb
build_flags = ${common_stm32.build_flags}
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB
-DHAL_UART_MODULE_ENABLED
src_filter = ${common.default_src_filter} +<src/HAL/STM32>
build_src_filter = ${common.default_src_filter} +<src/HAL/STM32>
2 changes: 1 addition & 1 deletion ini/stm32f1.ini
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ board = malyanm200_f103cb
build_flags = ${common_stm32.build_flags}
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB
-DHAL_UART_MODULE_ENABLED
src_filter = ${common.default_src_filter} +<src/HAL/STM32>
build_src_filter = ${common.default_src_filter} +<src/HAL/STM32>

#
# FLYmaker FLY Mini (STM32F103RCT6)
Expand Down
8 changes: 4 additions & 4 deletions ini/teensy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ lib_ignore = ${env:common_avr8.lib_ignore}, NativeEthernet
[env:teensy31]
platform = teensy@~4.12.0
board = teensy31
src_filter = ${common.default_src_filter} +<src/HAL/TEENSY31_32>
build_src_filter = ${common.default_src_filter} +<src/HAL/TEENSY31_32>
lib_ignore = NativeEthernet

#
Expand All @@ -33,13 +33,13 @@ lib_ignore = NativeEthernet
[env:teensy35]
platform = teensy@~4.12.0
board = teensy35
src_filter = ${common.default_src_filter} +<src/HAL/TEENSY35_36>
build_src_filter = ${common.default_src_filter} +<src/HAL/TEENSY35_36>
lib_ignore = NativeEthernet

[env:teensy36]
platform = teensy@~4.12.0
board = teensy36
src_filter = ${common.default_src_filter} +<src/HAL/TEENSY35_36>
build_src_filter = ${common.default_src_filter} +<src/HAL/TEENSY35_36>
lib_ignore = NativeEthernet

#
Expand All @@ -48,4 +48,4 @@ lib_ignore = NativeEthernet
[env:teensy41]
platform = teensy@~4.12.0
board = teensy41
src_filter = ${common.default_src_filter} +<src/HAL/TEENSY40_41>
build_src_filter = ${common.default_src_filter} +<src/HAL/TEENSY40_41>
Loading

0 comments on commit 4a373e1

Please sign in to comment.