2021-04-27 04:49:21 -05:00
|
|
|
#
|
|
|
|
# buildroot/share/PlatformIO/scripts/custom_board.py
|
|
|
|
#
|
2021-06-29 16:25:37 -05:00
|
|
|
# - 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
|
|
|
|
#
|
2021-04-27 04:49:21 -05:00
|
|
|
import marlin
|
|
|
|
board = marlin.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)
|