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.

mks_encrypt.py 740B

1234567891011121314151617181920212223242526272829
  1. #
  2. # buildroot/share/PlatformIO/scripts/mks_encrypt.py
  3. #
  4. # Apply encryption and save as 'build.firmware' for these environments:
  5. # - env:mks_robin
  6. # - env:mks_robin_e3
  7. # - env:flsun_hispeedv1
  8. # - env:mks_robin_nano35
  9. #
  10. Import("env")
  11. from SCons.Script import DefaultEnvironment
  12. board = DefaultEnvironment().BoardConfig()
  13. if 'encrypt' in board.get("build").keys():
  14. import marlin
  15. # Encrypt ${PROGNAME}.bin and save it with the name given in build.encrypt
  16. def encrypt(source, target, env):
  17. marlin.encrypt_mks(source, target, env, board.get("build.encrypt"))
  18. marlin.add_post_action(encrypt);
  19. else:
  20. import sys
  21. print("You need to define output file via board_build.encrypt = 'filename' parameter", file=sys.stderr)
  22. env.Exit(1);