Skip to content

Commit a8df8dd

Browse files
committed
Build script changes
1 parent 68102ed commit a8df8dd

File tree

5 files changed

+0
-58
lines changed

5 files changed

+0
-58
lines changed

tools/build.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
from tools.utils import argparse_dir_not_parent
4545
from tools.utils import NoValidToolchainException
4646
from tools.utils import print_end_warnings
47-
from tools.psa import generate_psa_sources, clean_psa_autogen
4847
from tools.resources import OsAndSpeResourceFilter
4948

5049
def main():
@@ -166,9 +165,6 @@ def main():
166165
skipped = []
167166
end_warnings = []
168167

169-
if options.clean:
170-
clean_psa_autogen()
171-
172168
for toolchain in toolchains:
173169
for target_name in targets:
174170
target = Target.get_target(target_name)
@@ -191,12 +187,6 @@ def main():
191187
profile = extract_profile(parser, options, internal_tc_name)
192188

193189
if options.source_dir:
194-
if target.is_PSA_target:
195-
generate_psa_sources(
196-
source_dirs=options.source_dir,
197-
ignore_paths=[options.build_dir]
198-
)
199-
200190
resource_filter = None
201191
if target.is_PSA_secure_target:
202192
resource_filter = OsAndSpeResourceFilter()

tools/make.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
from tools.utils import print_large_string
5656
from tools.settings import ROOT
5757
from tools.targets import Target
58-
from tools.psa import generate_psa_sources, clean_psa_autogen
5958
from tools.resources import OsAndSpeResourceFilter
6059

6160
def default_args_dict(options):
@@ -306,9 +305,6 @@ def main():
306305
print('\n'.join(map(str, sorted(TEST_MAP.values()))))
307306
else:
308307

309-
if options.clean:
310-
clean_psa_autogen()
311-
312308
# Target
313309
if options.mcu is None:
314310
args_error(parser, "argument -m/--mcu is required")
@@ -339,12 +335,6 @@ def main():
339335
args_error(parser, str(e))
340336

341337
if options.source_dir is not None:
342-
if target.is_PSA_target:
343-
generate_psa_sources(
344-
source_dirs=options.source_dir,
345-
ignore_paths=[options.build_dir]
346-
)
347-
348338
resource_filter = None
349339
if target.is_PSA_secure_target:
350340
resource_filter = OsAndSpeResourceFilter()

tools/project.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
from tools.utils import NotSupportedException
5454
from tools.options import extract_profile, list_profiles, extract_mcus
5555
from tools.notifier.term import TerminalNotifier
56-
from tools.psa import generate_psa_sources, clean_psa_autogen
5756
from tools.resources import OsAndSpeResourceFilter
5857

5958
""" The CLI entry point for exporting projects from the mbed tools to any of the
@@ -380,7 +379,6 @@ def main():
380379

381380
if options.clean:
382381
clean(options.source_dir)
383-
clean_psa_autogen()
384382

385383
ide = resolve_exporter_alias(options.ide)
386384
exporter, toolchain_name = get_exporter_toolchain(ide)
@@ -391,11 +389,6 @@ def main():
391389

392390
try:
393391
target = Target.get_target(mcu)
394-
if target.is_PSA_target:
395-
generate_psa_sources(source_dirs=options.source_dir,
396-
ignore_paths=[]
397-
)
398-
399392
resource_filter = None
400393
if target.is_PSA_secure_target:
401394
resource_filter = OsAndSpeResourceFilter()

tools/psa/__init__.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,3 @@ def find_secure_image(notify, resources, ns_image_path,
5656
raise Exception("Required secure image not found.")
5757

5858
return secure_image
59-
60-
61-
def _get_psa_autogen_dir():
62-
return os.path.join(ROOT, 'PSA_AUTOGEN')
63-
64-
65-
def clean_psa_autogen():
66-
psa_out_dir = _get_psa_autogen_dir()
67-
68-
if os.path.isdir(psa_out_dir):
69-
shutil.rmtree(psa_out_dir)
70-
71-
72-
def generate_psa_sources(source_dirs, ignore_paths):
73-
services, apps = manifests_discovery(root_dirs=source_dirs,
74-
ignore_paths=ignore_paths + ['.git'])
75-
assert len(services + apps), 'PSA manifest discovery failed'
76-
psa_out_dir = _get_psa_autogen_dir()
77-
78-
generate_spm_code(services, apps, psa_out_dir)
79-
return psa_out_dir

tools/test.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
from tools.utils import print_end_warnings
4444
from tools.settings import ROOT
4545
from tools.targets import Target
46-
from tools.psa import generate_psa_sources, clean_psa_autogen
4746
from tools.resources import OsAndSpeResourceFilter, SpeOnlyResourceFilter
4847

4948
def main():
@@ -221,9 +220,6 @@ def main():
221220
sys.exit(0)
222221
else:
223222

224-
if options.clean:
225-
clean_psa_autogen()
226-
227223
# Build all tests
228224
if not options.build_dir:
229225
args_error(parser, "argument --build is required")
@@ -244,12 +240,6 @@ def main():
244240
if target.is_PSA_secure_target:
245241
resource_filter = OsAndSpeResourceFilter()
246242

247-
if target.is_PSA_target:
248-
generate_psa_sources(
249-
source_dirs=base_source_paths,
250-
ignore_paths=[options.build_dir]
251-
)
252-
253243
# Build sources
254244
notify = TerminalNotifier(options.verbose, options.silent)
255245
build_library(base_source_paths, options.build_dir, mcu,

0 commit comments

Comments
 (0)