uf2_ext.py 744 B

123456789101112131415161718192021222324
  1. from idf_py_actions.tools import ensure_build_directory, run_target
  2. def action_extensions(base_actions, project_path):
  3. def uf2_target(target_name, ctx, args):
  4. ensure_build_directory(args, ctx.info_name)
  5. run_target(target_name, args)
  6. uf2_actions = {
  7. 'actions': {
  8. 'uf2': {
  9. 'callback': uf2_target,
  10. 'short_help': 'Generate the UF2 binary with all the binaries included',
  11. 'dependencies': ['all'],
  12. },
  13. 'uf2-app': {
  14. 'callback': uf2_target,
  15. 'short_help': 'Generate an UF2 binary for the application only',
  16. 'dependencies': ['all'],
  17. },
  18. }
  19. }
  20. return uf2_actions