From 95fcd9cb9793076a636f8ddad4c6b92014ea352c Mon Sep 17 00:00:00 2001 From: Marcin Jaworski Date: Thu, 17 Jun 2021 10:21:45 +0200 Subject: [PATCH 1/3] Update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e43b0f9..64777da 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +__pycache__/ .DS_Store From 27d4218dc7941508acc2326ce726b6fcca914a10 Mon Sep 17 00:00:00 2001 From: Marcin Jaworski Date: Thu, 17 Jun 2021 10:22:41 +0200 Subject: [PATCH 2/3] Add no DMA variant of .dram0.data --- esp32_image_parser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/esp32_image_parser.py b/esp32_image_parser.py index 6503cf7..f451768 100755 --- a/esp32_image_parser.py +++ b/esp32_image_parser.py @@ -53,6 +53,7 @@ def image2elf(filename, output_file, verbose=False): section_map = { 'DROM' : '.flash.rodata', 'BYTE_ACCESSIBLE, DRAM, DMA': '.dram0.data', + 'BYTE_ACCESSIBLE, DRAM': '.dram0.data', 'IROM' : '.flash.text', #'RTC_IRAM' : '.rtc.text' TODO } From 99376447aed4119a229396fab50a0cce149626a6 Mon Sep 17 00:00:00 2001 From: Marcin Jaworski Date: Thu, 17 Jun 2021 10:32:53 +0200 Subject: [PATCH 3/3] Add a cli option to allow creating elf file from just a single app image, instead of full flash dump --- esp32_image_parser.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/esp32_image_parser.py b/esp32_image_parser.py index f451768..4ff679e 100755 --- a/esp32_image_parser.py +++ b/esp32_image_parser.py @@ -221,6 +221,7 @@ def main(): arg_parser.add_argument('-output', help='Output file name') arg_parser.add_argument('-nvs_output_type', help='output type for nvs dump', type=str, choices=["text","json"], default="text") arg_parser.add_argument('-partition', help='Partition name (e.g. ota_0)') + arg_parser.add_argument('-appimage', default=False, action='store_true', help='Input file is a single application binary image instead of flash dump') arg_parser.add_argument('-v', default=False, help='Verbose output', action='store_true') args = arg_parser.parse_args() @@ -231,6 +232,13 @@ def main(): if args.action == 'show_partitions' or args.v is True: verbose = True + if args.appimage: + if args.action != "create_elf": + print("appimage option can only be used with create_elf action") + if args.output is None: + print("Need output file name") + image2elf(args.input, args.output) + # parse that ish part_table = read_partition_table(fh, verbose)