Setting up a folder on the Conduit so that Eclipse can upload the executable file to this folder: -------------------------------------------------------------------------------------------------- 1. ssh into the Conduit and create the following folder: mkdir workspace cd workspace mkdir helloConduit cd helloConduit pwd <--To display the path 3. You should have: /home/root/workspace/helloConduit ################################################################################################################################### Install gdbserver package on the Conduit: ----------------------------------------- 1. Type: opkg update 2. Type: opkg install gdbserver After files are installed successfully, the system displays these messages: Configuring libthread-db1. Configuring gdbserver. ################################################################################################################################### Install and configure Remote Debugging Capabilities: --------------------------------------------------- 1. Run Eclipse and select 'Help' -> 'Install new software'. In the 'Work with' window, type: a, then select 'All Available Sites'. 2. Under Name, expand Mobile and Device Development and select ALL items: Mobile and Device Development C/C++ GDB Hardware Debugging 8.8.1.201602051005 C/C++ Remote (over TCF/TE) Run/Debug Launcher 1.3.1.201506040227 Hybrid Mobile Application Development Tools 0.3.0.201506011443 Remote System Explorer User Actions 3.7.0.201505221634 TCF C/C++ Debugger 1.3.1.201505051438 TCF Remote System Explorer add-in 1.3.0.201505261946 TCF Target Explorer 1.3.1.201504300712 TM Terminal 4.0.0.201506040610 TM Terminal via Remote API Connector Extensions 4.0.0.201506040610 TM Terminal View Remote System Explorer add-in 4.0.0.201506040610 3. Click Next. 4. Next. 5. Accept the license. 6. Click 'Finish' button. ################################################################################################################################### Setting up for Remote Debugging: ------------------------------- 1. Create a connection In Eclipse, click Window-> Open Perspective-> Other -> Remote System Explorer -> OK 2. Click File -> New -> Other. In the window that appears, double-click Remote System Explorer to expand it and select Connection. 3. Click Next. Select Linux. 4. Click Next. At HostName, enter the IP address of your Conduit - I have my Conduit at: 10.0.0.54 5. Connection name: Test 6. Click Next. Under Configuration -> Select -> ssh.files. 7. Click Next. Under Configuration -> Select -> processes.shell.linux 8. Click Next. Under Configuration -> Select -> ssh.shells 9. Click Finish. 10. In the Remote System tab, right click the 'Test' connection and select 'Properties'. Select 'Host'. Click small icon to right of the 'Default User ID' and enter: root 11. Click OK. Notes: If you need to edit the 'connection' later. Select 'Window' -> 'Open perspective' -> 'Other' -> 'Remote System Explorer'. Under 'Remote System', right click the connection name and click 'Properties'. 12. Go to your Terminal application on your Development PC, and then go to your workspace/helloConduit/src and type: touch .gdbinit 13. Do: ls -al to check it. ################################################################################################################################ Setting up Debug Configuration: ------------------------------- 1. In Eclipse, select Run -> Debug Configurations 2. Under C/C++ Remote Application, select your launch configuration(helloConduitDebug). 3. In 'main' tab, at 'Connection', select the connection you create above. 4. At 'Project', select the 'helloConduit' project you created earlier. 5. At 'Build Configuration', select 'Use Active'. 6. At 'C/C++ Application', browse to the '/workspace/helloConduit/Debug/helloConduit' executable file you created earlier. 7. At 'Remote Absolute File Path for C/C++ Application', browse to or enter the directory and the filename where you want to upload the executable file on the Conduit. For example, /home/root/workspace/helloConduit/helloConduit 9. At 'Commands to execute before application' enter - chmod 777 /home/root/workspace/helloConduit/helloConduit (This is the location of the uploaded executable file on the Conduit). 10. Click 'Apply'. 11. Select 'Debugger' tab 12. At 'GDB debugger' enter: /opt/mlinux/3.1.0/sysroots/x86_64-mlinux-linux/usr/bin/arm-mlinux-linux-gnueabi/arm-mlinux-linux-gnueabi-gdb Note that the default settings select 'Stop on startup at: main, which means that when you run debugger, it will stop at first line in main. 13. Under 'Debugger Options' select 'GDB Server Settings' tab. At, 'Port Number', enter a free TCP port, or in my case: 2345 14. Click 'Apply'. ################################################################################################################################## Start Debugging: ---------------- 1. Click 'Debug'. If asked to 'Confirm Perspective Switch', click 'Yes'. 2. Eclipse should now upload helloBT to the Conduit and begin remote debuging. With the default setting to, 'Stop on startup at main', you should see the program stopped at the first program line. Press F6 on the development PC's keyboard and the program will advance one line.