Cross compile with Visual C++ for Linux Development and Nvidia DRIVE PX (1)

Hi all,

I’m working with a DRIVE PX (1), where I firstly want to debug C++ code remotely using Visual Studio. I created an Visual C++/Cross Platform/Linux/Console Application (Linux) and changed the platform to “ARM” in the solution property window. The remote system is detected as “Ubuntu (Unknown)”.

So when I want to debug a simple code, I get the error “Current project architecture ‘ARM’ is incompatible with the remote system architecture ‘’ (‘Unknown’). Please switch the project architecture to ‘’ in Configuration Manager.”

Is there any way to debug the C++ code remotely on the DRIVE PX with Visual Studio?

I’ve already tried using GDB debug mode instead of gdbserver, but getting the same error.

I’m using Visual Studio 2015 as well as 2017 with Visual C++ for Linux Development 1.0.6. The Linux on the Nvidia DRIVE PX is an Ubuntu 15.04 (GNU/Linux 3.18.19-tegra aarch64). The GDB is a GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9.

I hope that’s all what you need to help me, unfortunately I’m not that big linux geek.

Thank you in advice.

Steve

Hello Fladenbrot,

Unfortunately, we don’t support remote debugging(CUDA) with Visual Studio.
Could you please clarify what debug C++ code”mean to debug CPU code, and not GPU? Thanks.

Hey Steve,

Yes, I knew that CUDA remote debugging isn’t possible. But what’s with remote debugging of simple C++ code (CPU code)? Is this possible? Or can I use Nvidia Nsight therefor?

Thanks.

Hello Fladenbrot,

Please use NVIDIA NSIGHT for this. Thanks.

Hello Fladenbrot,

I also had a same issue, the issue is with VS that do not have the platform that returned by executing command on the Linux side: “uname -m” so to fix this issue please follow the steps bellow:

1. on your remote Linux machine launch console application and run “uname -m” if the returned string not appears under your Platforms (x86, x64, ARM) in Visual studio execute the next steps.
2. On linux navigate to the /bin/

  • Execute: sudo mv uname uname1
  • Execute: sudo nano uname → now type inside the new file:
    #!/bin/bash
    echo ARM
    exit 0
  • exit and save
    3. On your windows machine go to the visual studio Remove and Add again in the connection manager the Linux machine → Now you will get the correct UBUNTU platform back (UBUNTU (ARM)).
    4. On your Linux machine: execute “mv uname uname-ARM && mv uname1 uname”.

It looks like when once you add remote machine this way it will work from now correctly.

Have a great day,
Vladi Colton