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 703B

12345678910111213141516171819202122232425262728
  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_stm32
  6. # - env:flsun_hispeedv1
  7. # - env:mks_robin_nano35_stm32
  8. #
  9. Import("env")
  10. from SCons.Script import DefaultEnvironment
  11. board = DefaultEnvironment().BoardConfig()
  12. if 'firmware' in board.get("build").keys():
  13. import marlin
  14. # Encrypt ${PROGNAME}.bin and save it as build.firmware
  15. def encrypt(source, target, env):
  16. marlin.encrypt_mks(source, target, env, "build.firmware")
  17. marlin.add_post_action(encrypt);
  18. else:
  19. import sys
  20. print("You need to define output file via board_build.firmware = 'filename' parameter", file=sys.stderr)
  21. env.Exit(1);