successfully building a working visual studio code on the jetson xavier nx

In two earlier posts I wrote about building Visual Studio Code (vscode) so I could use it for development on the Jetson Nano and NX. I thought my build was a failure. Turns out, it wasn’t. What was a failure was my ability to understand how certain aspects of vscode have come to operate over the last few major releases. Once I really sat down and paid attention to what was happening, everything just fell into place.

As before I used the directions on Clarence’s Wicked Mind blog ( https://www.clarenceho.net/2019/05/building-visual-studio-code-on-jetson.html ). Even though these directions are now over a year old, they still work, which to me is amazing considering how bit rot can quickly set into any given how-to. Since I’m still building off trunk, and not the latest formal release, I wound up with this version:

The current formal release is 1.46 (I checked on my Mac).

I went in and picked out the extensions I wanted to work with because of what I’m working with on the NX:

And for the curious, I’m running the Docker extension with Docker on the NX, and just for grins, I opened up the debug console on the right, just to see what that was all about. All pretty impressive and it looked really interesting, except for the Recommended section on the bottom left, which is empty. And that’s what kept sending me over into the weeds.

I could have sworn on a stack of Bibles that Recommended is never empty. So I went and checked again on my Mac, and wouldn’t you know it, it only had two entries. The behavior I’m describing used to be this way, on Windows. But it changed, and even though I’ve been good to keep up with the updates, I just didn’t pay attention. So when I saw zero recommendation I thought it was somehow broken. Until I went searching for something, and discovered this behavior all over again:

When I searched for ‘angular’ as an example, lo and behold I got all the Angular plugins. A few more searches and I was finally convinced I had a fully working VSCode for the Jetson SBCs. I was just absolutely stupid.

And since I started out with Docker, here’s a bit more of the Docker plugin to gaze upon:

The Docker plugin gives a bit more control and insite into Docker containers. The middle upper window is latest.json for the image, while the bottom middle is attached to the bash shell running inside the container. The right window is the debug window for all of VSCode, just so it looks cool in the blog post. Whatever…

Right now I’ve got a fully operational instance of VSCode by following someone else’s directions to build it. And I couldn’t be happier. Hopefully, I’ve gotten past this patch of personal stupids. But you never know.

bringing up jetson xavier nx developer kit

Jetson Xavier NX with JetPack 4.4 DP building emacs 28 with all six ARM cores

The Jetson Xavier NX Developer kit arrived today. I have installed JetPack 4.4 Developer Preview, just like I did with my Jetson Nano. I also moved my Crucial 500GiB SSD over and plugged it into the NX. JP 4.4 was flashed onto a SanDisk 128GB SDXC Extreme Plus V30 XC1 U3 A2 (yeah, I know). After initial poweron and setup, the card has 117GiB total storage, with 13GiB of it used so far.

First things I installed were pip, curl, htop, and jtop.

With the SSD installed I moved over to the emacs build area and prepared to build and install emacs, just like I’d done on my Nano. For that I installed the following libraries (again):

  • texinfo
  • libxaw7-dev
  • libjpeg-dev
  • libpng-dev
  • libgif-dev
  • libtiff-dev
  • gnutls-dev
  • libncurses-dev
  • libfreetype6-dev
  • libcairo-dev
  • libgif-dev

The last entry, libgif-dev, was missing in my original post about building emacs. I’d picked it up when I built python 3.8.3 first. This time I built emacs first, just to test my original build directions, and found the hole in my installation. Of note is what apt printed to the console when installing three of the libraries:

Note, selecting 'libgnutls28-dev' instead of 'gnutls-dev'Note, selecting 'libncurses5-dev' instead of 'libncurses-dev'Note, selecting 'libcairo2-dev' instead of 'libcairo-dev'

Everything built and linked successfully in spite of the “substitutions.” No, I did not see this the last time.

I checked the emacs clone with git status, and found nothing in source had changed. I then performed a make clean, followed by a configure, then a ‘make -j 6’ so I could run make against all six cores of the NX. That’s why jtop’s CPU monitor shows all six cores fully utilized. Once finished, make install, and then a quick test. Before this I’d moved over all my emacs configuration files.

emacs 28 running on the Jetson Xavier NX Developer Kit

Not much more to say at this point. I have yet to decide if I’ll build python 3.8.3 like I did on the Nano. I do want to get completely off of Python 2, but I need to better understand the tooling in JetPack before I go off and break stuff.

I will have more to say later about the overall hardware of the NX. Suffice to say it’s a hex core Cortex A75 equivalent, which is, core for core, twice the performance over the Nano’s Cortex A57 cores. It has 8GiB of memory, which makes development much sweeter than on the Nano. And this Developer Kit comes with WiFi and Bluetooth built-in, which makes it much easier to integrate with network and other wireless tools. But as I said, more to come.