Infineon: Add cyw20829 platform, shared slot feature, json memory map, psoc6 xip
Based in 1.8.0 release of MCUBoot library
This commit adds CYW20829 Infineon platform support with following capabilities:
1. Overwrite and swap upgrade mode support
2. Multi-image with up to 4 images
3. Hardware security counter is supported for CYW20829 platform
Add XIP support for PSOC6 platform - place BOOT slot in external memory and execute it in place using SMIF in XIP mode
and some new features for Infineon devices.
1. Shared upgrade slot feature - use one shared area for upgrade slots of multiple images
2. Memory map defined using JSON file - define memory regions for bootloader and user app in conventional way using JSON file
diff --git a/boot/cypress/scripts/verbose_make.py b/boot/cypress/scripts/verbose_make.py
new file mode 100644
index 0000000..c9cc037
--- /dev/null
+++ b/boot/cypress/scripts/verbose_make.py
@@ -0,0 +1,49 @@
+"""VERBOSE Makefile Generator
+Copyright (c) 2022 Infineon Technologies AG
+"""
+
+import os
+import re
+import sys
+
+
+def main():
+ """VERBOSE Makefile Generator"""
+ if len(sys.argv) != 2:
+ print(f'Usage: {sys.argv[0]} <makefile>\n', file=sys.stderr)
+ sys.exit(1)
+
+ with open(sys.argv[1], 'r', encoding='UTF-8') as mk_file:
+ mk_vars = {}
+
+ for line in mk_file:
+ line = line.strip()
+
+ if re.search(r'\s*#', line): # skip comments
+ continue
+
+ match = re.search(r'^\t*([A-Za-z_]\w+)\s*[+:?]=', line)
+ if match: # set variable
+ var = match.group(1)
+ mk_vars[var] = 1 | mk_vars.get(var, 0)
+
+ match = re.findall(r'\$\(([A-Za-z_]\w+)\)', line)
+ for var in match: # get variable(s)
+ mk_vars[var] = 2 | mk_vars.get(var, 0)
+
+ if mk_vars.get('VERBOSE'):
+ del mk_vars['VERBOSE']
+
+ print('''\
+###############################################################################
+# Print debug information about all settings used and/or set in this file
+ifeq ($(VERBOSE), 1)''')
+ print(f'$(info #### {os.path.basename(sys.argv[1])} ####)')
+ dirs = (None, '-->', '<--', '<->')
+ for var in sorted(mk_vars.keys()):
+ print(f'$(info {var} {dirs[mk_vars[var]]} $({var}))')
+ print('endif')
+
+
+if __name__ == '__main__':
+ main()