custom_board.py 495 B

123456789101112131415161718
  1. #
  2. # custom_board.py
  3. #
  4. # - For build.address replace VECT_TAB_ADDR to relocate the firmware
  5. # - For build.ldscript use one of the linker scripts in buildroot/share/PlatformIO/ldscripts
  6. #
  7. import pioutil
  8. if pioutil.is_pio_build():
  9. import marlin
  10. board = pioutil.env.BoardConfig()
  11. address = board.get("build.address", "")
  12. if address:
  13. marlin.relocate_firmware(address)
  14. ldscript = board.get("build.ldscript", "")
  15. if ldscript:
  16. marlin.custom_ld_script(ldscript)