🔨 PlatformIO 6 compatibility

This commit is contained in:
Scott Lahteine
2023-07-18 20:14:31 -05:00
parent ac7ee4b94a
commit 9dd0d1a2cf
135 changed files with 373 additions and 387 deletions

View File

@@ -0,0 +1,17 @@
#
# buildroot/share/PlatformIO/scripts/marlin.py
# Helper module with some commonly-used functions
#
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
def replace_define(field, value):
envdefs = env['CPPDEFINES'].copy()
for define in envdefs:
if define[0] == field:
env['CPPDEFINES'].remove(define)
env['CPPDEFINES'].append((field, value))
# Relocate the firmware to a new address, such as "0x08005000"
def relocate_firmware(address):
replace_define("VECT_TAB_ADDR", address)