To compile the samples or any user code using NVIDIA® DriveWorks, you must use cross-compilation from a Linux host. For this, in addition to the requirements above, you must have the additional components:
On the host system, install CUDA cross-compilation libraries.
$ sudo dpkg --add-architecture arm64 $ sudo apt-get update $ sudo apt-get install cuda-cross-qnx-10-2
/etc/apt/sources.list
and files under /etc/apt/sources.list.d/
and add [arch=amd64,i386]
into each line starting with deb
. Ensure you specify amd64
and not arm64
.Configure the location of the NVIDIA DRIVE SDK/PDK.
Set the environment variable DriveSDK
to point to the SDK/PDK folders:
/path/to/drive-t186ref-qnx (NVIDIA DRIVE platform)
-or-
Define this location as a cmake
parameter:
-DVIBRANTE_PDK:STRING=/path/to/drive-t186ref-qnx
Set the environment variable QNX_HOST
to path/to/sw/tools/embedded/qnx/qnx700-ga1/host/linux/x86_64
Set the environment variable QNX_TARGET
to path/to/sw/tools/embedded/qnx/qnx700-ga1/target/qnx7
Set the environment variable QNX_BASE
to path/to/drive-t186ref-qnx/targetfs
Set the environment variable QNX_TOP
to path/to/drive-t186ref-qnx/..
Cross-compile.
$ mkdir build $ cd build $ cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_TOOLCHAIN_FILE=/path/to/driveworks/samples/cmake/Toolchain-V5Q.cmake \ -DVIBRANTE_PDK:STRING=/path/to/drive-t186ref-qnx -DTRT_VERSION:STRING=6.2.0.3 \ /path/to/driveworks/samples/folder $ make -j $ make install
To streamline the deploy process, you can set the cmake
definitions as environment variables.
Also the build folder can be created anywhere in the system, however if it's outside of your home folder, you'll probably need to run the next commands with sudo.
When you manually upload the sample to the target device, you copy the cross- compiled binaries to a device with IP AGX_IP
as user root
.
On the host system, execute:
$ scp -r install/* root@AGX_IP:/mnt/<destination_dir>/
/mnt
folder instead.