Infineon: Switch to 1.9.0 code base, add xmc7000 family support, refactor memory layer
diff --git a/ci/espressif_install.sh b/ci/espressif_install.sh
new file mode 100755
index 0000000..db32200
--- /dev/null
+++ b/ci/espressif_install.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+# SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
+# SPDX-License-Identifier: Apache-2.0
+
+SCRIPT_ROOTDIR=$(dirname "$(realpath "${BASH_SOURCE[0]}")")
+MCUBOOT_ROOTDIR=$(realpath "${SCRIPT_ROOTDIR}/..")
+ESPRESSIF_ROOT="${MCUBOOT_ROOTDIR}/boot/espressif"
+IDF_PATH="${ESPRESSIF_ROOT}/hal/esp-idf"
+
+set -eo pipefail
+
+install_imgtool() {
+    pip install imgtool
+}
+
+install_idf() {
+    "${IDF_PATH}"/install.sh
+}
+
+install_imgtool
+install_idf
diff --git a/ci/espressif_run.sh b/ci/espressif_run.sh
new file mode 100755
index 0000000..5610468
--- /dev/null
+++ b/ci/espressif_run.sh
@@ -0,0 +1,54 @@
+#!/usr/bin/env bash
+# SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
+# SPDX-License-Identifier: Apache-2.0
+
+SCRIPT_ROOTDIR=$(dirname "$(realpath "${BASH_SOURCE[0]}")")
+MCUBOOT_ROOTDIR=$(realpath "${SCRIPT_ROOTDIR}/..")
+ESPRESSIF_ROOT="${MCUBOOT_ROOTDIR}/boot/espressif"
+IDF_PATH="${ESPRESSIF_ROOT}/hal/esp-idf"
+
+set -eo pipefail
+
+prepare_environment() {
+  # Prepare the environment for ESP-IDF
+
+  . "${IDF_PATH}"/export.sh
+}
+
+build_mcuboot() {
+  local target=${1}
+  local feature=${2}
+  local toolchain_file="${ESPRESSIF_ROOT}/tools/toolchain-${target}.cmake"
+  local mcuboot_config="${ESPRESSIF_ROOT}/bootloader.conf"
+  local build_dir=".build-${target}"
+
+  if [ -n "${feature}" ]; then
+    mcuboot_config="${ESPRESSIF_ROOT}/secureboot-${feature}.conf"
+    build_dir=".build-${target}-${feature}"
+  fi
+
+  # Build MCUboot for selected target
+
+  cd "${MCUBOOT_ROOTDIR}" &>/dev/null
+  cmake -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}"  \
+        -DMCUBOOT_TARGET="${target}"                \
+        -DMCUBOOT_CONFIG_FILE="${mcuboot_config}"   \
+        -DIDF_PATH="${IDF_PATH}"                    \
+        -B "${build_dir}"                           \
+        "${ESPRESSIF_ROOT}"
+  cmake --build "${build_dir}"/
+}
+
+prepare_environment
+
+if [ -n "${MCUBOOT_FEATURES}" ]; then
+  IFS=','
+  read -ra target_list <<< "${MCUBOOT_TARGETS}"
+  for target in "${target_list[@]}"; do
+    read -ra feature_list <<< "${MCUBOOT_FEATURES}"
+    for feature in "${feature_list[@]}"; do
+      echo "Building MCUboot for \"${target}\" with support for \"${feature}\""
+      build_mcuboot "${target}" "${feature}"
+    done
+  done
+fi