Skip to content

Commit

Permalink
tools: Remove obsolete API
Browse files Browse the repository at this point in the history
The API is_PSA_non_secure_target() uses obsolete labels to detect if a
target is PSA non-secure target and is not needed anymore.

Mbed OS depends on TF-M for PSA SPM and services. TF-M is built using
it's own build system. Therefore, we don't need to differentiate secure
and non-secure targets anymore in Mbed OS as all PSA targets in Mbed OS
are non-secure targets.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
  • Loading branch information
urutva authored and Patater committed Jun 18, 2020
1 parent 939ed69 commit c9c593f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
8 changes: 0 additions & 8 deletions tools/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,14 +707,6 @@ def _get_primary_memory_override(self, memory_type):
)
if hasattr(self.target, "mbed_{}_size".format(memory_type)):
mem_size = getattr(self.target, "mbed_{}_size".format(memory_type))
if self.target.is_PSA_non_secure_target:
config, _ = self.get_config_data()
mem_start = config.get(
"target.non-secure-{}-start".format(memory_type), mem_start
).value
mem_size = config.get(
"target.non-secure-{}-size".format(memory_type), mem_size
).value
if mem_start and not isinstance(mem_start, int):
mem_start = int(mem_start, 0)
if mem_size and not isinstance(mem_size, int):
Expand Down
3 changes: 1 addition & 2 deletions tools/targets/PSOC6.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) 2017-2018 Future Electronics
# Copyright (c) 2018-2019 Cypress Semiconductor Corporation
# Copyright (c) 2020 Arm Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -134,8 +135,6 @@ def find_cm0_image(toolchain, resources, elf, hexf, hex_filename):
from tools.resources import FileType
hex_files = resources.get_file_paths(FileType.HEX)
m0hexf = next((f for f in hex_files if os.path.basename(f) == hex_filename), None)
if toolchain.target.is_PSA_non_secure_target:
m0hexf = next((f for f in hex_files if os.path.basename(f) == os.path.basename(hexf)), m0hexf)

if m0hexf:
toolchain.notify.info("M0 core image file found: %s." % m0hexf)
Expand Down
4 changes: 0 additions & 4 deletions tools/targets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,6 @@ def is_TrustZone_non_secure_target(self):
def is_TrustZone_target(self):
return self.is_TrustZone_non_secure_target

@property
def is_PSA_non_secure_target(self):
return 'NSPE_Target' in self.labels

@property
def is_PSA_target(self):
return 'PSA' in self.features
Expand Down

0 comments on commit c9c593f

Please sign in to comment.