Error in remote debug witn Nsight ,eclipse editon.

I use Nsight eclipse remote debug function to upload a project to Jetson tx1.
This project can compile successfully in pc(ubuntu 14.04),but when i use remote debug,the console shows that

“ubuntu@tegra-ubuntu:~$ /bin/sh -c “cd "/tmp";export LD_LIBRARY_PATH="/usr/local/cuda-8.0/lib64":${LD_LIBRARY_PATH};"/usr/local/cuda-8.0/bin/cuda-gdbserver" --cuda-use-lockfile=0 :2345 "/tmp/main"”;exit
Process /tmp/main created; pid = 3840
Cannot exec /tmp/main: Exec format error.
gdbserver: Unable to determine the number of hardware watchpoints available.
gdbserver: Unable to determine the number of hardware breakpoints available.

Child exited with status 127
No program to debug. GDBserver exiting.
logout”

thanks for your help

Hi ymy,

“Exec format error” means that you’re trying to run a x86_64 app on arm64 board, please make sure that you use the correct cuda toolkit for arm64 and compile the app with the right cross compile options. I guess that you app cannot run on board even without cuda-gdb.

Best Regards
Harry

Hi Harry,

Thanks a lot ,according yo your answer I know what’s the problem with my program:My app doesn’t compile correctly .
I use arm-linux-gcc 4.4.3 version,and I only change the GCC C compiler and GCC C linker from gcc to arm-linux-gcc.
It can build exe ,but can,t run on TX1. Is there any other options need I to change? Or I use the wrong conpiler?
Where can I to get some instructons ?

Many thanks

ymy

Hello ymy,

How did you install the OS and sdk, use SDK installer?

Hi harry,

I use Jetpack to install OS(16.04) and SDK for TX1.And my host PC use Vmware,the OS version is ubunru 14.04.

Hello ymy,

Jetpack is good, I guess that you are using command line to compile your app, right? You can try the following steps:

  1. Use nsight eclipse to create a cuda project on your host.
  2. Right click the project and select Properties.
  3. Select Target Systems and set the CPU Architecture to AArch64.
  4. Compile the app and try to run it on your TX1.

Best Regards
Harry

Hi harry

With your help I solved my problem.
I,m a newcomer in Embedded system,and I’m very appreciative for your answer.

Many thanks
ymy