1#!/bin/sh
2
3SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
4
5if [ -z "${ZEPHYR_BASE}" ]; then
6    echo "ZEPHYR_BASE is not set"
7    exit 1
8fi
9
10# FICR offsets for nRF54H20 (Eng0)
11python ${SCRIPT_DIR}/gen_offsets.py \
12    --svd "${SCRIPT_DIR}/../nrfx/mdk/nrf54h20_enga_application.svd" \
13    --output "${ZEPHYR_BASE}/include/zephyr/dt-bindings/misc/nordic-nrf-ficr-nrf54h20-eng0.h" \
14    --peripheral GLOBAL_FICR_NS \
15    --guard ZEPHYR_INCLUDE_DT_BINDINGS_MISC_NORDIC_NRF_FICR_NRF54H20_ENG0_H_ \
16    --prefix NRF_FICR_
17