Maxim Integrated's IoT development kit
Dependencies: MAX30101 MAX30003 MAX113XX_Pixi MAX30205 max32630fthr USBDevice
tools/windows_run.bat@8:2b6bfa8d9e36, 2018-04-27 (annotated)
- Committer:
- Mahir Ozturk
- Date:
- Fri Apr 27 14:57:49 2018 +0300
- Revision:
- 8:2b6bfa8d9e36
- Parent:
- 1:efe9cad8942f
Add run scripts for windows and unix environments
Change-Id: Ibffad1bbcfbea0e5e15af02559f3ca95d273930f
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Mahir Ozturk |
8:2b6bfa8d9e36 | 1 | @echo off |
Mahir Ozturk |
8:2b6bfa8d9e36 | 2 | |
Mahir Ozturk |
8:2b6bfa8d9e36 | 3 | setlocal |
Mahir Ozturk |
8:2b6bfa8d9e36 | 4 | |
Mahir Ozturk |
8:2b6bfa8d9e36 | 5 | set TOOLSPATH=%~dp0 |
Mahir Ozturk |
8:2b6bfa8d9e36 | 6 | |
Mahir Ozturk |
8:2b6bfa8d9e36 | 7 | :: strip trailing backslash |
Mahir Ozturk |
8:2b6bfa8d9e36 | 8 | set TOOLSPATH=%TOOLSPATH:~0,-1% |
Mahir Ozturk |
8:2b6bfa8d9e36 | 9 | |
Mahir Ozturk |
8:2b6bfa8d9e36 | 10 | for %%d in (%TOOLSPATH%) do set PROJECTPATH=%%~dpd |
Mahir Ozturk |
8:2b6bfa8d9e36 | 11 | |
Mahir Ozturk |
8:2b6bfa8d9e36 | 12 | :: strip trailing backslash |
Mahir Ozturk |
8:2b6bfa8d9e36 | 13 | set PROJECTPATH=%PROJECTPATH:~0,-1% |
Mahir Ozturk |
8:2b6bfa8d9e36 | 14 | |
Mahir Ozturk |
8:2b6bfa8d9e36 | 15 | for %%a in (%PROJECTPATH%) do set "PROJECTNAME=%%~nxa" |
Mahir Ozturk |
8:2b6bfa8d9e36 | 16 | |
Mahir Ozturk |
8:2b6bfa8d9e36 | 17 | for /f "delims== tokens=1*" %%A in (.mbed) do ( |
Mahir Ozturk |
8:2b6bfa8d9e36 | 18 | if %%A==TARGET ( |
Mahir Ozturk |
8:2b6bfa8d9e36 | 19 | set TARGET=%%B |
Mahir Ozturk |
8:2b6bfa8d9e36 | 20 | ) else if %%A==TOOLCHAIN ( |
Mahir Ozturk |
8:2b6bfa8d9e36 | 21 | set TOOLCHAIN=%%B |
Mahir Ozturk |
8:2b6bfa8d9e36 | 22 | ) |
Mahir Ozturk |
8:2b6bfa8d9e36 | 23 | ) |
Mahir Ozturk |
8:2b6bfa8d9e36 | 24 | |
Mahir Ozturk |
8:2b6bfa8d9e36 | 25 | set BINARY=%PROJECTPATH%/BUILD/%TARGET%/%TOOLCHAIN%/%PROJECTNAME%.bin |
Mahir Ozturk |
8:2b6bfa8d9e36 | 26 | |
Mahir Ozturk |
8:2b6bfa8d9e36 | 27 | if not exist %BINARY% ( |
Mahir Ozturk |
8:2b6bfa8d9e36 | 28 | @echo Error: File "%BINARY%" does not exist! |
Mahir Ozturk |
8:2b6bfa8d9e36 | 29 | exit /b |
Mahir Ozturk |
8:2b6bfa8d9e36 | 30 | ) |
Mahir Ozturk |
8:2b6bfa8d9e36 | 31 | |
Mahir Ozturk |
8:2b6bfa8d9e36 | 32 | python %PROJECTPATH%/tools/mbed_run.py %BINARY% |
Mahir Ozturk |
8:2b6bfa8d9e36 | 33 | |
Mahir Ozturk |
8:2b6bfa8d9e36 | 34 | endlocal |