My Marlin configs for Fabrikator Mini and CTC i3 Pro B
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.

openblt.py 519B

1234567891011121314151617181920
  1. #
  2. # Convert the ELF to an SREC file suitable for some bootloaders
  3. #
  4. import pioutil
  5. if pioutil.is_pio_build():
  6. import os,sys
  7. from os.path import join
  8. Import("env")
  9. board = env.BoardConfig()
  10. board_keys = board.get("build").keys()
  11. if 'encrypt' in board_keys:
  12. env.AddPostAction(
  13. join("$BUILD_DIR", "${PROGNAME}.bin"),
  14. env.VerboseAction(" ".join([
  15. "$OBJCOPY", "-O", "srec",
  16. "\"$BUILD_DIR/${PROGNAME}.elf\"", "\"" + join("$BUILD_DIR", board.get("build.encrypt")) + "\""
  17. ]), "Building $TARGET")
  18. )