creality.py 412 B

12345678910111213
  1. import os, marlin
  2. Import("env")
  3. # Relocate firmware from 0x08000000 to 0x08007000
  4. marlin.relocate_firmware("0x08007000")
  5. custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/creality.ld")
  6. for i, flag in enumerate(env['LINKFLAGS']):
  7. if "-Wl,-T" in flag:
  8. env['LINKFLAGS'][i] = "-Wl,-T" + custom_ld_script
  9. elif flag == "-T":
  10. env['LINKFLAGS'][i + 1] = custom_ld_script