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.

38 lines
1.1 KiB

  1. # Run this script every time building an env:
  2. from espurna_utils import (
  3. check_printsize,
  4. remove_float_support,
  5. ldscripts_inject_libpath,
  6. lwip_inject_patcher,
  7. app_inject_revision,
  8. dummy_ets_printf
  9. )
  10. Import("env", "projenv")
  11. # Always show warnings for project code
  12. projenv.ProcessUnFlags("-w")
  13. # 2.4.0 and up
  14. remove_float_support(env)
  15. ldscripts_inject_libpath(env)
  16. # two-step update hint when using 1MB boards
  17. env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", check_printsize)
  18. # disable postmortem printing to the uart. another one is in eboot, but this is what causes the most harm
  19. if "DISABLE_POSTMORTEM_STACKDUMP" in env["CPPFLAGS"]:
  20. env.AddPostAction(
  21. "$BUILD_DIR/FrameworkArduino/core_esp8266_postmortem.c.o", dummy_ets_printf
  22. )
  23. env.AddPostAction(
  24. "$BUILD_DIR/FrameworkArduino/core_esp8266_postmortem.cpp.o", dummy_ets_printf
  25. )
  26. # patch lwip1 sources conditionally:
  27. # https://github.com/xoseperez/espurna/issues/1610
  28. lwip_inject_patcher(env)
  29. # when using git, add -DAPP_REVISION=(git-commit-hash)
  30. app_inject_revision(projenv)