Confusion about TX2 development

I am accustomed to doing cross-development for embedded systems. In fact, I prefer that because the target system remains clean of development tools.

How much of TX2 development is done on the TX2 itself and how much is done on a host machine using cross-development tools?

For instance, I believe that the “JetPack-L4T-3.0-linux-x64.run” application is run on a host machine, as part of that application burns the flash on a TX2. At what point is the TX2 the development host?

Not a particularly specific answer, but the TX2 is a full and complete Linux distribution capable of any development you are interested in. JetPack itself runs only on the x86_64 host. If the host has an NVIDIA GPU and CUDA installed (which I think JetPack can set up), then it may be possible to develop CUDA on either (the host can have the cross compile tools and copy to the Jetson or build for the native host). Eclipse itself is a bit confusing (we’re talking all eclipse, not just the nsight edition) and has multiple ways to talk to the Jetson. In theory you can use eclipse to build on host and copy to Jetson for run/debug, or use remote commands to display on x86_64 host but actually build on Jetson (think of different ways to use ssh, scp, and network file systems).

You may be interested in cloning an image from the TX2 for development work, and another for a “clean” reference. Cloned images can be mounted on loopback and used on the host for things like sysroot. See:
[url]https://devtalk.nvidia.com/default/topic/1000105/jetson-tx2/tx2-cloning/[/url]

The TK1 clones with slightly different commands, but most of this information still applies to the TX2:
[url]http://elinux.org/Jetson/Cloning[/url]

Thank you. It will take me a while to digest your response. I hope to be able to close this ticket soon.

I actually don’t have the Jetson devkit yet, but soon

I’ve used Eclipse before, but not recently … and agree that there is a fairly steep learning curve.

I take it that Eclipse is a fairly standard IDE for developing for the Jetson TX2. Are there sample Eclipse projects available?

Oh … FYI … I’m using VirtualBox on Win7Pro64, with a Ubuntu 64 guest OS. I haven’t decided how I’m going to talk to the Jetson … just console at first

The “nsight” edition of eclipse is available which understands CUDA and the nvcc compiler when doing CUDA work. There are several examples available…JetPack is a front end installer and can be used to install different tools and examples on both host and Jetson (package installs to Jetson run over the ethernet, flashes run over USB2,). JetPack does require x86_64 Ubuntu 14.04, though some people have had it work on Ubuntu 16.04. Command line flash works from any x86_64 Linux host…Ubuntu is not required if all you do is flash from command line.

One thing to know about flashing is that often VMs are unreliable…they seem to have USB issues. Sometimes it is significant work to get things “tuned” for a VM to use for flashing. For other uses I do not know how well a VM works, e.g., I imagine running a CUDA program on a VM could present problems.

You can do either. Either develop on a host, and deploy to the Jetson, or develop on the Jetson.

Deploying to the Jetson can also be quick (just upload a new compiled binary to an existing system and restart some process) or more involved (prepare a full new filesystem and re-flash the device from scratch.)

It’s very flexible in this regard; you can set it up any way you like it.

That being said, I’d recommend real hardware for the Ubuntu host. And I absolutely, 100%, recommend using networking (preferably wired Ethernet) to talk to the Jetson, rather than just serial console.

I will receive a couple of Jetson TX2 devkits soon. I will use one of those for my dev host.

Hopefully that will resolve my confusion.

Do note that the nsight edition of eclipse requires an x86_64 host (which can debug on the Jetson, but does not run directly on the Jetson).

Hmmm … Is there an Eclipse variant that has been ported to the TX2?
Would it be difficult to port Eclipse to the TX2?

The version of eclipse which understands CUDA (nsight) has not been ported to TX2, and so far as I know, there are no plans to do so. I do not know if the source code for nsight eclipse is available or not.

Eclipse by itself is probably a bit heavy to run on a Jetson, but if the right repository is enabled, it’s just “sudo apt-get install eclipse” (you’ll need to be brave to install this on a Jetson when you see all the packages which are required).

Is there an IDE that runs on a Jetson? I’m OK using a terminal, but would rather have an IDE. I suppose an GUI editor like gedit would suffice for editing

Nick,

I was confused like you at first. Try out this guide for developing on your host machine for the Jetson target – https://devblogs.nvidia.com/parallelforall/cuda-jetson-nvidia-nsight-eclipse-edition/

You can also develop on the target natively like the OpenCV tutorials show – https://www.youtube.com/watch?v=gvmP0WRVUxI

Good luck to us all! haha.

I think the difficulty here is that he has two Jetsons and wants to use one as a host and the other as target (not for flashing, but general development…thus the IDE must run on the Jetson). Correct me if I’m wrong on that…

The long answer is that if I develop on a Jetson, I would also use it for testing along with the second Jetson. One of the critical features of our product is having a mesh network between all of our units, which would be custom boards featuring TX2 modules.

So, one approach would be to use an IDE on the development Jetson, which I would prefer. I would do it the old-fashioned way if I must.

I’ve not used eclipse and have spent well over a year learning Qt (I’m a slow learner.) :)
Now that Qt 5.9 source is available, does it have cuda support? If not, anyone willing to do that? At this point, porting it is way beyond my skillset. Qt has a huge, worldwide following and a huge number of libraries available, as well as also being free to use under non-commercial apps.

I’ve just used editors on Jetsons, I’ve not used an IDE directly on one. As fast as a Jetson is compared to any other embedded system it still doesn’t have the raw power of a desktop PC…I think ordinary editors should run fine, but many IDEs would probably slow down to the point of irritation. There are some nice editors though, you might test how well nedit or kate work…juffed is nice, but last I heard it was having an issue on arm64.

Lots of combinations you can use to do development on the TX2. You could mount the TX2 filesystem and use eclipse on a desktop while having build scripts run on the TX2 so you didn’t need to use a cross compiler and move the result over. Or you can develop the app on the desktop, get it working there first, and then move it over and rebuild it on the TX2.