Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions tools/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,19 @@
for mcu in options.mcu:
# Program Number or name
p, src, ide = options.program, options.source_dir, options.ide
project_dir, project_name, project_temp = setup_project(mcu, ide, p, src, options.build)

zip = not bool(src) # create zip when no src_dir provided
clean = not bool(src) # don't clean when source is provided, use acrual source tree for IDE files

# Export to selected toolchain
lib_symbols = get_lib_symbols(options.macros, src, p)
tmp_path, report = export(project_dir, project_name, ide, mcu, project_dir[0], project_temp, clean=clean, make_zip=zip, extra_symbols=lib_symbols, sources_relative=sources_relative)
try:
project_dir, project_name, project_temp = setup_project(mcu, ide, p, src, options.build)
zip = not bool(src) # create zip when no src_dir provided
clean = not bool(src) # don't clean when source is provided, use acrual source tree for IDE files

# Export to selected toolchain
lib_symbols = get_lib_symbols(options.macros, src, p)
tmp_path, report = export(project_dir, project_name, ide, mcu, project_dir[0], project_temp, clean=clean, make_zip=zip, extra_symbols=lib_symbols, sources_relative=sources_relative)
except OSError as e:
if e.errno == 2:
report = dict(success=False, errormsg="Library path '%s' does not exist. Ensure that the library is built." % (e.filename))
else:
report = dict(success=False, errormsg="An OS error occured: errno #{}".format(e.errno))
if report['success']:
if not zip:
zip_path = join(project_temp, project_name)
Expand Down