STM32F103RE_SKR_E3_DIP.py 425 B

123456789101112
  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/STM32F103RE_SKR_E3_DIP.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