1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-12-01 23:58:33 +00:00
MarlinFirmware/buildroot/share/PlatformIO/scripts/custom_board.py
Andrew 959be66cc2
🔨 Build scripts cleanup (#27157)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-06-14 16:01:34 -05:00

19 lines
495 B
Python

#
# custom_board.py
#
# - For build.address replace VECT_TAB_ADDR to relocate the firmware
# - For build.ldscript use one of the linker scripts in buildroot/share/PlatformIO/ldscripts
#
import pioutil
if pioutil.is_pio_build():
import marlin
board = pioutil.env.BoardConfig()
address = board.get("build.address", "")
if address:
marlin.relocate_firmware(address)
ldscript = board.get("build.ldscript", "")
if ldscript:
marlin.custom_ld_script(ldscript)