From 182ff5ad6782feb5897731f03809a7de342e8312 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Thu, 5 Jan 2017 10:14:55 -0600 Subject: [PATCH] Make the debug profile the default used for exporting --- tools/options.py | 4 ++-- tools/project.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/options.py b/tools/options.py index 4821b15cc8..21e7ccad42 100644 --- a/tools/options.py +++ b/tools/options.py @@ -100,7 +100,7 @@ def list_profiles(): """ return [fn.replace(".json", "") for fn in listdir(join(dirname(__file__), "profiles")) if fn.endswith(".json")] -def extract_profile(parser, options, toolchain): +def extract_profile(parser, options, toolchain, fallback="default"): """Extract a Toolchain profile from parsed options Positional arguments: @@ -110,7 +110,7 @@ def extract_profile(parser, options, toolchain): """ profile = {'c': [], 'cxx': [], 'ld': [], 'common': [], 'asm': []} filenames = options.profile or [join(dirname(__file__), "profiles", - "default.json")] + fallback + ".json")] for filename in filenames: contents = load(open(filename)) try: diff --git a/tools/project.py b/tools/project.py index b2ae09302c..7f70bc94d3 100644 --- a/tools/project.py +++ b/tools/project.py @@ -235,7 +235,7 @@ def main(): exporter, toolchain_name = get_exporter_toolchain(options.ide) if options.mcu not in exporter.TARGETS: args_error(parser, "%s not supported by %s"%(options.mcu,options.ide)) - profile = extract_profile(parser, options, toolchain_name) + profile = extract_profile(parser, options, toolchain_name, fallback="debug") if options.clean: rmtree(BUILD_DIR) export(options.mcu, options.ide, build=options.build,