Preparing to cross-compile

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version

Target Operating System

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version

Host Machine Version
native Ubuntu 18.04

I have already installed Driveworks on my host as indicated here, specially the step #4.

I am now planning how to crosscompile one example. So I am reading this tutorial.

My question is, is the first step

$ sudo dpkg --add-architecture arm64
$ sudo apt-get update
$ sudo apt-get install cuda-cross-aarch64-10-2

necessary? I thought the cross compile libraries were already installed…

Unfortunately I dont have access to the host machine now (will do tomorrow) but would like an explanation. Thanks

Hi, @kansai

I don’t remember if these commands really install any package.
Please go ahead and run them. You will know if they are necessary or not.

I cannot locate where drive-t186ref-linux is. Any help on where this file? directory? is

Dear @kansai,
Have you used the same host to flash target? If so, it is expected to install the necessary packages for cross compilation during setup using sdkmanager. Please find the drive-t186ref-linux folder at <PATH_TO_DRIVEOS>/drive-t186ref-linux. The default installation will be at ~/nvidia/

Actually the SDK Manager only installed CUDA CUDA\X AI Cmake and developer tools. I had to manually install drive works crosscompilation libraries by my self

I found the folder at /home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DRIVE_AGX_XAVIER\DRIVEOS/
I suppose now I have to set the variable by export?

Dear @kansai,
I had to manually install drive works crosscompilation libraries by my self

Does that mean flashing via sdkmanager resulted in errors?

Please use path to drive-t186ref-linux as /home/user/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DRIVE_AGX_XAVIER\DRIVEOS/drive-t186ref-linuxin DW cross compilation instructions

The sdk-manager didnt give any errors. It is just I ve just learned that it does not install it anymore as you told me here Desktop Image

I tried to crosscompile the samples (that I copied to my own directory in my user directory) dw_samples/src by doing the cmake listed in the docs but I got an error

Could not find a package configuration file provided by 
driveworks_visualization with any of the following names


Add the installation prefix of driveworks_visualization to CMAKE_PREFIX_PATH or ser driveworks_visualization_DIR to a directory containing one of the above files

where are those files?

Dear @kansai,
Could you just create a new build folder(use original DW samples installed path instead of creating a copy) and let us know if it works without any issue? If you want to modify/add sample you can create a sample under /usr/local/driveworks-3.5/samples/ and update the make files accordingly.

Thanks. I edited one source file from an example, and with that I could build it.
I would have like to create a sample under /usr/local/driveworks-3.5/samples as you said, but what make files should I update?

and in the future, I would like to create programs under my own user folder, so I wonder what should I modify (I suspect some CMake file) in order to build it correctly?

Dear @kansai,
You need to create a sample similar to other samples at /usr/local/driveworks-3.5/samples/src and update the below SAMPLES variable at /usr/local/driveworks-4.0/samples/CMakeLists.txt accordingly

set(SAMPLES framework;egomotion;sensors;imageprocessing;rig;visualization;dnn;comms;hello_world;image;template;icp;calibration;vehicleio;vehicleio_plugin;dataspeedBridge;pointcloudprocessing).

If you adding your samples under one of the folder(like under samples/src/dnn), You need to make sure to add the add_subdirectory()in corresponding CMakeLists.txt (like samples/src/dnn/CMakeLists.txt)