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

e2 studio exporter update #4959

Merged
merged 1 commit into from Sep 25, 2017

Conversation

Projects
None yet
6 participants
@phyokyaw

phyokyaw commented Aug 23, 2017

#4942

Description

This change removes legacy e2 studio IDE exporter and updated to inherit from gnuarmeclipse exporter. Only RZ-A1H .cproject template is updated.

Status

READY

Migrations

NO

Deploy notes

The exported project wont build unless Cortex-A support is added to OS 5.5.
https://developer.mbed.org/teams/Renesas/wiki/How-to-checkout-older-mbed-OS-5-branch

This is related to #4624.

@theotherjimmy

This is headed in the right direction. For the best user experience, an exporter:

  • Takes input from the resource scan.
  • Uses the flags in the build profiles.
  • Has a single template file for each file type they produce. For example, an eclipse CDT project would have one template for .project files and one for .cproject files.
  • Does not call mbed CLI. It is possible to export from the website, which will not include mbed CLI in the resulting zip.
tools/export/gnuarmeclipse/__init__.py Outdated
print 'Project name: {0}'.format(self.project_name)
print 'Target: {0}'.format(self.toolchain.target.name)
print 'Toolchain: {0}'.format(self.TOOLCHAIN)
def collect_tmpl_vars(self):

This comment has been minimized.

@theotherjimmy

theotherjimmy Aug 23, 2017

Contributor

Could you rename this "create_jinja_ctx"? That's what it does after all.

tools/export/e2studio/__init__.py Outdated
self.gen_file('gnuarmeclipse/makefile.targets.tmpl', jinja_ctx, 'makefile.targets', trim_blocks=True, lstrip_blocks=True)
print
print 'Done. Import the \'{0}\' project in Eclipse.'.format(self.project_name)

This comment has been minimized.

@theotherjimmy

theotherjimmy Aug 23, 2017

Contributor

Could you change this to say "Import the project located at \'{0}\'.format(self.export_dir)? That way the user knows exactly what to do.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Aug 23, 2017

Most of the way there. I would like to see a single template file before this is merged though.

@phyokyaw

This comment has been minimized.

phyokyaw commented Aug 23, 2017

@mbedNoobNinja, Hello :-) I am in the process of updating e2 studio exporter for RZ-A1H and I believe you added support for VK-RZA1H as part of #3632. As RZ-A1H and VK-RZA1H require same template file I'll remove VK-RZA1H templates you added to single template.

@phyokyaw phyokyaw force-pushed the phyokyaw:master branch to 2cbca70 Aug 23, 2017

@0xc0170 0xc0170 added the needs: work label Aug 23, 2017

@phyokyaw

This comment has been minimized.

phyokyaw commented Aug 29, 2017

@theotherjimmy Hi Jimmy, pushed amended patch based on your feedback. Please review if you have time. Thanks.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Aug 29, 2017

Looks great! I'm glad you were able to remove the duplication in this exporter. It looks like your .cproject project file template might be the same as the gnuarmeclipse exporter's template. Is that the case? If so, could you just use the gnuarmeclipse one?

@phyokyaw

This comment has been minimized.

phyokyaw commented Aug 29, 2017

Thanks for the reply. e2 studio extends gnuarmeclipse toolchain IDs in .cproject file. So we can't really reuse .cproject file from gnuarmeclipse exporter directly. There are minor differences on IDs in a few places.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Aug 29, 2017

Thanks for the quick response. What do we need to add to the CI machines to make it possible to regression test this exporter as part of morph export-build?

@theotherjimmy theotherjimmy added needs: CI and removed needs: work labels Aug 29, 2017

@phyokyaw

This comment has been minimized.

phyokyaw commented Aug 30, 2017

Just wondering how CI regression test is done for gnuarmeclipse exporter? We can do similar. It wont be simple to test if the exported project builds on e2 studio build.

@JojoS62

This comment has been minimized.

Contributor

JojoS62 commented Aug 30, 2017

I'm working on the MCUXpresso exporter, it uses also the gnuarmeclipse as a base. There is a build method that calls the IDE in 'headless' mode, which means the build process is started without gui. For MCUX, I had to change only the cmd name because its different than 'eclipse'. For e2 it may be also the only modification.
For testing I have started the process in the cmd window with the arguments in the build method.
The mbed team need to install the e2studio software on their testing machine and add this exporter to the tests.

@phyokyaw

This comment has been minimized.

phyokyaw commented Aug 30, 2017

Many thanks for response and info.

There is a build method that calls the IDE in 'headless' mode, which means the build process is started without gui.

I assume CI uses
https://gnu-mcu-eclipse.github.io/advanced/headless-builds/
e2 studio command is still 'eclipse', so no need to change and should build as standard eclipse. e2 studio is downloadable and should be able to add to tests as standard eclipse.

@theotherjimmy The exported project on CI won't be built because latest CMSIS-RTOS mbed OS 5.5 doesn't support RZ-A1H (Cortex-A). Please let me know the status on this.

Thanks

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Aug 30, 2017

@phyokyaw You make a very good point. However, I would still like to make sure that if we enable support in the future, after turning on Cortex-A support, that it will "just work" in the sense that it will test this exporter in CI after that point forward.

@phyokyaw

This comment has been minimized.

phyokyaw commented Sep 4, 2017

Is there anything I need to do from my side for this work?

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Sep 5, 2017

@phyokyaw Nope. We have a bit of a backup in CI tasks. We're probably done with the yak shaving, and we might be able to add this exporter to CI soon.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Sep 21, 2017

/morph export-build

@mbed-bot

This comment has been minimized.

mbed-bot commented Sep 22, 2017

Result: SUCCESS

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

/morph export-build

Output

mbed Build Number: 150

All exports and builds passed!

@theotherjimmy theotherjimmy merged commit b886386 into ARMmbed:master Sep 25, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-export-build Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@0xc0170 0xc0170 referenced this pull request Jun 26, 2018

Closed

Update e2 studio exporter #4942

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment