Simplify get_config toolchain handling

pull/7183/head
Jimmy Brisson 2018-06-26 10:12:43 -05:00
parent 545553b6bc
commit b2395a7786
1 changed files with 5 additions and 4 deletions

View File

@ -53,14 +53,15 @@ if __name__ == '__main__':
args_error(parser, "argument -m/--mcu is required")
target = extract_mcus(parser, options)[0]
# Toolchain
toolchain = options.tool[0] if options.tool is not None else None
options.prefix = options.prefix or [""]
try:
params, macros, features = get_config(
options.source_dir, target, toolchain, app_config=options.app_config)
options.source_dir,
target,
options.tool[0] if options.tool else None,
app_config=options.app_config
)
if not params and not macros:
print("No configuration data available.")
sys.exit(0)