utils: add script to invoke autogeneration of files

This script should be run every time source files are updated.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
Gerard Marull-Paretas 2024-01-29 13:50:38 +01:00
parent 354acae8c8
commit 39082ce0f6
No known key found for this signature in database
GPG Key ID: A7B31A04C0E6C18F
1 changed files with 16 additions and 0 deletions

16
utils/generate.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
if [ -z "${ZEPHYR_BASE}" ]; then
echo "ZEPHYR_BASE is not set"
exit 1
fi
# FICR offsets for nRF54H20 (Eng0)
python ${SCRIPT_DIR}/gen_offsets.py \
--svd "${SCRIPT_DIR}/../nrfx/mdk/nrf54h20_enga_application.svd" \
--output "${ZEPHYR_BASE}/include/zephyr/dt-bindings/misc/nordic-nrf-ficr-nrf54h20-eng0.h" \
--peripheral GLOBAL_FICR_NS \
--guard ZEPHYR_INCLUDE_DT_BINDINGS_MISC_NORDIC_NRF_FICR_NRF54H20_ENG0_H_ \
--prefix NRF_FICR_