NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Build on local Machine, but run and debug on remote Computer

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
Frosty



Joined: 21 Nov 2017
Posts: 2

PostPosted: Tue Nov 21, 2017 10:02 pm    Post subject: Build on local Machine, but run and debug on remote Computer Reply with quote

Hello,

i have a Orange Pi (ARM-CPU, running Debian) and a normal Windows-Computer.
I want to compile my project on the Windows-PC (local, Netbeans-IDE) but run and most of all debug the program via ethernet on the Orange Pi.

I already installed a ARM-Toolchain (gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_win32) and I can compile the program with Netbeans on the Windows PC. BUT: if I want to start it, I manually have to copy the project files (SCP) to the Orange Pi. I am not able to debug it.

I don't want is to compile the project on the slow Orange Pi (works).

What do I have to setup, to automatically build the project on my Windows-PC, copy it to remote target and debug it in Netbeans?

I'd appreciate your help!
Back to top
Frosty



Joined: 21 Nov 2017
Posts: 2

PostPosted: Wed Nov 22, 2017 6:55 am    Post subject: Reply with quote

Hi again, i finally got to work it somehow.
For others a small maybe too detailed instruction:
Let's say

Settings:

  • The "Build Host" is "localhost (Windows)".
  • Tool Collection is the above mentioned toolchain "gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_win32", i named it "arm-gcc" in netbeans
  • Install Netbeans PlugIn "Gdbserver"
  • Install on gdbserver on OrangePi via SSH (lets say OrangePiIp is 192.168.178.3):
    Code:

    ssh pi@192.168.178.3
    sudo apt-get install gdbserver



Build and debug:

  1. Build the project (F5)
  2. Copy the project directory via SCP to OrangePi
    Code:

    scp -r C:/NetbeansProjects/myProject pi@orangepi:/home/pi/myProject/

  3. Start gdbServer on OrangePi (via SSH)
    Code:
    sudo gdbserver 192.168.178.3:2000 /home/pi/myProject/dist/debug/arm-gcc/myproject

  4. In Netbeans: Debug->Attach Debugger: ("remote" is important!)
    Code:
    Debugger: gdbserver
    Target: remote 192.168.178.3:2000
    Project: myProject




I hope this help others wich have a similar problem!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo