Skip to content

Commit 2bf1f6b

Browse files
theotherjimmysarahmarshy
authored andcommitted
Make the debug profile the default used for exporting
1 parent 54fd40f commit 2bf1f6b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tools/options.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def list_profiles():
100100
"""
101101
return [fn.replace(".json", "") for fn in listdir(join(dirname(__file__), "profiles")) if fn.endswith(".json")]
102102

103-
def extract_profile(parser, options, toolchain):
103+
def extract_profile(parser, options, toolchain, fallback="default"):
104104
"""Extract a Toolchain profile from parsed options
105105
106106
Positional arguments:
@@ -110,7 +110,7 @@ def extract_profile(parser, options, toolchain):
110110
"""
111111
profile = {'c': [], 'cxx': [], 'ld': [], 'common': [], 'asm': []}
112112
filenames = options.profile or [join(dirname(__file__), "profiles",
113-
"default.json")]
113+
fallback + ".json")]
114114
for filename in filenames:
115115
contents = load(open(filename))
116116
try:

tools/project.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def main():
237237
exporter, toolchain_name = get_exporter_toolchain(options.ide)
238238
if options.mcu not in exporter.TARGETS:
239239
args_error(parser, "%s not supported by %s"%(options.mcu,options.ide))
240-
profile = extract_profile(parser, options, toolchain_name)
240+
profile = extract_profile(parser, options, toolchain_name, fallback="debug")
241241
if options.clean:
242242
rmtree(BUILD_DIR)
243243
export(options.mcu, options.ide, build=options.build,

0 commit comments

Comments
 (0)