Skip to content

Fix build error with secure/non-secure ROM address on Cortex-M23/M33 #6890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
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
7 changes: 7 additions & 0 deletions tools/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,13 @@ def regions(self):
except KeyError:
raise ConfigException("Not enough information in CMSIS packs to "
"build a bootloader project")

# Fix TrustZone secure/non-secure ROM address
if (self.target.core == "Cortex-M23" or self.target.core == "Cortex-M33"):
rom_start = rom_start + int(getattr(self.target, "tz_offset", "0x0"), 0)
elif (self.target.core == "Cortex-M23-NS" or self.target.core == "Cortex-M33-NS"):
rom_start = rom_start + int(getattr(self.target, "tz_offset_ns", "0x0"), 0)

if self.target.bootloader_img or self.target.restrict_size:
return self._generate_bootloader_build(rom_start, rom_size)
elif self.target.mbed_app_start or self.target.mbed_app_size:
Expand Down