Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.
Upstream: https://github.com/ARMmbed/DAPLink
tools/build_release.sh@0:01f31e923fe2, 2020-04-07 (annotated)
- Committer:
- Pawel Zarembski
- Date:
- Tue Apr 07 12:55:42 2020 +0200
- Revision:
- 0:01f31e923fe2
hani: DAPLink with reset workaround
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Pawel Zarembski |
0:01f31e923fe2 | 1 | #!/bin/bash -e |
Pawel Zarembski |
0:01f31e923fe2 | 2 | ## |
Pawel Zarembski |
0:01f31e923fe2 | 3 | ## DAPLink Interface Firmware |
Pawel Zarembski |
0:01f31e923fe2 | 4 | ## Copyright (c) 2009-2016, ARM Limited, All Rights Reserved |
Pawel Zarembski |
0:01f31e923fe2 | 5 | ## SPDX-License-Identifier: Apache-2.0 |
Pawel Zarembski |
0:01f31e923fe2 | 6 | ## |
Pawel Zarembski |
0:01f31e923fe2 | 7 | ## Licensed under the Apache License, Version 2.0 (the "License"); you may |
Pawel Zarembski |
0:01f31e923fe2 | 8 | ## not use this file except in compliance with the License. |
Pawel Zarembski |
0:01f31e923fe2 | 9 | ## You may obtain a copy of the License at |
Pawel Zarembski |
0:01f31e923fe2 | 10 | ## |
Pawel Zarembski |
0:01f31e923fe2 | 11 | ## http://www.apache.org/licenses/LICENSE-2.0 |
Pawel Zarembski |
0:01f31e923fe2 | 12 | ## |
Pawel Zarembski |
0:01f31e923fe2 | 13 | ## Unless required by applicable law or agreed to in writing, software |
Pawel Zarembski |
0:01f31e923fe2 | 14 | ## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
Pawel Zarembski |
0:01f31e923fe2 | 15 | ## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Pawel Zarembski |
0:01f31e923fe2 | 16 | ## See the License for the specific language governing permissions and |
Pawel Zarembski |
0:01f31e923fe2 | 17 | ## limitations under the License. |
Pawel Zarembski |
0:01f31e923fe2 | 18 | ## |
Pawel Zarembski |
0:01f31e923fe2 | 19 | |
Pawel Zarembski |
0:01f31e923fe2 | 20 | project_tool=$1 |
Pawel Zarembski |
0:01f31e923fe2 | 21 | env_folder=${2-env} |
Pawel Zarembski |
0:01f31e923fe2 | 22 | requirements_file=${3-requirements.txt} |
Pawel Zarembski |
0:01f31e923fe2 | 23 | |
Pawel Zarembski |
0:01f31e923fe2 | 24 | if [[ "$project_tool" != "mbedcli" && "$project_tool" != "" ]]; then |
Pawel Zarembski |
0:01f31e923fe2 | 25 | echo "Only mbedcli is supported in Linux build" |
Pawel Zarembski |
0:01f31e923fe2 | 26 | exit 1 |
Pawel Zarembski |
0:01f31e923fe2 | 27 | else |
Pawel Zarembski |
0:01f31e923fe2 | 28 | echo "Compiling in Linux using mbedcli" |
Pawel Zarembski |
0:01f31e923fe2 | 29 | fi |
Pawel Zarembski |
0:01f31e923fe2 | 30 | |
Pawel Zarembski |
0:01f31e923fe2 | 31 | if [[ "$ARM_PATH" == "" ]]; then |
Pawel Zarembski |
0:01f31e923fe2 | 32 | echo "Need variable ARM_PATH to point to ARMCC directory" |
Pawel Zarembski |
0:01f31e923fe2 | 33 | exit 1 |
Pawel Zarembski |
0:01f31e923fe2 | 34 | else |
Pawel Zarembski |
0:01f31e923fe2 | 35 | echo "Using ARMCC in $ARM_PATH" |
Pawel Zarembski |
0:01f31e923fe2 | 36 | fi |
Pawel Zarembski |
0:01f31e923fe2 | 37 | |
Pawel Zarembski |
0:01f31e923fe2 | 38 | echo $env_folder |
Pawel Zarembski |
0:01f31e923fe2 | 39 | echo $requirements_file |
Pawel Zarembski |
0:01f31e923fe2 | 40 | |
Pawel Zarembski |
0:01f31e923fe2 | 41 | if [ ! -d $env_folder ];then |
Pawel Zarembski |
0:01f31e923fe2 | 42 | echo "Generating virtualenv folder $env_folder" |
Pawel Zarembski |
0:01f31e923fe2 | 43 | virtualenv $env_folder |
Pawel Zarembski |
0:01f31e923fe2 | 44 | else |
Pawel Zarembski |
0:01f31e923fe2 | 45 | echo "Using $env_folder" |
Pawel Zarembski |
0:01f31e923fe2 | 46 | fi |
Pawel Zarembski |
0:01f31e923fe2 | 47 | |
Pawel Zarembski |
0:01f31e923fe2 | 48 | source $env_folder/bin/activate |
Pawel Zarembski |
0:01f31e923fe2 | 49 | pip install -r $requirements_file |
Pawel Zarembski |
0:01f31e923fe2 | 50 | mbed deploy |
Pawel Zarembski |
0:01f31e923fe2 | 51 | |
Pawel Zarembski |
0:01f31e923fe2 | 52 | python tools/mbedcli_compile.py --clean --release |
Pawel Zarembski |
0:01f31e923fe2 | 53 | if [ $? -ne 0 ]; then |
Pawel Zarembski |
0:01f31e923fe2 | 54 | exit $? |
Pawel Zarembski |
0:01f31e923fe2 | 55 | fi |
Pawel Zarembski |
0:01f31e923fe2 | 56 | python tools/copy_release_files.py --project-tool mbedcli |
Pawel Zarembski |
0:01f31e923fe2 | 57 | exit $? |