Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX30101 MAX30003 MAX113XX_Pixi MAX30205 max32630fthr USBDevice
Revision 8:2b6bfa8d9e36, committed 2018-04-27
- Comitter:
- Mahir Ozturk
- Date:
- Fri Apr 27 14:57:49 2018 +0300
- Parent:
- 7:2c9c8b6a28a7
- Child:
- 9:828d10e8ccfb
- Commit message:
- Add run scripts for windows and unix environments
Change-Id: Ibffad1bbcfbea0e5e15af02559f3ca95d273930f
Changed in this revision
| tools/unix_run | Show annotated file Show diff for this revision Revisions of this file |
| tools/windows_run.bat | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/unix_run Fri Apr 27 14:57:49 2018 +0300
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+TOOLSPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+PROJECTPATH="$(cd "$TOOLSPATH/.." && pwd)"
+
+PROJECTNAME=${PROJECTPATH##*/}
+
+source $PROJECTPATH/.mbed
+
+BINARY=$PROJECTPATH/BUILD/$TARGET/$TOOLCHAIN/$PROJECTNAME.bin
+
+if [ ! -f $BINARY ]; then
+ echo Error: File "$BINARY" does not exist!
+ exit 1
+fi
+
+python $PROJECTPATH/tools/mbed_run.py $BINARY
--- 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