tools: Remove obsolete API

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>
pull/12955/head
Devaraj Ranganna 2020-05-28 12:23:53 +01:00 committed by Jaeden Amero
parent 939ed6940c
commit c9c593f7ca
3 changed files with 1 additions and 14 deletions

View File

@ -707,14 +707,6 @@ class Config(object):
)
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):

View File

@ -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.
@ -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)

View File

@ -401,10 +401,6 @@ class Target(namedtuple(
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