Setting Up NSight Eclipse for Cross Compile with AGX

Hi,

I’ve just installed JetPack 4.3 on my host PC (Ubuntu 18.04) and flashed my Jetson AGX. The next thing I want to do is setup my PC and AGX so that I can code on my host PC and then cross compile to the AGX.

Are there steps/instructions for doing this? I read here (https://docs.nvidia.com/cuda/nsight-eclipse-edition-getting-started-guide/index.html) that NSight should be installed with the NVIDIA CUDA toolkit, however, when I try running “nsight” on the host pc I get "Command ‘nsight’ not found…install with…etc’.
From the SDK manager the host components that were installed were:

  • CUDA -
    CUDA on Host
    CUDA Cross Compile Package on Host
  • Computer Vision -
    OpenCV on Host
    VisionWorks on Host
  • Developer Tools -
    NVIDIA Nsight Graphics
    NVIDIA Nsight systems
    DevTools Documentation

Do I need to also install the nvidia-cuda-toolkit on my host PC? Is this not part of the SDK manager downloads for some reason?

I’m very new to all of this so I may just have missed something basic…
Thanks for the help!

Hi,

It’s required to install the host CUDA-toolkit from the JetPack4.3 for the compatibility.
This can be found in the sdkmanger in the HOST section.

The CUDA path may not be added into the environment parameter.
You can also try this command to specify the nsight location.

/usr/local/cuda-10.0/bin/nsight

Thanks.

I don’t see an option for CUDA-toolkit underneath the host section in sdkmanager. However, when I use

/usr/local/cuda-10.0/bin/nsight

This is what comes up in the terminal when I run the code above…

connor@connor-ubuntu:~$ /usr/local/cuda-10.0/bin/nsight
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
CompileCommand: exclude java/lang/reflect/Array.newInstance
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.osgi.storage.FrameworkExtensionInstaller (file:/usr/local/cuda-10.0/libnsight/plugins/org.eclipse.osgi_3.10.1.v20140909-1633.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.eclipse.osgi.storage.FrameworkExtensionInstaller
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

I am able to open NSight and select a directory but then it crashes, leaving an error log here

“An error has occurred. See the log file
/home/connor/cuda-workspace/.metadata/.log”

The full log is ~2000 lines long, is this related to installing the CUDA-toolkit? Would it be ok for me to install the CUDA-toolkit 10-2 from here (https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804) instead of sdkmanager?

Edit: Running…

nsight -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

Allows me to use NSight Eclipse.

However, I am still wondering about installing the CUDA-toolkit since I don’t see it installed by the sdkmanager. Running the command

nvcc --version

tells me to install the nvidia-cuda-toolkit

Edit2: Sorry for the all the edits…
I can see nvcc in

/usr/local/cuda-10.0/bin

How should I edit what is in (https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) section 7 to add this to my PATH? I have followed the instructions in sections 7.1.1 but “nvcc --version” still does not work.

Edit3: Adjusted PATH env variables…all seems to be working now.
So back to my main reason for this post. Is there any other setup or preparation needed in order to setup my Xavier for cross compile with NSight? Or are there any other suggested changes that should be made?

To this point I have flashed my Xavier using SDK manager with Jetpack 4.3 and a have installed all host components on my pc (Ubuntu 18.04).
SDKMan_20200302.png

Hi,

Nsight should prepare all basic requirement for cross-compiling.
You can just try a CUDA sample to see if every works fine.

Thanks.

Thanks. The issues ended up just being related to setting up the path environment variables so that I could find nsight/nvcc etc.

Good to know this.