Make the debug profile the default used for exporting

pull/3534/head
Jimmy Brisson 2017-01-05 10:14:55 -06:00 committed by Sarah
parent 54fd40f1da
commit 2bf1f6bd04
2 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -237,7 +237,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,