Skip to content
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

mbed export -i IAR -m NCS36510 not working with mbed-os-5.2.2(a1c0840) #3286

Closed
radhika-raghavendran opened this issue Nov 18, 2016 · 16 comments

Comments

@radhika-raghavendran
Copy link
Contributor

Description

  • Type: Bug
  • Related issue:
  • Priority: Major

Bug

Target
NCS36510

Toolchain:
IAR

Toolchain version: 7.80.2

mbed-cli version:
0.8.9

Steps to reproduce

git checkout a1c0840
mbed export -i IAR -m NCS36510

@bridadan
Copy link
Contributor

Hi @radhika-raghavendran, sorry for the inconvenience and thanks for raising this issue. I just took a look at this and it looks the root cause of this was a check that was added to the IAR exporters to require CMSIS pack support: https://github.com/ARMmbed/mbed-os/blob/master/tools/export/iar/__init__.py#L33.

The CMSIS pack is being used during the export process to automatically set the debugger for the project: https://github.com/ARMmbed/mbed-os/blob/master/tools/export/iar/__init__.py#L116

This has the added benefit of making debugging targets far easier out-of-the-box, but it does now require that targets must have a CMSIS pack.

@maclobdell
Copy link
Contributor

maclobdell commented Nov 18, 2016

@radhika-raghavendran, Our plan going forward is to leverage cmsis packs for exporter information instead of maintaining separate data sets. It seems that we made this change abruptly in 5.2, thus requiring cmsis packs. We will investigate if we can implement a work around, but the best case would be if you had a preliminary cmsis pack available to test.

@maclobdell
Copy link
Contributor

maclobdell commented Nov 18, 2016

oops, accidentally closed the issue inadvertently. Just reopened.

@radhika-raghavendran
Copy link
Contributor Author

@bridadan @maclobdell
I thought CMSIS pack was exclusively meant for Kiel MDK IDE. Is there a dependency of IAR on CMSIS pack? Also, is there any information or documentation available on CMSIS pack generation for new devices, which can be used for Kiel MDK, IAR and Eclipse IDEs? There is a link describing CMSIS pack but it addresses only Kiel MDK, http://www.keil.com/pack/doc/CMSIS/Pack/html/createPack_DFP.html

@maclobdell
Copy link
Contributor

maclobdell commented Nov 28, 2016

@radhika-raghavendran I discussed this with @sarahmarshy who is working on the exporters. cmsis pack isn't really needed for IAR IDE itself, but the exporter scripts are referencing cmsis packs to set default settings in the generated project (like default debug interface). This can potentially be done in another way, or maybe if pack is not present, it can just not set a default debugger interface. We will investigate this and hopefully have a workaround soon.

@maclobdell
Copy link
Contributor

Sarah just pushed a branch with a patch that could be a workaround to this issue. It has not been tested yet. sarahmarshy@bbb9744
If everything works, we can make a pull request to get this on the master branch.

@radhika-raghavendran
Copy link
Contributor Author

@maclobdell @sarahmarshy
After bringing in the changes in your fork into the mbed-os 5.2.2 release code base, exporting to IAR for NCS36510 is now working. Can you bring this into the main mbed-os repo, so that I can use the main mbed-os branch for development?

@radhika-raghavendran
Copy link
Contributor Author

Is the proposed fix merged into the main mbed-os repository? Is there a particular version of mbed-os which I can check?

@danclement
Copy link
Contributor

danclement commented Dec 1, 2016

@radhika-raghavendran I just imported the mbed blinky example, made sure all my pip tools were updated, and this issue still persists. This is with the current mbed OS master.

I replaced the file that is in the branch Mac mentioned above and it did seem to export correctly but IAR could not open the project file created.

@maclobdell can you give us some guidance on @radhika-raghavendran 's question about versioning?

@theotherjimmy
Copy link
Contributor

@radhika-raghavendran @danclement I have not seen any PRs yet, and the file that the above patch modifies remains unmodified in master. I don't think it has been merged yet.

@sarahmarshy The diff looks good to me Could you create a PR for it? (I'll approve the changes)

@radhika-raghavendran
Copy link
Contributor Author

@danclement
The pull request will need to be made on project generator side and only after the merge to main branch will the issue be resolved.
As mentioned in a previous comment of mine, project generation is working with the changes suggested by @sarahmarshy
In case you would like to test before the merge to main branch happens, please use the modifications mentioned by @maclobdell and @sarahmarshy

@sarahmarshy
Copy link
Contributor

Project generator is deprecated. This logic lives in mbed-os tools now. Please see the link to the PR above.

@radhika-raghavendran
Copy link
Contributor Author

@sarahmarshy Can I uninstall project generator and project generator definitions now?
Also, your suggested changes are working and I am able to export the project to IAR. Thank you.

@sarahmarshy
Copy link
Contributor

Yes, you can!

@danclement
Copy link
Contributor

danclement commented Dec 2, 2016 via email

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 8, 2016

I believe this issue can be closed.

@0xc0170 0xc0170 closed this as completed Dec 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants