diff --git a/.circleci/config.yml b/.circleci/config.yml index 7b2c5b7c..69d70068 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -133,6 +133,10 @@ commands: - change_mbed_os_version: version: "5.2.3" - check_inspection + - run: + name: Removing mbed_app.json for 5.1.5 + working_directory: integration_tests/supported-tests + command: rm mbed_app.json - change_mbed_os_version: version: "5.1.5" - check_inspection diff --git a/mbed/mbed.py b/mbed/mbed.py index e9df7e32..c3b13ddd 100755 --- a/mbed/mbed.py +++ b/mbed/mbed.py @@ -37,6 +37,7 @@ import re import subprocess import os +import json import platform import contextlib import shutil @@ -221,6 +222,13 @@ def hide_progress(max_width=80): if sys.stdout.isatty(): sys.stdout.write("\r%s\r" % (' ' * max_width)) +def create_default_mbed_app(): + # Default data content + data = {'target_overrides':{'K64F':{'platform.stdio-baud-rate': 9600}}} + filehandler = open("mbed_app.json","w") + json.dump(data, filehandler, indent=4) + filehandler.close() + # Process execution class ProcessException(Exception): pass @@ -2088,6 +2096,7 @@ def new(name, scm='git', program=False, library=False, mbedlib=False, create_onl try: with cd(d_path): add(url, path=d, depth=depth, protocol=protocol, top=False) + create_default_mbed_app() except Exception as e: if os.path.isdir(os.path.join(d_path, d)): rmtree_readonly(os.path.join(d_path, d))