Skip to content

Update PSA binaries importer for FUTURE_SEQUANA_PSA #9223

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

Merged
merged 4 commits into from
Jan 24, 2019
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Build by mbed-cli using GNU Arm Embedded - version 6.3.1
These images were compiled by the following command:

```
mbed compile -m TARGET_FUTURE_SEQUANA_M0_PSA -t GCC_ARM --profile debug/release
mbed compile -m FUTURE_SEQUANA_M0_PSA -t GCC_ARM --profile release -N psa_release_1.0
mbed compile -m FUTURE_SEQUANA_M0_PSA -t GCC_ARM --profile debug -N psa_debug_1.0
```

There are also prebuilt images for PSA tests.
Expand All @@ -16,5 +17,7 @@ Those images can be found in the test folder under a `TARGET_FUTURE_SEQUANA_PSA`
These images were compiled by the following command:

```
mbed test --compile -m TARGET_FUTURE_SEQUANA_M0_PSA -t GCC_ARM --profile debug -n *spm*
mbed test --compile -m FUTURE_SEQUANA_M0_PSA -t GCC_ARM --profile debug -n *psa-*
```

To update the prebuilt binaries run the previous commands and then run ```python export_binaries.py```
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (c) 2017-2018 ARM Limited
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import fnmatch
import shutil
import os

SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.realpath(os.path.join(SCRIPT_DIR, '..', '..', '..', '..', '..'))
DELIVERY_DIR = os.path.join(ROOT_DIR, 'DELIVERY', 'TARGET_FUTURE_SEQUANA_PSA')

for f in fnmatch.filter(os.listdir(DELIVERY_DIR), '*.hex'):
test_suite_name = os.path.splitext(f)[0]
test_directory = os.path.join(ROOT_DIR, 'TESTS', 'psa', test_suite_name)

if os.path.exists(test_directory):
target_dir = os.path.join(test_directory, 'TARGET_FUTURE_SEQUANA_PSA', f)
if not os.path.exists(os.path.join(test_directory, 'TARGET_FUTURE_SEQUANA_PSA')):
continue
else:
target_dir = os.path.join(SCRIPT_DIR, f)

shutil.copyfile(os.path.join(DELIVERY_DIR, f), target_dir)