2021-04-27 11:49:21 +02:00
|
|
|
#
|
2021-11-04 11:28:42 +01:00
|
|
|
# custom_board.py
|
2021-04-27 11:49:21 +02:00
|
|
|
#
|
2021-06-29 23:25:37 +02: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-11-04 11:28:42 +01:00
|
|
|
import pioutil
|
|
|
|
if pioutil.is_pio_build():
|
2022-08-19 18:00:52 +02:00
|
|
|
import marlin
|
|
|
|
board = marlin.env.BoardConfig()
|
2021-04-27 11:49:21 +02:00
|
|
|
|
2022-08-19 18:00:52 +02:00
|
|
|
address = board.get("build.address", "")
|
|
|
|
if address:
|
|
|
|
marlin.relocate_firmware(address)
|
2021-04-27 11:49:21 +02:00
|
|
|
|
2022-08-19 18:00:52 +02:00
|
|
|
ldscript = board.get("build.ldscript", "")
|
|
|
|
if ldscript:
|
|
|
|
marlin.custom_ld_script(ldscript)
|