mirror of https://github.com/ARMmbed/mbed-os.git
Make the debug profile the default used for exporting
parent
54fd40f1da
commit
2bf1f6bd04
|
@ -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:
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue