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

Please add support for ARM (and Raspberry Pi) #13

Closed
gingters opened this issue May 2, 2019 · 49 comments
Closed

Please add support for ARM (and Raspberry Pi) #13

gingters opened this issue May 2, 2019 · 49 comments
Assignees
Labels
feature-request Request for new features or functionality linux Issue on Linux ssh Issue in vscode-remote SSH
Milestone

Comments

@gingters
Copy link

gingters commented May 2, 2019

It would be great if VSCode remote would also support connecting to Raspian on a Raspberry Pi.

On Twitter @egamma said, there's no AMD build (yet) for the VS Code server part yet. For Raspian this also needs to be a 32bit build, and not 64bit.

Raspberry Pi 2's all have ARMv6 or ARMv7 CPUs which are all 32bit only, and while Raspberry Pi 3's have an ARMv8 CPU that is 64bit capable, Raspbian is only available in 32bit builds.

@Chuxel Chuxel added feature-request Request for new features or functionality ssh Issue in vscode-remote SSH labels May 2, 2019
@dschaefer
Copy link

+1 :)

@dschaefer
Copy link

Assuming a remote has node.js available. Wondering what native libraries would be needed.

@dschaefer
Copy link

So I was thinking more of running VS Code on my laptop and doing builds and debug on the Pi. Why couldn't we just use the Remote-SSH feature for that.

Also, coming from the C++ world where myself and the Eclipse CDT team are building a vscode extension based on clangd, I need to understand how that or any other language server plugs in. I assume we need that on the remote?

@Chuxel Chuxel changed the title Please add support for Raspberry Pi Please add support for ARM (and Raspberry Pi) May 2, 2019
@egamma
Copy link
Member

egamma commented May 2, 2019

@dschaefer

So I was thinking more of running VS Code on my laptop and doing builds and debug on the Pi. Why couldn't we just use the Remote-SSH feature for that.

VS Code will provision the VS Code Server into your box and for this to work the VS Code Server has to run in your remote environement.

Also, coming from the C++ world where myself and the Eclipse CDT team are building a vscode extension based on clangd, I need to understand how that or any other language server plugs in. I assume we need that on the remote?

The VS Code extension will work transparently in the remote setup. All you need to do is to install.

@dschaefer
Copy link

Here's me making assumptions. I thought this was an open extension. Is the protocol open at least so we could write our own servers?

@egamma would I need an ARM/Linux version of the language server for the Pi?

@egamma
Copy link
Member

egamma commented May 2, 2019

I thought this was an open extension. Is the protocol open at least so we could write our own servers?

Sorry, we did not specify the extension host protocol. It is an area where we make frequent changes/optimisations and we cannot afford the costs of maintaining a specification same as we did for LSP.

@egamma would I need an ARM/Linux version of the language server for the Pi?

Yes you would need the language server running on the PI, but also the VS Code Server that hosts the extension that launches the language server.

@dschaefer
Copy link

Of course, the difference is, I can make the language server, clangd, run on the Pi (or on my QNX device) since it's fully open :).

@egamma
Copy link
Member

egamma commented May 2, 2019

Of course, the difference is, I can make the language server, clangd, run on the Pi (or on my QNX device) since it's fully open :).

Understood. However, we have to be realistic about the cost of an open specification for a domain like IDE extensions. We know this very well from the LSP/DAP spec work.

If your goal is to run a clangd language server remotely then you can also achieve this by remoting the LSP protocol (there are node modules to do so, they communicate through a web socket to an express server running on your device).

@dschaefer
Copy link

@egamma Frankly, my goal is to help enable Remote-SSH for embedded targets that have self hosted toolchains, like the Raspberry Pi, for whatever operating system it may be running. Looks like that will have to wait.

@egamma
Copy link
Member

egamma commented May 3, 2019

@dschaefer the original issue was a request for ARM support, which is totally fair. Suggest to file a separate issue that captures your broader vision.

@selfup
Copy link

selfup commented May 3, 2019

This would be an awesome achievement. Debugging GPIO stuff on a raspberrypi through VSCode would be amazing 🎉

@ericblade
Copy link

As an embedded systems developer, this would be super cool. My embedded systems all run node too :-)

@Tyriar Tyriar removed their assignment May 5, 2019
@nataelj
Copy link

nataelj commented May 5, 2019

Not just GPIO stuff; ALL stuff on the Pi! This is actually clearly something in demand already as someone previously compiled a VS Code version for the Pi (https://pimylifeup.com/raspberry-pi-visual-studio-code/). I've been using that until recently but, on switching to a smaller-profiled devices (which required lower memory) found it no longer worked. The solution discussed here would be the ideal solution for this situation!

@ghost
Copy link

ghost commented May 9, 2019

@dschaefer I ran into a similar issue/quandary and raised a more general issue/request, at least for Remote - SSH (#257)

Slightly different than how Eclipse handles remote/embedded development support (at least the last time I tried - but I was never able to get it up and operational).

@dschaefer
Copy link

@Jmcpeek Eclipse, or at least the Eclipse C/C++ IDE assumes a cross-development environment for remote/embedded where your compiler and debugger run locally.

This feature of vscode assumes you can compile and debug on the remote but not run vscode there, or at least not all of it. That's what makes this really interesting, especially for larger systems that run Linux or similar OS's that have hard to set up cross-development environments. And, again, the Raspberry Pi is the poster child for this :).

@duwke
Copy link

duwke commented May 9, 2019

And beaglebone and odroid and ...

@pfeerick
Copy link

Having armhf builds will allow the water to be tested on more than a few SBCs like the rPi, Odroid, etc.

@dschaefer
Copy link

dschaefer commented May 11, 2019

I think the biggest challenge if they don't open source this is also supporting armv7 and aarch64 versions such as the cool cheap little boards at Friendly Elec, and even all the Odroid variants.

@magic-k
Copy link

magic-k commented May 12, 2019

Im throwing arm64 chromebooks into the ring. I would really love to use my arm64 chromebook for stuff like developing in arm64 containers.

@pfeerick
Copy link

@magic-k Just having an armhf build (at all!) should be enough to get started with that, as you can usually install armhf as a foreign architecture and run that on arm64 ;)

@fakhamatia
Copy link

I use THIS extension to ssh.
Its support armv7l as well .
But in this extension you cant use extensions on the server side.

@rikhuijzer
Copy link

I use THIS extension to ssh.
Its support armv7l as well .
But in this extension you cant use extensions on the server side.

Same advise as @ptone

@joaomoreno
Copy link
Member

Done! 🎉

https://twitter.com/joaomoreno/status/1138379435839754240

@joaomoreno joaomoreno self-assigned this Jun 11, 2019
@magic-k
Copy link

magic-k commented Jun 11, 2019

Any technical reason for not extending this to arm64? Don't want to be greedy, just curious.

@isaacrlevin
Copy link

I am getting an error when trying to connect to my pi

Connected to SSH Host - Please do not close this terminal

"SSH Tunnel" terminal command canceled
SSH tunnel command completed unexpectedly

Here is my ssh_config

Host pi
    HostName 192.168.0.101
    User pi

@joaomoreno
Copy link
Member

Any technical reason for not extending this to arm64? Don't want to be greedy, just curious.

No technical reason other than not having hardware to test it on right now.

@SuperSandro2000
Copy link

Any technical reason for not extending this to arm64? Don't want to be greedy, just curious.

No technical reason other than not having hardware to test it on right now.

If you have a Rpi 3b you can install ubuntu with arm64

@arhimondr
Copy link

arhimondr commented Jun 12, 2019

@joaomoreno Still fails =\ Here's the log: https://gist.github.com/arhimondr/ab6ca4e7d6798231667fb0a59c1c15ac

Although there's a chance that i messed up with the nightly build (it still shows the version as [email protected]: https://gist.github.com/arhimondr/ab6ca4e7d6798231667fb0a59c1c15ac#file-gistfile1-txt-L1).

However it no longer fails with the unreachable or not Linux x86_64 message, so it looks like the nightly version has been used.

Versions: https://gist.github.com/arhimondr/05f10df9f2d65c60f8246e4ae89a60aa

@pfeerick
Copy link

pfeerick commented Jun 12, 2019

@arhimondr You got an Exec format error near the end there when it failed... so it's loading the wrong binaries... oh, and try deleting the /home/pi/.vscode-server folder and letting it set up again... that's the 'stable' version of the server... you need the .vscode-server-insiders to be installed ;)

I had similar issues, but my problem now (resolved below via public key authentication) is the vscode-server(-insiders) is installed and running, but the ssh terminal won't connect. On a rPi 3.

> Connected to SSH Host - Please do not close this terminal
> 
"SSH Tunnel" terminal command canceled
SSH tunnel command completed unexpectedly

@spraot
Copy link

spraot commented Jun 12, 2019

I have the same issue @pfeerick although it just hangs forever at that step. The log on the host/server doesn't seem to show any activity at all.

@pfeerick
Copy link

pfeerick commented Jun 12, 2019

@rachetfoot Eureka... bit more poking around and it now works! :D Set up public key authentication so you have passwordless login... and it will then all 'just work' ;) Better off that way in the long run as you don't want to have to enter passwords every time you re-open the connection...

i.e. https://www.ssh.com/ssh/copy-id#sec-Setting-up-public-key-authentication

@spraot
Copy link

spraot commented Jun 12, 2019

Thanks @pfeerick but I have that already. Oddly the first time I ran it it seemed to get farther before it failed, but now it hangs instead. I've tried closing the processes on the host, deleting the .vscode-server* folders and even rebooting, but I still hangs. I also have the keep terminal window open option enabled, but it still doesn't show me anything.

@pfeerick
Copy link

pfeerick commented Jun 12, 2019

@rachetfoot :( I did pretty much the same... It installed perfectly the first time, then got stuck on the tunnel... and had to enter the password about four times once for login, once for the install, and then twice for the tunnel... which failed. I ended up realising I had both .vscode-server and .vscode-server-insiders... so nuked both, and killed the vscode-server processes (using htop)... then tried again... hit the tunnel issues again... then copied the ssh key and double checked it was working with the insiders terminal... and it worked for me.

Fingers crossed you work out the magic sauce... the integration looks pretty good! ;)

Code_-_Insiders_ZCutVc55Fv

@spraot
Copy link

spraot commented Jun 12, 2019

I tried a couple more times (including deleting the vscode-server files and stopping the processes) and now it's working. The only other maybe relevant change I recall is enbabing PermitUserEnvironment in /etc/ssh/sshd_config.

@joaomoreno
Copy link
Member

cc @roblourens

@roblourens
Copy link
Member

Right now you must uninstall the stable version before using the nightly version, and I just released an update with a warning message to make this more obvious. And if you tried to connect with the stable version, you will need to delete the wrong platform bits that it installed so it will redownload the correct bits. You can do this with the "Uninstall VS Code Server" command. Sorry for the trouble.

@electronics-ElectroAD
Copy link

I can get it to work with the Raspberry Pi 3 but not with Zero W. VSCode outputs "Unsupported architecture: armv6l". Is it being worked on?

Using the nightly Remote SSH and VSCode as indicated in the blog posts.

@Misiu
Copy link

Misiu commented Jul 2, 2019

@joaomoreno any news about Raspberry Pi Zero W? As @electronics-ElectroAD wrote, this currently outputs unsupported architecture. Should we fill new issue for Pi Zero W or can it be addressed in this?

@MrAdam
Copy link

MrAdam commented Jul 9, 2019

@roblourens, any idea when this can be used with the stable version of VS Code?

@jguiditta
Copy link

Are there plans to extend this support to other distros that run on the Pi, like fedora?

@noterms
Copy link

noterms commented Jul 13, 2019

@joaomoreno i would appreciate some love for arm67 raspberry Pi Zero W that would be amazing! Keep up the good work.

@rosslannen
Copy link

Any technical reason for not extending this to arm64? Don't want to be greedy, just curious.

No technical reason other than not having hardware to test it on right now.

@joaomoreno We are using a yocto linux for arm64, and would like to know if there is any way we could build/test remote editing for this architecture?

@joaomoreno
Copy link
Member

@rosslannen Not currently, no. Only armv7.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality linux Issue on Linux ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests