2.6.2.6. Deploying and Debugging the Application

Once the QEMU emulator is running the image, you can deploy your application using the Eclipse IDE and then use the emulator to perform debugging. Follow these steps to deploy the application.

Note

Currently, Eclipse does not support SSH port forwarding. Consequently, if you need to run or debug a remote application using the host display, you must create a tunneling connection from outside Eclipse and keep that connection alive during your work. For example, in a new terminal, run the following:
     ssh -XY user_name@remote_host_ip
                    
After running the command, add the command to be executed in Eclipse's run configuration before the application as follows:
     export DISPLAY=:10.0
                    

  1. Select "Debug Configurations..." from the "Run" menu.

  2. In the left area, expand C/C++Remote Application.

  3. Locate your project and select it to bring up a new tabbed view in the Debug Configurations Dialog.

  4. Enter the absolute path into which you want to deploy the application. Use the "Remote Absolute File Path for C/C++Application:" field. For example, enter /usr/bin/programname.

  5. Click on the "Debugger" tab to see the cross-tool debugger you are using.

  6. Click on the "Main" tab.

  7. Create a new connection to the QEMU instance by clicking on "new".

  8. Select TCF, which means Target Communication Framework.

  9. Click "Next".

  10. Clear out the "host name" field and enter the IP Address determined earlier.

  11. Click "Finish" to close the New Connections Dialog.

  12. Use the drop-down menu now in the "Connection" field and pick the IP Address you entered.

  13. Click "Debug" to bring up a login screen and login.

  14. Accept the debug perspective.