-
Notifications
You must be signed in to change notification settings - Fork 3k
Support for Qt Creator Generic project export and associated Makefile #4115
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
Conversation
@cvtsi2sd Thanks ! What does it minimal ? what it covers? any space for improvements? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This exporter looks great!
I have one nit: You generate files in the current directory only. For this exporter to work as an online service, it cannot modify the root of the project. In the online export service, we export to a temporary directory.
Could you change the open
calls to heed the export directory and add the files you generate to the generated_files
member?
Another note: your code might be made simpler if you use the jinja2 template system and the |
Export directory: sure, for some reason I was convinced that this was handled by invoking mbed directly from the other directory, and providing an appropriate Jinja: I considered that when looking at the other exporters, but the format is so trivial that it seemed to me that it would just spread around the logic for no particular gain. OTOH if it already manages the subtleties above I may switch to it. |
I also just noticed that, although in a "generic project" it's not possible to specify the build steps through the documented files, by default Qt Creator tries to launch |
@cvtsi2sd You're in luck! You can inherit from the GCC ARM Makefile exporter and call the super class generate. That will get you a makefile without any work by you. |
It does. |
this also makes so that the export directory setting is honored
this allows Qt Creator to build the generated project "out of the box", enabling integration with the "Issues" list
Ok, I switched to Jinja2 templates and added the Makefile generation, everything seems to be working well! |
@@ -0,0 +1 @@ | |||
[General] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10/10 best template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahaha I told you that I was a bit ashamed to inconvenience Jinja just for this kind of output. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it's there if we need to add something to that configuration file.
tools/export/qtcreator/__init__.py
Outdated
@@ -0,0 +1,68 @@ | |||
""" | |||
mbed SDK | |||
Copyright (c) 2014-2016 ARM Limited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe extend this to 2017?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! LGTM
FYI, pretty sure the |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 153 Exporter Build failed! |
I've since disabled the exporter for now to test the release branch, so I'll go ahead and test this one now as well (should be passing) /morph export-build |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 155 All exports and builds passed! |
@cvtsi2sd Can you also write a handbook page on how to use this exporter? https://github.com/ARMmbed/Handbook/tree/5.4 |
@sg- are you going to block merging this until we get a PR for adding this exporter to the handbook? |
@sg- I hope I did it correctly, there isn't much to write about this, so I essentially outlined what is supported and how to use it. |
Thanks @cvtsi2sd. Looks like nothing is blocking this. |
@theotherjimmy release label for this one please? |
whoops. I have got to get that habit going. |
…lwip_broadcast Release mbed OS 5.4.5 and mbed lib v142 Ports for Upcoming Targets Fixes and Changes 4059: [Silicon Labs] Rename targets ARMmbed#4059 4115: Support for Qt Creator Generic project export and associated Makefile ARMmbed#4115 3915: Feature vscode ARMmbed#3915 4205: tests: race test - add not supported for single threaded env ARMmbed#4205 4187: [NCS36510] Reduce default heap size allocated by IAR to 1/4 of RAM ARMmbed#4187 4145: test - add nanostack to examples.json file ARMmbed#4145 4093: Update.py: New feature - update a branch instead of a fork, plus general improvements. ARMmbed#4093 4225: fixed missing device_name for xDot and removed progen ARMmbed#4225 4243: Config: config header file should contain new line ARMmbed#4243 4251: Fix C++11 build error w/ u-blox EVK-ODIN-W2 ARMmbed#4251 4236: STM32 Fixed warning related to __packed redefinition ARMmbed#4236 4224: Add `mbed new .` output to export ARMmbed#4224 4190: LPC4088: Enable LWIP feature ARMmbed#4190 4136: Error when bootloader is specified but does not exist ARMmbed#4136 3881: Remove debug links to printf/exit in NDEBUG builds ARMmbed#3881 4260: Inherit Xadow M0 target from LPC11U35_501 ARMmbed#4260 4249: Add consistent button names across targets ARMmbed#4249 4254: Removed unused variable in TARGET_NXP/lpc17_emac.c ARMmbed#4254
Description
This commit adds minimal support to
mbed export
to generate Qt Creator Generic Projects.Status
READY
Link to my profile, with signed contributor agreement: https://developer.mbed.org/users/cvtsi2sd/