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

Feature vscode #3915

Merged
merged 1 commit into from Apr 20, 2017

Conversation

Projects
None yet
@janjongboom
Contributor

janjongboom commented Mar 9, 2017

Adds the Visual Studio Code exporter. See also #3568 and #3679.

Things that are a bit broken

  • Non-recursive includes are broken in Visual Studio Code on Windows and Linux. Will be fixed upstream. Works on Windows.

@janjongboom janjongboom force-pushed the janjongboom:feature-vscode branch 4 times, most recently Mar 9, 2017

@theotherjimmy

Looks nice. I look forward to seeing this on master.

@0xc0170

Is this now ready for integration?

tools/export/vscode/vscode.md Outdated
@@ -0,0 +1,37 @@
# VSCode exporter
Exporting for Microsoft Visual Studio code works on Windows, Mac and Linux but will expect a few system dependnecies to be installed. The exporter creates task files and launch files that make it easy to compile and debug within the IDE. Building is done using the created makefile. Debugging with GDB and pyOCD

This comment has been minimized.

@0xc0170

0xc0170 Mar 10, 2017

Member

dependnecies to be installed.

dependencies

@@ -0,0 +1,80 @@
from os.path import join, exists, realpath, relpath, basename, isfile, splitext

This comment has been minimized.

@0xc0170

0xc0170 Mar 10, 2017

Member

missing license header on top of the file

@janjongboom janjongboom force-pushed the janjongboom:feature-vscode branch Mar 10, 2017

@janjongboom

This comment has been minimized.

Contributor

janjongboom commented Mar 10, 2017

@0xc0170 Let's see what the MS people come back with around the two issues raised.

@adbridge

This comment has been minimized.

Contributor

adbridge commented Mar 22, 2017

restart uvisor

@sg- sg- removed the needs: review label Mar 22, 2017

@janjongboom

This comment has been minimized.

Contributor

janjongboom commented Mar 24, 2017

@sg- @0xc0170 Windows now debugs out of the box!

According to MS the issue with non-recursive paths is only there on macOS and Linux, so I'd suggest to just release this, and when the new version of vscode comes out it will be patched for mac and Linux. The right paths are already generated.

@janjongboom

This comment has been minimized.

Contributor

janjongboom commented Mar 27, 2017

Proof that it's context-aware :-) (exported to K64F). Jump to definition also goes to the right PinNames file now.

vscode-context-aware

@janjongboom

This comment has been minimized.

Contributor

janjongboom commented Mar 28, 2017

@sg- @0xc0170 Can someone test this and merge if they're happy?

@janjongboom

This comment has been minimized.

Contributor

janjongboom commented Mar 30, 2017

Ping again, @0xc0170 @theotherjimmy

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Mar 30, 2017

What do you need from me? I can't merge PRs and I approved this one.

@janjongboom

This comment has been minimized.

Contributor

janjongboom commented Mar 31, 2017

@theotherjimmy Then, ping @sg- again :p

@sg-

A few questions and some docs work but looking good. Let me know what parts I can help with.

"debugServerPath": "pyocd-gdbserver"
},
"windows": {
"preLaunchTask": "make.exe",

This comment has been minimized.

@sg-

sg- Apr 3, 2017

Member

Why do we need to prelaunch and run make on windows only?

This comment has been minimized.

@janjongboom

janjongboom Apr 10, 2017

Contributor

We don't. There's a global prelaunchTask for make which runs on macOS and Linux.

"windows": {
"preLaunchTask": "make.exe",
"MIMode": "gdb",
"MIDebuggerPath": "C:\\Program Files (x86)\\GNU Tools ARM Embedded\\4.9 2015q3\\bin\\arm-none-eabi-gdb.exe",

This comment has been minimized.

@sg-

sg- Apr 3, 2017

Member

Though it was ok to just use the executable name. Why the path here?

},
"osx": {
"MIMode": "gdb",
"MIDebuggerPath": "/usr/local/bin/arm-none-eabi-gdb",

This comment has been minimized.

@sg-

sg- Apr 3, 2017

Member

Though it was ok to just use the executable name. Why the path here?

This comment has been minimized.

@janjongboom

janjongboom Apr 3, 2017

Contributor

@sg- Only for debugServerPath unfortunately... See this comment.

},
"linux": {
"MIMode": "gdb",
"MIDebuggerPath": "/usr/bin/arm-none-eabi-gdb",

This comment has been minimized.

@sg-

sg- Apr 3, 2017

Member

Though it was ok to just use the executable name. Why the path here?

"MIMode": "gdb",
"MIDebuggerPath": "C:\\Program Files (x86)\\GNU Tools ARM Embedded\\4.9 2015q3\\bin\\arm-none-eabi-gdb.exe",
"debugServerPath": "pyocd-gdbserver.exe",
"setupCommands": [

This comment has been minimized.

@sg-

sg- Apr 3, 2017

Member

Does this override global setup commands or should they be moved under Mac / Linux?

This comment has been minimized.

@janjongboom

janjongboom Apr 3, 2017

Contributor

Yes, this overrides the global setupCommands section. So only applies on Windows.

tools/export/vscode/vscode.md Outdated
@@ -0,0 +1,40 @@
# VSCode exporter

This comment has been minimized.

@sg-

sg- Apr 3, 2017

Member

Lets get rid of this and have a proper docs page in the handbook under exporters

This comment has been minimized.

@janjongboom

janjongboom Apr 10, 2017

Contributor

Done.

@sg- sg- removed the do not merge label Apr 3, 2017

@janjongboom janjongboom force-pushed the janjongboom:feature-vscode branch Apr 10, 2017

@janjongboom janjongboom force-pushed the janjongboom:feature-vscode branch to 336e036 Apr 10, 2017

@janjongboom

This comment has been minimized.

Contributor

janjongboom commented Apr 10, 2017

@sg- Rebased against master. Docs are in the handbook now: https://docs.mbed.com/docs/mbed-os-handbook/en/5.4/debugging/vscode/ .

@sg-

This comment has been minimized.

Member

sg- commented Apr 10, 2017

The handbook makes me sad. I think this is what every exporter page should look like. I'd never look under debugging to find this

@sg-

sg- approved these changes Apr 10, 2017

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Apr 10, 2017

restarting Cam-CI because it failed due to a java traceback. We did not write java stuff.

@sg-

This comment has been minimized.

Member

sg- commented Apr 10, 2017

Looking great! Other than moving the docs under the category exporter 👍 We should also consider what is the default debugPath should be. Reasonable options seem to be:

  • Default installation path for the version of GCC_ARM that is supported (4 soon to be 6)
  • Default installation path as installed by mbed CLI installer
  • A environment variable such as VSCODE_GDB_PATH that is required to be setup per machine such that each export doesnt need this field modified
  • Similar, instructions on how to make a symlink from the actual installed path to the path defined by the template

Thoughts?

@janjongboom

This comment has been minimized.

Contributor

janjongboom commented Apr 21, 2017

Tears in my eyes! This is gonna be in 5.4.5 ?

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Apr 21, 2017

I can't see why not. @adbridge Could you check the release version for me?

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Apr 21, 2017

Thanks for the new exporter @janjongboom !

@sg-

This comment has been minimized.

Member

sg- commented Apr 21, 2017

@janjongboom mbed-cli now supports flashing https://github.com/ARMmbed/mbed-cli/releases/tag/1.1.0

This maybe an option for flashing as it will support all boards and not be restricted to pyOCD support (other than the debug ability)... Just a thought I might try out unless you beat me to it :)

@adbridge

This comment has been minimized.

Contributor

adbridge commented Apr 21, 2017

@theotherjimmy You were the one that marked it to go to 5.5.0 .....

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Apr 21, 2017

wait what did I mark for 5.5.0?

@adbridge

This comment has been minimized.

Contributor

adbridge commented Apr 21, 2017

This pr

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Apr 21, 2017

is 5.4.5....

@janjongboom

This comment has been minimized.

Contributor

janjongboom commented Apr 21, 2017

@sg- Yeah, but the feature now does not require CLI at all.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Apr 21, 2017

I'm with @janjongboom on this one. Let's keep the exporter free of calls to mbed CLI.

Maybe @sg- was suggesting that you use the same backend?

@adbridge

This comment has been minimized.

Contributor

adbridge commented Apr 21, 2017

beg your pardon i meant 5.4.5 , it's Friday afternoon here and getting close to home time :)

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Apr 21, 2017

That's cool. Now that we're on the same page, I don't see what the surprise is about.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Apr 21, 2017

I just wanted you to make sure that it was allowed to go to 5.4.5.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Apr 21, 2017

@janjongboom We have turned off the VScode pages on the docs sight until this gets into a release.

@adbridge

This comment has been minimized.

Contributor

adbridge commented Apr 21, 2017

It looks like it is only adding an extra exporter rather than changing any interfaces, so that would make it eligible for a patch release (also assuming it doesn't rely on any other changes that have been bumped to 5.5.0, of which 2 had to be done today)....

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Apr 21, 2017

Yeah. I don't think it is rebased/based on any changes that would cause patch problems come release time.

@adbridge

This comment has been minimized.

Contributor

adbridge commented Apr 21, 2017

@janjongboom I didn't quite understand your comment about which release this was scheduled for? Where you hoping for it to make 5.4.4 ? If so, it just missed it due to it being labeled for 5.4.5. But that will be produced in 2 weeks time....

@sg-

This comment has been minimized.

Member

sg- commented Apr 21, 2017

I just wanted you to make sure that it was allowed to go to 5.4.5.

If this does it also needs docs rebuilt for the release and tools deployed.

@networkfusion

This comment has been minimized.

networkfusion commented May 12, 2017

If this has been released, when will the docs be re-enabled?

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented May 12, 2017

Thanks for the reminder @networkfusion. @AnotherButler Let's turn the docks back on.

@networkfusion

This comment has been minimized.

networkfusion commented May 12, 2017

@theotherjimmy @AnotherButler thanks, please let me know the link when it happens :-)

@janjongboom

This comment has been minimized.

Contributor

janjongboom commented May 12, 2017

@theotherjimmy Can we also make sure it's enabled in online compiler?

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented May 12, 2017

It's not yet. I can push up the 5.4.5 tools release and let you know when it's up.

@janjongboom

This comment has been minimized.

Contributor

janjongboom commented May 12, 2017

@theotherjimmy Cool, please ping me when it's done. I have a blog post ready.

@AnotherButler

This comment has been minimized.

Contributor

AnotherButler commented May 15, 2017

@networkfusion @theotherjimmy The docs are live.

exmachina-auto-deployer pushed a commit to exmachina-dev/mbed-os that referenced this pull request May 16, 2017

Merge tag 'mbed-os-5.4.5' of github.com:ARMmbed/mbed-os into feature/…
…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
@carlosperate

This comment has been minimized.

carlosperate commented Jul 7, 2017

Is it a correct assessment that the docs have been updated (including instructions for the online compiler), but the online compiler has not been updated to >= 5.4.5 yet?

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Jul 7, 2017

Yes. @immunda Could your respond here too when the tools update goes live?

@carlosperate

This comment has been minimized.

carlosperate commented Jul 7, 2017

Thanks for the quick response! I'll keep an eye for when the update goes live online as well.

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