DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

Cross-Compiling for NVIDIA DRIVE OS QNX

To compile the samples or any user code using the NVIDIA® DriveWorks SDK, you must use cross-compilation from a Linux host. For this, in addition to the requirements above, you must have the following additional components:

  • NVIDIA DriveWorks SDK QNX cross-compilation package
  • NVIDIA DRIVE® OS 5.2.6.0 QNX SDK/PDK
  • NVIDIA CUDA® QNX cross-compilation package

To Cross-Compile the NVIDIA DriveWorks SDK Samples

  1. Verify that CUDA binaries for QNX are available on the host system under /usr/local/cuda-safe-<version>/. If they are missing please refer to the NVIDIA SDK Manager documentation.
  2. Configure the location of the NVIDIA DRIVE OS 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 acmakecommand line argument: `` -DVIBRANTE_PDK:STRING=/path/to/drive-t186ref-qnx ``
    • Set the environment variableQNX_HOSTto path/to/sw/tools/embedded/qnx/qnx700-ga<version>/host/linux/x86_64
    • Set the environment variableQNX_TARGETto path/to/sw/tools/embedded/qnx/qnx700-ga<version>/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/..
      Note
      Replace <version> with the actual version provided by the SDK Manager.
  3. 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.5.0.7 \
    -DCUDA_DIR=/usr/local/cuda-safe-<version> /path/to/driveworks/samples/folder
    $ make -j
    $ make install

    To streamline the deploy process, you can set the cmake definitions as environment variables.

    The build folder can be created anywhere in the system, however if it is outside of your home folder, you will probably need to run the commands with sudo.

    Note
    Providing the full path to CUDA cross-compilation libraries via -DCUDA_DIR=/path/to/qnx/cuda/libraries is needed only if they are not installed under /usr/local/cuda

    Loading the Sample onto the NVIDIA DRIVE Platform

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>/
Note
On DRIVE QNX there is no home folder. If you followed the instructions in Installation on NVIDIA DRIVE OS QNX you can use the /mnt folder instead.