Cross Compiling C/C++ code for Jetson Nano in Ubuntu 18.04 in a host PC(x86/x64)

Hi,
I’m using ZED Camera along with Jetson Nano for a project.I don’t want to install IDE’s in Jetson Nano as they consume space.So i want to setup a development environment with Ubuntu host machine.

  1. Where i can download GCC Toolchain of Jetson Nano which can cross-compile the application for Jetson Nano.

  2. How to configure CMAKE with corresponding toolchain.

  3. If Host PC doesn’t have Nvidia/CUDA support could it be possible to do the Cross-Compilation on that PC.

Please download the tool chain from download center.

Jetson Download Center | NVIDIA Developer → Tool chain for rel-32.1.

There is no direct method for configure cmake, but you could refer to L4T document (also on download center) and see how to configure the cross compile environment.

If you need to cross compile cuda kernel app, please refer to this thread.

https://devtalk.nvidia.com/default/topic/1049299/cross-compile-cuda-engines/?offset=2

Hi, nerellasureshkumar7

  1. How to configure CMAKE with corresponding toolchain.

CMAKE also use the system CC,CXX,AR … So just reconfig these env values will work for CMAKE.

  1. If Host PC doesn’t have Nvidia/CUDA support could it be possible to do the Cross-Compilation on that PC.

Refer to the project below. You can find all you want.

Hi Alan
I purchased a camera for the Xavier NX that requires me to cross compile drivers. I have not done this before.
I read the material on the GitHub and would like to give this a try.
Before: I get started I have a couple of questions:

  1. I have 2 possible x86 machines to configure for the purpose:
  • a) An old Alienware mx18 R2 with dual gtx 680m gpus and a 4 core processor. ( I would prefer to use this)
  • b) An old workstation with an 8core 5960x and 1080ti gtx
    Would any of these machines be suitable?
  1. There seem to be options in how to set-up the configuration in the materials on the github. For a beginner like me what is the best “simplest” option set to follow?
  2. in the pdf file, Section: set-up the cross compile.
    Option 2 looks like it is a configuration file of some sort, what is the fully qualified file name for this file? filename.ext this seems like the easiest path to follow.

@Irakandjii

  1. I think either X86 machines is ok, it depend on the CPU performance to cross compile the code.

Build with copied rootfs with qeum need long time for the first setup, but will be more easy for the later develop. Directly config or write a makefile is ok for some simple case with few compile dependency. Qeum solves the key issue: dependency.