#!/usr/bin/env bash
set -euo pipefail
# Some memory utility functions need to be defined both in bootloader and app contexts.
# To avoid adding bootloader_support as a public dependency of every component,
# and to avoid adding esp_hw_support as a bootloader dependency, some code is duplicated
# between two memory utils files. This script checks that the duplicated code is in sync.
esp_hw_support_header="${IDF_PATH}/components/esp_hw_support/include/esp_memory_utils.h"
bootloader_support_header="${IDF_PATH}/components/bootloader_support/include/bootloader_memory_utils.h"
bootloader_support_start="The content of this file is to be kept in sync with the common section of esp_memory_utils.h"
bootloader_support_end="End of the common section that has to be in sync with esp_memory_utils.h"
esp_hw_support_start="Common functions, to be kept in sync with bootloader_memory_utils.h"
esp_hw_support_end="End of common functions to be kept in sync with bootloader_memory_utils.h"
# get_file_part