Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
890 B

  1. import os
  2. def ldscripts_inject_libpath(env):
  3. platform = env.PioPlatform()
  4. framework_dir = platform.get_package_dir("framework-arduinoespressif8266")
  5. libpath_base = os.path.join("$PROJECT_DIR", "..", "dist", "ld")
  6. # we depend on different ldscript formats for old Core version
  7. # TODO: 1.5.0 needs to be removed next release
  8. # TODO: ldscript can be kept in the root of the repo
  9. # (as this was done originally, during 2.3.0...2.4.2 times)
  10. if platform.version == "1.5.0":
  11. libpath_sdk = os.path.join(framework_dir, "tools", "sdk", "ld")
  12. env.Append(LIBPATH=[libpath_sdk])
  13. env.Prepend(LIBPATH=[os.path.join(libpath_base, "pre_2.5.0")])
  14. else:
  15. local_ld = env.subst(
  16. os.path.join("$BUILD_DIR", "ld", "local.eagle.app.v6.common.ld")
  17. )
  18. env.Prepend(LIBPATH=[os.path.join(libpath_base, "latest")])