Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,10 @@ tools/unit-tests/unit-stm32h7-trailer-journal
tools/unit-tests/unit-stm32l4-write
tools/unit-tests/unit-stm32u3-flash-write
tools/unit-tests/unit-stm32wb-write
tools/unit-tests/unit-stm32-tz-nsdata
tools/unit-tests/unit-stm32-tz-nsdata-none
tools/unit-tests/unit-stm32-tz-nsdata-salias
tools/unit-tests/unit-stm32-tz-nsdata-sapp
tools/unit-tests/unit-t10xx-flash-status
tools/unit-tests/unit-ti-hercules-erase
tools/unit-tests/unit-update-disk-fsp
Expand Down
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,14 @@ if(ARCH STREQUAL "ARM")
# TrustZone support for Cortex-M33 targets
if(TZEN)
list(APPEND WOLFBOOT_DEFS TZEN)
# non-secure application data outside the partitions (STM32L5/U5/H5)
if(WOLFBOOT_NS_DATA_ADDRESS)
if(NOT WOLFBOOT_NS_DATA_SIZE)
message(FATAL_ERROR "WOLFBOOT_NS_DATA_ADDRESS requires WOLFBOOT_NS_DATA_SIZE")
endif()
list(APPEND WOLFBOOT_DEFS WOLFBOOT_NS_DATA_ADDRESS=${WOLFBOOT_NS_DATA_ADDRESS}
WOLFBOOT_NS_DATA_SIZE=${WOLFBOOT_NS_DATA_SIZE})
endif()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m33")
list(APPEND WOLFBOOT_COMPILE_OPTIONS -mcmse)
list(APPEND WOLFBOOT_LINK_OPTIONS -mcmse)
Expand Down
31 changes: 31 additions & 0 deletions docs/STM32-TZ.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,37 @@ wolfBoot provides a few Non-Secure Callable functions to allow a non-secure
application to perform certain operations that must be run from the secure
domain. For more information, see [API](API.md#nsc-api).

### Non-secure data outside the partitions

The SAU windows wolfBoot opens for the non-secure application cover the boot
partition, the non-secure RAM, the peripherals and the NSC area. An
application that keeps data in flash outside the partitions (device
credentials, settings, a key blob) names that area in `.config` and wolfBoot
adds a SAU region for it on STM32L5, STM32U5 and STM32H5:

```
WOLFBOOT_NS_DATA_ADDRESS?=0x081A2000
WOLFBOOT_NS_DATA_SIZE?=0x6000
```

Both must be multiples of 32 bytes (the SAU granularity), and the area must
Comment thread
dgarske marked this conversation as resolved.
Resolved
lie above wolfBoot, inside internal flash and clear of the boot, update and
swap partitions; the build stops otherwise. Flash is erased a whole page at a
time (8 KB on STM32H5 and STM32U5, 2 KB on STM32L5 in the dual-bank mode
wolfBoot uses), so an area the application rewrites should start and end on
page boundaries and have its pages to itself, the last one included when the
data ends partway through it. The same pages must be non-secure in the flash
watermark option bytes (`SECWM`), which wolfBoot does not change at run
time. On STM32H5 the area starts on a sector boundary above the swap
partition in bank 2, so `SECWM2_END` stops at the sector before it (`0x50`
for the example above with `stm32h5.config`); on STM32L5 and STM32U5 bank 2
is already non-secure. `tools/scripts/set-stm32-tz-option-bytes.sh` takes
the two variables into account and refuses an STM32H5 area that would leave
part of the update or swap partition non-secure. The application then reads the area
through its non-secure alias and programs it through the non-secure flash
registers. A `WOLFBOOT_SECURE_APP` build has no non-secure application and
opens no window.

### Example using STM32L552

- Copy the example configuration for STM32-L5 with support for wolfCrypt in
Expand Down
5 changes: 5 additions & 0 deletions docs/Targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,11 @@ The example configuration for this scenario is available in [/config/examples/st

For a full list of all the option bytes tested with this configuration, refer to [STM32-TZ.md](/docs/STM32-TZ.md).

A non-secure application that keeps data in flash above the partitions (for
example device credentials) names the area with `WOLFBOOT_NS_DATA_ADDRESS` and
`WOLFBOOT_NS_DATA_SIZE` in `.config`; see
[Non-secure data outside the partitions](/docs/STM32-TZ.md#non-secure-data-outside-the-partitions).

You can use the "update" command and XMODEM to send a newly signed update (see docs/flash-OTP.md) or use the steps below using the STM32_Programmer:

```sh
Expand Down
66 changes: 66 additions & 0 deletions hal/stm32_tz.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,68 @@ void hal_gtzc_init(void)
}
#endif

#if defined(WOLFBOOT_NS_DATA_ADDRESS) && defined(WOLFBOOT_NS_DATA_SIZE) && \
!defined(WOLFBOOT_SECURE_APP) && defined(PULL_LINKER_DEFINES)
#error "WOLFBOOT_NS_DATA_ADDRESS needs the partition addresses at build time (not PULL_LINKER_DEFINES)"
#endif
#if defined(WOLFBOOT_NS_DATA_ADDRESS) && defined(WOLFBOOT_NS_DATA_SIZE) && \
!defined(WOLFBOOT_SECURE_APP) && !defined(PULL_LINKER_DEFINES)
Comment thread
dgarske marked this conversation as resolved.
Resolved
/* The SAU works in 32-byte units, and the area must keep clear of wolfBoot
* and of the partitions, which updates erase. Checked in the non-secure
* alias, since the partitions may be given in the secure one. */
#define NS_DATA_FLASH(a) ((a) & ~0x04000000UL)
#define NS_DATA_OVERLAPS(base, len) \
((NS_DATA_FLASH(WOLFBOOT_NS_DATA_ADDRESS) < \
(NS_DATA_FLASH(base) + (len))) && \
(NS_DATA_FLASH(base) < \
(NS_DATA_FLASH(WOLFBOOT_NS_DATA_ADDRESS) + WOLFBOOT_NS_DATA_SIZE)))
#if ((WOLFBOOT_NS_DATA_SIZE) == 0) || \
(((WOLFBOOT_NS_DATA_ADDRESS) % 32) != 0) || \
(((WOLFBOOT_NS_DATA_SIZE) % 32) != 0)
#error "WOLFBOOT_NS_DATA_ADDRESS and _SIZE must be non-zero multiples of 32"
#endif
#if ((WOLFBOOT_NS_DATA_ADDRESS) + (WOLFBOOT_NS_DATA_SIZE)) > 0x100000000
Comment thread
dgarske marked this conversation as resolved.
Resolved
#error "WOLFBOOT_NS_DATA_ADDRESS + WOLFBOOT_NS_DATA_SIZE passes 4 GB"
#endif
#if (NS_DATA_FLASH(WOLFBOOT_NS_DATA_ADDRESS) < FLASHMEM_ADDRESS_SPACE) || \
((NS_DATA_FLASH(WOLFBOOT_NS_DATA_ADDRESS) + (WOLFBOOT_NS_DATA_SIZE)) > \
((FLASH_TOP) + 1ULL))
#error "WOLFBOOT_NS_DATA_ADDRESS and _SIZE must stay inside internal flash"
#endif
#if NS_DATA_FLASH(WOLFBOOT_NS_DATA_ADDRESS) < \
NS_DATA_FLASH(WOLFBOOT_PARTITION_BOOT_ADDRESS)
#error "WOLFBOOT_NS_DATA_ADDRESS must be above wolfBoot"
#endif
#if NS_DATA_OVERLAPS(WOLFBOOT_PARTITION_BOOT_ADDRESS, WOLFBOOT_PARTITION_SIZE)
#error "WOLFBOOT_NS_DATA_ADDRESS overlaps the boot partition"
#endif
#if NS_DATA_OVERLAPS(WOLFBOOT_PARTITION_UPDATE_ADDRESS, \
WOLFBOOT_PARTITION_UPDATE_SIZE)
#error "WOLFBOOT_NS_DATA_ADDRESS overlaps the update partition"
#endif
#if NS_DATA_OVERLAPS(WOLFBOOT_PARTITION_SWAP_ADDRESS, WOLFBOOT_SECTOR_SIZE)
#error "WOLFBOOT_NS_DATA_ADDRESS overlaps the swap partition"
#endif
#endif

/* Non-secure application data kept in flash outside the partitions (device
* credentials, settings): a SAU window over WOLFBOOT_NS_DATA_ADDRESS for
* WOLFBOOT_NS_DATA_SIZE bytes. The same pages must be non-secure in the
* SECWM option bytes, which hal_tz_release_nonsecure_area does not touch.
* A secure application has no non-secure side, so it gets no window. */
static void sau_init_ns_data(uint32_t region)
{
#if defined(WOLFBOOT_NS_DATA_ADDRESS) && defined(WOLFBOOT_NS_DATA_SIZE) && \
!defined(WOLFBOOT_SECURE_APP)
/* the window is in the non-secure alias, whichever one is configured */
uint32_t start = (uint32_t)(WOLFBOOT_NS_DATA_ADDRESS) & ~0x04000000UL;
Comment thread
dgarske marked this conversation as resolved.
Resolved

sau_init_region(region, start, start + WOLFBOOT_NS_DATA_SIZE - 1, 0);
#else
(void)region;
#endif
}

#ifdef TARGET_stm32h5

void hal_tz_sau_init(void)
Expand Down Expand Up @@ -369,6 +431,8 @@ void hal_tz_sau_init(void)
/* Set as non-secure: OTP + RO area */
sau_init_region(4, 0x08FFF000, 0x08FFFFFF, 0);

sau_init_ns_data(5);

/* Enable SAU */
SAU_CTRL = SAU_INIT_CTRL_ENABLE;

Expand Down Expand Up @@ -401,6 +465,8 @@ void hal_tz_sau_init(void)
sau_init_region(3, 0x40000000, 0x4FFFFFFF, 0);
#endif

sau_init_ns_data(5);

/* Enable SAU */
SAU_CTRL = SAU_INIT_CTRL_ENABLE;

Expand Down
9 changes: 9 additions & 0 deletions options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2571,6 +2571,15 @@ endif

ifeq ($(TZEN),1)
CFLAGS+=-DTZEN
# non-secure application data outside the partitions (STM32L5/U5/H5):
# a SAU window the non-secure image may read and program
ifneq ($(WOLFBOOT_NS_DATA_ADDRESS),)
ifeq ($(WOLFBOOT_NS_DATA_SIZE),)
$(error WOLFBOOT_NS_DATA_ADDRESS requires WOLFBOOT_NS_DATA_SIZE)
endif
CFLAGS+=-DWOLFBOOT_NS_DATA_ADDRESS=$(WOLFBOOT_NS_DATA_ADDRESS)
CFLAGS+=-DWOLFBOOT_NS_DATA_SIZE=$(WOLFBOOT_NS_DATA_SIZE)
Comment thread
dgarske marked this conversation as resolved.
Resolved
endif
endif

ifeq ($(WOLFBOOT_SECURE_APP),1)
Expand Down
1 change: 1 addition & 0 deletions tools/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ CONFIG_VARS:= ARCH TARGET SIGN HASH MCUXSDK MCUXPRESSO MCUXPRESSO_CPU MCUXPRESSO
WOLFBOOT_PARTITION_SIZE WOLFBOOT_SECTOR_SIZE WOLFBOOT_RAM_SIZE \
WOLFBOOT_PARTITION_BOOT_ADDRESS WOLFBOOT_PARTITION_UPDATE_ADDRESS \
WOLFBOOT_PARTITION_SWAP_ADDRESS WOLFBOOT_LOAD_ADDRESS \
WOLFBOOT_NS_DATA_ADDRESS WOLFBOOT_NS_DATA_SIZE \
WOLFBOOT_LOAD_DTS_ADDRESS WOLFBOOT_LOAD_RAMDISK_ADDRESS \
WOLFBOOT_LOAD_KERNEL_ADDRESS \
WOLFBOOT_VERSION_SECTION \
Expand Down
48 changes: 42 additions & 6 deletions tools/scripts/set-stm32-tz-option-bytes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,68 @@ if [ ! -f .config ]; then
fi


TARGET="$(awk -F '?=|:=|=' '$1 == "TARGET" { print $2 }' .config)"
TARGET="$(awk -F '[?]=|:=|=' '$1 == "TARGET" { print $2 }' .config)"
if [ -z "$TARGET" -o \( "$TARGET" != "stm32h5" -a "$TARGET" != "stm32l5" -a "$TARGET" != "stm32u5" \) ]; then
echo "Error: target found in .config: '$TARGET'." >&2
echo "This script only supports the targets stm32h5, stm32l5 and stm32u5." >&2
exit 1
fi

TZEN="$(awk -F '?=|:=|=' '$1 == "TZEN" { print $2 }' .config)"
TZEN="$(awk -F '[?]=|:=|=' '$1 == "TZEN" { print $2 }' .config)"
if [ -z "$TZEN" -o "$TZEN" != 1 ]; then
echo "Error: this script requires a .config with TZEN=1" >&2
exit 1
fi

FLASH_OFFSET=0x08000000

WOLFBOOT_PARTITION_BOOT_ADDRESS="$(awk -F '?=|:=|=' '$1 == "WOLFBOOT_PARTITION_BOOT_ADDRESS" { print $2 }' .config)"
WOLFBOOT_PARTITION_SIZE="$(awk -F '?=|:=|=' '$1 == "WOLFBOOT_PARTITION_SIZE" { print $2 }' .config)"
WOLFBOOT_SECTOR_SIZE="$(awk -F '?=|:=|=' '$1 == "WOLFBOOT_SECTOR_SIZE" { print $2 }' .config)"
DUALBANK_SWAP="$(awk -F '?=|:=|=' '$1 == "DUALBANK_SWAP" { print $2 }' .config)"
WOLFBOOT_PARTITION_BOOT_ADDRESS="$(awk -F '[?]=|:=|=' '$1 == "WOLFBOOT_PARTITION_BOOT_ADDRESS" { print $2 }' .config)"
WOLFBOOT_PARTITION_SIZE="$(awk -F '[?]=|:=|=' '$1 == "WOLFBOOT_PARTITION_SIZE" { print $2 }' .config)"
WOLFBOOT_SECTOR_SIZE="$(awk -F '[?]=|:=|=' '$1 == "WOLFBOOT_SECTOR_SIZE" { print $2 }' .config)"
DUALBANK_SWAP="$(awk -F '[?]=|:=|=' '$1 == "DUALBANK_SWAP" { print $2 }' .config)"

last_wolfboot_sector=$(((WOLFBOOT_PARTITION_BOOT_ADDRESS - FLASH_OFFSET - 1) / WOLFBOOT_SECTOR_SIZE))
last_wolfboot_sector_hex="$(printf "0x%x" "$last_wolfboot_sector")"

last_partition_sector=$((last_wolfboot_sector + WOLFBOOT_PARTITION_SIZE / WOLFBOOT_SECTOR_SIZE))
last_partition_sector_hex="$(printf "0x%x" "$last_partition_sector")"

# Non-secure application data outside the partitions (WOLFBOOT_NS_DATA_ADDRESS
# and _SIZE). On STM32H5 the bank 2 watermark covers the whole bank, so it
# stops at the sector before the data area, which must start on a sector
# boundary above the update and swap partitions and end inside bank 2. On
# STM32L5 and STM32U5 bank 2 is non-secure already.
WOLFBOOT_NS_DATA_ADDRESS="$(awk -F '[?]=|:=|=' '$1 == "WOLFBOOT_NS_DATA_ADDRESS" { print $2 }' .config)"
WOLFBOOT_NS_DATA_SIZE="$(awk -F '[?]=|:=|=' '$1 == "WOLFBOOT_NS_DATA_SIZE" { print $2 }' .config)"
if [ "$TARGET" = stm32h5 ] && [ -n "$WOLFBOOT_NS_DATA_ADDRESS" ]; then
WOLFBOOT_PARTITION_UPDATE_ADDRESS="$(awk -F '[?]=|:=|=' '$1 == "WOLFBOOT_PARTITION_UPDATE_ADDRESS" { print $2 }' .config)"
WOLFBOOT_PARTITION_SWAP_ADDRESS="$(awk -F '[?]=|:=|=' '$1 == "WOLFBOOT_PARTITION_SWAP_ADDRESS" { print $2 }' .config)"
WOLFBOOT_PARTITION_UPDATE_SIZE="$(awk -F '[?]=|:=|=' '$1 == "WOLFBOOT_PARTITION_UPDATE_SIZE" { print $2 }' .config)"
FLASH_BANK2_OFFSET=0x08100000
FLASH_END=0x08200000
ns_alias=0x04000000
ns_data=$((WOLFBOOT_NS_DATA_ADDRESS & ~ns_alias))
ns_end=$((ns_data + ${WOLFBOOT_NS_DATA_SIZE:-0}))
update_end=$(((WOLFBOOT_PARTITION_UPDATE_ADDRESS & ~ns_alias) + ${WOLFBOOT_PARTITION_UPDATE_SIZE:-$WOLFBOOT_PARTITION_SIZE}))
swap_end=$(((WOLFBOOT_PARTITION_SWAP_ADDRESS & ~ns_alias) + WOLFBOOT_SECTOR_SIZE))
if [ "$ns_end" -le "$ns_data" ] || [ "$ns_data" -lt $((FLASH_BANK2_OFFSET)) ] || \
[ "$ns_end" -gt $((FLASH_END)) ]; then
echo "Error: WOLFBOOT_NS_DATA_ADDRESS and _SIZE must describe an area inside flash bank 2" >&2
exit 1
fi
if [ $(((ns_data - FLASH_BANK2_OFFSET) % WOLFBOOT_SECTOR_SIZE)) -ne 0 ]; then
echo "Error: WOLFBOOT_NS_DATA_ADDRESS must start on a flash sector boundary" >&2
exit 1
fi
if [ "$ns_data" -lt "$update_end" ] || [ "$ns_data" -lt "$swap_end" ]; then
echo "Error: WOLFBOOT_NS_DATA_ADDRESS must be above the update and swap partitions" >&2
exit 1
fi
# bank 2 stays secure up to the sector before the data area
last_partition_sector=$(((ns_data - FLASH_BANK2_OFFSET) / WOLFBOOT_SECTOR_SIZE - 1))
Comment thread
dgarske marked this conversation as resolved.
Resolved
last_partition_sector_hex="$(printf "0x%x" "$last_partition_sector")"
fi

declare -a obn # option bytes names
declare -a obv # option bytes values
oblen=0 # length of the above arrays
Expand Down
135 changes: 135 additions & 0 deletions tools/scripts/test-set-stm32-tz-option-bytes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
#!/bin/bash

# test-set-stm32-tz-option-bytes.sh
#
# Runs set-stm32-tz-option-bytes.sh against a stub STM32_Programmer_CLI and
# checks the STM32H5 bank 2 watermark (SECWM2_END) it would program for the
# non-secure data window (WOLFBOOT_NS_DATA_ADDRESS, WOLFBOOT_NS_DATA_SIZE),
# and that the layouts it must refuse are refused.
#
# Copyright (C) 2026 wolfSSL Inc.
#
# This file is part of wolfBoot.
#
# wolfBoot is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# wolfBoot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <https://www.gnu.org/licenses/>.

set -eu

SCRIPT="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)/set-stm32-tz-option-bytes.sh"
WORK="$(mktemp -d)"
trap 'rm -rf "$WORK"' EXIT

mkdir -p "$WORK/bin"
cat > "$WORK/bin/STM32_Programmer_CLI" <<'EOF'
#!/bin/sh
echo "$@" > "$STUB_ARGS"
EOF
chmod +x "$WORK/bin/STM32_Programmer_CLI"
export PATH="$WORK/bin:$PATH"
export STUB_ARGS="$WORK/args"

# stm32h5-tz.config, partitions in the secure alias
BASE="TARGET=stm32h5 TZEN=1 WOLFBOOT_SECTOR_SIZE=0x2000
WOLFBOOT_PARTITION_SIZE=0xA0000 WOLFBOOT_PARTITION_BOOT_ADDRESS=0x08060000
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x0C100000
WOLFBOOT_PARTITION_SWAP_ADDRESS=0x0C1A0000"

# .config from BASE with the KEY=VALUE arguments replacing or adding keys
write_config()
{
local kv key
: > "$WORK/.config"
for kv in $BASE "$@"; do
key="${kv%%=*}"
grep -v "^$key=" "$WORK/.config" > "$WORK/.config.tmp" || true
mv "$WORK/.config.tmp" "$WORK/.config"
echo "$kv" >> "$WORK/.config"
done
}

run_script()
{
rm -f "$STUB_ARGS"
(cd "$WORK" && echo y | bash "$SCRIPT") > "$WORK/out" 2>&1
}

expect_secwm2_end()
{
local expected="$1" actual
shift
write_config "$@"
if ! run_script; then
echo "refused, expected SECWM2_END=$expected: $*" >&2
cat "$WORK/out" >&2
exit 1
fi
actual="$(grep -o 'SECWM2_END=0x[0-9a-f]*' "$STUB_ARGS" || true)"
if [ "$actual" != "SECWM2_END=$expected" ]; then
echo "expected SECWM2_END=$expected, got '$actual': $*" >&2
exit 1
fi
}

expect_refused()
{
local expected="$1"
shift
write_config "$@"
if run_script; then
echo "accepted, expected a refusal: $*" >&2
exit 1
fi
if [ -f "$STUB_ARGS" ]; then
echo "programmer called for a refused layout: $*" >&2
exit 1
fi
if ! grep -Fq "$expected" "$WORK/out"; then
echo "expected '$expected': $*" >&2
cat "$WORK/out" >&2
exit 1
fi
}

# no window: bank 2 secure to its last sector
expect_secwm2_end 0x7f
# the window at 0x081A2000 leaves sectors 0x51 up non-secure, in either alias
expect_secwm2_end 0x50 WOLFBOOT_NS_DATA_ADDRESS=0x081A2000 \
WOLFBOOT_NS_DATA_SIZE=0x6000
expect_secwm2_end 0x50 WOLFBOOT_NS_DATA_ADDRESS=0x0C1A2000 \
WOLFBOOT_NS_DATA_SIZE=0x6000
# an update partition larger than the boot partition moves the window up
expect_secwm2_end 0x5f WOLFBOOT_PARTITION_SIZE=0x80000 \
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x08100000 \
WOLFBOOT_PARTITION_UPDATE_SIZE=0xC0000 \
WOLFBOOT_PARTITION_SWAP_ADDRESS=0x080E0000 \
WOLFBOOT_NS_DATA_ADDRESS=0x081C0000 WOLFBOOT_NS_DATA_SIZE=0x6000

expect_refused "inside flash bank 2" WOLFBOOT_NS_DATA_ADDRESS=0x081A2000
expect_refused "inside flash bank 2" WOLFBOOT_NS_DATA_ADDRESS=0x081FE000 \
WOLFBOOT_NS_DATA_SIZE=0x4000
expect_refused "inside flash bank 2" WOLFBOOT_NS_DATA_ADDRESS=0x080F0000 \
WOLFBOOT_NS_DATA_SIZE=0x2000
expect_refused "sector boundary" WOLFBOOT_NS_DATA_ADDRESS=0x081A2020 \
WOLFBOOT_NS_DATA_SIZE=0x6000
expect_refused "above the update and swap" \
WOLFBOOT_NS_DATA_ADDRESS=0x08190000 WOLFBOOT_NS_DATA_SIZE=0x2000
expect_refused "above the update and swap" \
WOLFBOOT_NS_DATA_ADDRESS=0x081A0000 WOLFBOOT_NS_DATA_SIZE=0x2000
expect_refused "above the update and swap" WOLFBOOT_PARTITION_SIZE=0x80000 \
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x08100000 \
WOLFBOOT_PARTITION_UPDATE_SIZE=0xC0000 \
WOLFBOOT_PARTITION_SWAP_ADDRESS=0x080E0000 \
WOLFBOOT_NS_DATA_ADDRESS=0x081A2000 WOLFBOOT_NS_DATA_SIZE=0x6000

echo "set-stm32-tz-option-bytes.sh STM32H5 data window: ok"
Loading
Loading