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/find_cysectools.py b/boot/cypress/scripts/find_cysectools.py
new file mode 100644
index 0000000..7bea0fc
--- /dev/null
+++ b/boot/cypress/scripts/find_cysectools.py
@@ -0,0 +1,58 @@
+"""
+Copyright (c) 2019 Cypress Semiconductor Corporation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+import subprocess
+import sys
+
+package = 'cysecuretools'
+
+def find_cysectools(package_name):
+
+ """
+ Check if package exist in system and return its location if it does
+ """
+
+ pip_show = subprocess.Popen([sys.executable, '-m', 'pip', 'show', package],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+
+ stdout = pip_show.communicate()[0]
+ rc = pip_show.wait()
+
+ if (rc != 0):
+ print("No package with name " + package + " found")
+ exit(1)
+ else:
+ pip_show_info = stdout.decode("utf-8").splitlines()
+
+ for line in pip_show_info:
+ if 'Location:' in line:
+ location = line.replace('Location: ', '')
+
+ if sys.platform == 'win32':
+ return location.replace('\\','/')
+ else:
+ return location
+
+def main():
+ """
+ Call function and print output
+ """
+ cysecuretools_path = find_cysectools(package)
+
+ print(cysecuretools_path)
+
+if __name__ == "__main__":
+ main()
\ No newline at end of file