Open main menu

DAVE Developer's Wiki β

Changes

no edit summary
{{AppliesToMito8M}}
{{AppliesToSBCX}}
{{AppliesToSBC Axel TN}}
{{AppliesToVisualStudioCode}}
{{AppliesTo VisualStudioCode TN}}
{{InfoBoxBottom}}
{{WarningMessage|text=This Technical Note was validated against specific versions of hardware and software. What is described here may not work with other versions.}}
Specifically, it is built upon the [https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i.mx-applications-processors/i.mx-8-processors/i.mx-8m-family-armcortex-a53-cortex-m4-audio-voice-video:i.MX8M NXP i.MX8M] system-on-chip (SoC).
This Technical Note (TN) shows how this platform can be set up to enable SSH remote development with [https://code.visualstudio.com/docs/remote/ssh Visual Studio Code](VSC for short).
==Testbed==
===Host===
Regarding the development host, Ubuntu 18.04 distribution was used.
 
After installing [https://code.visualstudio.com/insiders/ Visual Studio Code '''Insiders''']
*The [https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack Remote Development extension] was removed
*The [https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh-nightly Remote - SSH (Nightly) extension was installed]
 
===Target===
For convenience, an Armbian Buster distribution was used on the target. As such, the software configuration is like the one described in [[MISC-TN-008:_Running_Debian_Buster_(armbian)_on_Mito8M|this article]].
Regarding In order to enable the connection with VSC, it is mandatory to set up the SSH server to allow passwordless login for the user(s) utilized for the remote development hostsessions. In this example, an Ubuntuhttps:/the user <code>armbian</code> will be used.visualstudio.com/insiders/For more details on this, please see for instance [https://marketplace.visualstudiolinuxize.com/items?itemName=mspost/how-to-setup-passwordless-vscodessh-remotelogin/ this page]. ==Testing==First of all, the connection with the target has to be established (in this case, 192.168.0.vscode81 is the IP address assigned to Mito8M):  [[File:VSC-remotessh5.png|thumb|center|600px|Establishing the connection with the target]]   In the "Output" box, it is possible to see what is going on during the connection process:  [[File:VSC-extensionpackssh1.png|thumb|center|600px|Connection process]]   httpsOnce the connection is working, it is also possible to get a target's terminal inside VSC:  [[File://marketplaceVSC-ssh2.visualstudiopng|thumb|center|600px|Target's terminal]] When connecting to the target for the first time, VSC will download to the target the ''VS Code Server'', which is required for the remote development sessions.com/items?itemName=ms   Of course, one can navigate the target's directories directly as well:  [[File:VSC-vscode-remotessh3.png|thumb|center|600px|Navigating target's directory]]   The following screenshot shows a remotedebugging session of a simple Python program that is stored on the target's file system:  [[File:VSC-ssh-nightly&WTssh4.mc_id=-blog-scotthapng|thumb|center|600px|Remote debugging session of a simple Python program]] 
==Useful links==
*[https://www.hanselman.com/blog/VisualStudioCodeRemoteDevelopmentOverSSHToARaspberryPiIsButter.aspxVisual Studio Code Remote Development over SSH to a Raspberry Pi is butter]
8,220
edits