Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.

Upstream: https://github.com/ARMmbed/DAPLink

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?

UserRevisionLine numberNew contents of line
Pawel Zarembski 0:01f31e923fe2 1 ::
Pawel Zarembski 0:01f31e923fe2 2 :: DAPLink Interface Firmware
Pawel Zarembski 0:01f31e923fe2 3 :: Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
Pawel Zarembski 0:01f31e923fe2 4 :: SPDX-License-Identifier: Apache-2.0
Pawel Zarembski 0:01f31e923fe2 5 ::
Pawel Zarembski 0:01f31e923fe2 6 :: Licensed under the Apache License, Version 2.0 (the "License"); you may
Pawel Zarembski 0:01f31e923fe2 7 :: not use this file except in compliance with the License.
Pawel Zarembski 0:01f31e923fe2 8 :: You may obtain a copy of the License at
Pawel Zarembski 0:01f31e923fe2 9 ::
Pawel Zarembski 0:01f31e923fe2 10 :: http://www.apache.org/licenses/LICENSE-2.0
Pawel Zarembski 0:01f31e923fe2 11 ::
Pawel Zarembski 0:01f31e923fe2 12 :: Unless required by applicable law or agreed to in writing, software
Pawel Zarembski 0:01f31e923fe2 13 :: distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
Pawel Zarembski 0:01f31e923fe2 14 :: WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Pawel Zarembski 0:01f31e923fe2 15 :: See the License for the specific language governing permissions and
Pawel Zarembski 0:01f31e923fe2 16 :: limitations under the License.
Pawel Zarembski 0:01f31e923fe2 17 ::
Pawel Zarembski 0:01f31e923fe2 18 :: Launches uVision with the python environment needed to build DAPLink
Pawel Zarembski 0:01f31e923fe2 19 ::
Pawel Zarembski 0:01f31e923fe2 20 :: git and python are expected to be in PATH. Project will fail to build otherwise
Pawel Zarembski 0:01f31e923fe2 21 ::
Pawel Zarembski 0:01f31e923fe2 22
Pawel Zarembski 0:01f31e923fe2 23 setlocal
Pawel Zarembski 0:01f31e923fe2 24
Pawel Zarembski 0:01f31e923fe2 25 @rem Script assumes working directory is workspace root. Force it.
Pawel Zarembski 0:01f31e923fe2 26 cd %~dp0..\
Pawel Zarembski 0:01f31e923fe2 27
Pawel Zarembski 0:01f31e923fe2 28 @rem See if we can find uVision. This logic is consistent with progen
Pawel Zarembski 0:01f31e923fe2 29 @if [%UV4%]==[] (
Pawel Zarembski 0:01f31e923fe2 30 @echo UV4 variable is not set, trying to autodetect..
Pawel Zarembski 0:01f31e923fe2 31 if EXIST c:\keil\uv4\uv4.exe (
Pawel Zarembski 0:01f31e923fe2 32 set UV4=c:\keil\uv4\uv4.exe
Pawel Zarembski 0:01f31e923fe2 33 ) else if EXIST c:\keil_v5\uv4\uv4.exe (
Pawel Zarembski 0:01f31e923fe2 34 set UV4=c:\keil_v5\uv4\uv4.exe
Pawel Zarembski 0:01f31e923fe2 35 ) else goto error_nomdk
Pawel Zarembski 0:01f31e923fe2 36 )
Pawel Zarembski 0:01f31e923fe2 37 @echo USING UV4=%UV4%
Pawel Zarembski 0:01f31e923fe2 38 set uv4exe=%UV4%
Pawel Zarembski 0:01f31e923fe2 39
Pawel Zarembski 0:01f31e923fe2 40 @rem Select an existing virtualenv as first parameter
Pawel Zarembski 0:01f31e923fe2 41 @if not [%1]==[] (
Pawel Zarembski 0:01f31e923fe2 42 echo Using virtualenv %1
Pawel Zarembski 0:01f31e923fe2 43 @if exist %1 call %1\Scripts\activate && goto :env_folder_ok
Pawel Zarembski 0:01f31e923fe2 44 ) else (
Pawel Zarembski 0:01f31e923fe2 45 @if exist env goto :env_ok
Pawel Zarembski 0:01f31e923fe2 46 )
Pawel Zarembski 0:01f31e923fe2 47
Pawel Zarembski 0:01f31e923fe2 48
Pawel Zarembski 0:01f31e923fe2 49 echo Creating python virtual environment && virtualenv env
Pawel Zarembski 0:01f31e923fe2 50 :env_ok
Pawel Zarembski 0:01f31e923fe2 51 call env\Scripts\activate
Pawel Zarembski 0:01f31e923fe2 52 :env_folder_ok
Pawel Zarembski 0:01f31e923fe2 53
Pawel Zarembski 0:01f31e923fe2 54 @echo Doing pip install
Pawel Zarembski 0:01f31e923fe2 55 @REM use project requirements if not specified
Pawel Zarembski 0:01f31e923fe2 56 if [%2]==[] pip install -r requirements.txt
Pawel Zarembski 0:01f31e923fe2 57 @REM use custom requirements if specified
Pawel Zarembski 0:01f31e923fe2 58 if not [%2]==[] pip install -r %2
Pawel Zarembski 0:01f31e923fe2 59
Pawel Zarembski 0:01f31e923fe2 60 start %uv4exe%
Pawel Zarembski 0:01f31e923fe2 61 exit /B 0
Pawel Zarembski 0:01f31e923fe2 62
Pawel Zarembski 0:01f31e923fe2 63 :error_nomdk
Pawel Zarembski 0:01f31e923fe2 64 @echo Error: Keil MDK not installed or not found. If you installed it to a
Pawel Zarembski 0:01f31e923fe2 65 @echo non-default location, you need to set environment variable UV4 to
Pawel Zarembski 0:01f31e923fe2 66 @echo the path of the executable
Pawel Zarembski 0:01f31e923fe2 67 @exit /B 1
Pawel Zarembski 0:01f31e923fe2 68