From b354fe21d639cd2e0dd06e4c998ca122d6b55fd6 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Sat, 8 Feb 2025 22:06:04 -0800 Subject: [PATCH] Standalone image2elf.py This is useful for the case where the app partition is already in a standalone file. --- image2elf.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 image2elf.py diff --git a/image2elf.py b/image2elf.py new file mode 100644 index 0000000..a43e9af --- /dev/null +++ b/image2elf.py @@ -0,0 +1,16 @@ +import argparse +from esp32_image_parser import image2elf + +def main(): + desc = 'ESP32 Firmware Image Parser Utility' + arg_parser = argparse.ArgumentParser(description=desc) + arg_parser.add_argument('input', help='App partition input file. (If the app partition is part of a complete firmware file, use "esp32_image_parser image2elf" instead.)') + arg_parser.add_argument('output', help='Output file name') + arg_parser.add_argument('-v', default=False, help='Verbose output', action='store_true') + + args = arg_parser.parse_args() + image2elf(args.input, args.output, args.v) + + +if __name__ == '__main__': + main()