Morpheus / Mbed OS mbed-Client-Morpheus-hg

Dependencies:   mbed-os

Revision:
6:622a477ef55c
Parent:
5:37ac884d9477
Child:
7:caeff556648e
--- a/neo.py	Tue Mar 29 23:03:50 2016 -0500
+++ b/neo.py	Tue Mar 29 23:30:37 2016 -0500
@@ -201,6 +201,19 @@
         if cwd.type == 'git':
             popen([cwd.type, 'add', repo.lib])
 
+# Compile command
+@subcommand('compile', 'toolchain', 'target',
+    help='compile project using workspace_tools')
+def compile(toolchain, target):
+    cwd = Repo()
+
+    popen(['python', 'mbed-os/tools/make.py',
+        '--source=%s' % cwd.path,
+        '--build=%s' % os.path.join(cwd.path, '.build'),
+        '-D', 'YOTTA_CFG', '-D', 'YOTTA_CONFIG',
+        '-D', 'TARGET_LIKE_MBED', '-D', 'TARGET_LIKE_CORTEX_M4',
+        '-t', toolchain.upper(), '-m', target.upper(), '-j', '0'])
+
 # Parse/run command
 args = parser.parse_args()
 status = args.command(args)