Maxim Integrated's IoT development kit
Dependencies: MAX30101 MAX30003 MAX113XX_Pixi MAX30205 max32630fthr USBDevice
Diff: tools/windows_run.bat
- Revision:
- 8:2b6bfa8d9e36
- Parent:
- 1:efe9cad8942f
diff -r 2c9c8b6a28a7 -r 2b6bfa8d9e36 tools/windows_run.bat --- a/tools/windows_run.bat Fri Apr 20 16:22:27 2018 +0300 +++ b/tools/windows_run.bat Fri Apr 27 14:57:49 2018 +0300 @@ -1,2 +1,34 @@ -cd %1\ -make run +@echo off + +setlocal + +set TOOLSPATH=%~dp0 + +:: strip trailing backslash +set TOOLSPATH=%TOOLSPATH:~0,-1% + +for %%d in (%TOOLSPATH%) do set PROJECTPATH=%%~dpd + +:: strip trailing backslash +set PROJECTPATH=%PROJECTPATH:~0,-1% + +for %%a in (%PROJECTPATH%) do set "PROJECTNAME=%%~nxa" + +for /f "delims== tokens=1*" %%A in (.mbed) do ( + if %%A==TARGET ( + set TARGET=%%B + ) else if %%A==TOOLCHAIN ( + set TOOLCHAIN=%%B + ) +) + +set BINARY=%PROJECTPATH%/BUILD/%TARGET%/%TOOLCHAIN%/%PROJECTNAME%.bin + +if not exist %BINARY% ( + @echo Error: File "%BINARY%" does not exist! + exit /b +) + +python %PROJECTPATH%/tools/mbed_run.py %BINARY% + +endlocal