New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Traceback in CMSIS export. #4173

merged 1 commit into from Apr 19, 2017


None yet
5 participants

theotherjimmy commented Apr 11, 2017

How to reproduce

Then try to export any project online to cmsis. You will get this
trackback (unbeknownst to you):

TypeError: join() takes at least 1 argument (0 given)
  File "django/core/handlers/", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/decorators/", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "django/contrib/auth/", line 22, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "mbed/repositories/", line 1601, in web_export
  File "mbed_compiler/", line 149, in export
  File "tools/", line 222, in export_project
  File "tools/", line 89, in generate_project_files
  File "tools/export/cmsis/", line 147, in generate
    'project_files': tostring(self.group_project_files(srcs, Element('files'))),
  File "tools/export/cmsis/", line 131, in group_project_files = os.path.join(*spl[1:])

That should not happen

New behavior

Export works.




This comment has been minimized.


0xc0170 commented Apr 12, 2017

Might be worth adding to the commit message how this fixes it (why <= 2).

Fix Traceback in CMSIS export.
The traceback was caused when a file without a parent directory (which
is implicitly ".") is added to the resources object. The code assumed
that all files within the resources object would have a parent

This commit changes the check to account for files that are in the root
directory of a project and have no preceding `./`

@theotherjimmy theotherjimmy force-pushed the theotherjimmy:fix-cmsis-traceback branch to 6a32567 Apr 12, 2017


This comment has been minimized.


theotherjimmy commented Apr 12, 2017

@0xc0170 Included explanation of why this is fixed in the commit message.


This comment has been minimized.


0xc0170 commented Apr 18, 2017

/morph test-nightly

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Apr 18, 2017


This comment has been minimized.


bridadan commented Apr 18, 2017

^ Actually not the worst thing the bot wasn't listening then, you want the export test for this 😄

/morph export-build


This comment has been minimized.

mbed-bot commented Apr 19, 2017


Your command has finished executing! Here's what you wrote!

/morph export-build


mbed Build Number: 7

All exports and builds passed!

@sg- sg- added ready for merge and removed needs: CI labels Apr 19, 2017

@sg- sg- merged commit a67eca5 into ARMmbed:master Apr 19, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
ci/morph-export-build Job has completed
continuous-integration/jenkins/pr-head This commit looks good
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment