Debugging Yocto Project* Applications with Intel® Debugger

Debugging Yocto Project* Applications with Intel® Debugger

 

1.1.1       Debugging an application running on a QEMU* based virtual machine

 

1.     Ensure the Application Development Toolkit (ADT) environment variables have been exported to the development machine

$ . /opt/poky/1.1/environment-setup-i586-poky-linux

2.  Now you can launch QEMU* with the appropriate Yocto Project* OS image:

$ poky-qemu qemux86 bzImage-2.6.37-qemux86-1.0.bin yocto-image-lsb-qemux86-1.0.rootfs.ext3

Continuing with the following parameters:

KERNEL: [bzImage-2.6.37-qemux86-1.0.bin]

ROOTFS: [yocto-image-lsb-qemux86-1.0.rootfs.ext3]

FSTYPE: [ext3]

Setting up tap interface under sudo

[sudo] password for user:

Acquiring lockfile for tap0...

Running qemu...

/opt/poky/1.1/sysroots/i686-pokysdk-linux/usr/bin/qemu -kernel bzImage-2.6.37-qemux86-1.0.bin -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=no,downscript=no -hda yocto-image-lsb-qemux86-1.0.rootfs.ext3 -show-cursor -usb -usbdevice wacom-tablet -vga vmware -enable-gl -no-reboot --append "vga=0 root=/dev/hda mem=128M ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1 "

 

3.     Please note which IP address is assigned to your virtual machine. In this example it is highlighted as 192.168.7. The actual IP address of your virtual machine is needed for remote debugging.

 

Note:

When using an OS image it is recommended to have ssh enabled. This allwows to copy files easily to and from the target, and start the remote debug agent.

 

4.     Copy the remote debug agent to the target:

$ scp /opt/intel/atom/idb/2.3.xxx/bin/ia32/idbserver root@192.168.7.2:/home/root/

 

5.     In the console window you are building your applications and starting the debugger from you need to source ADT as well:

$ . /opt/poky/1.1/environment-setup-i586-poky-linux

6.     Launch the debugger.

$ /opt/intel/atom/idb/2.3.xxx/bin/ia32/idb_remote &

7.     After launching the debugger you can then start the remote debug agent, idbserver, on the target (e.g via ssh).

 

8.     Connect to it from the debugger using the connect button and the IP address provided at QEMU launch time. The TCP/IP port defaults to 2000.

 

 

1.1.2       Debugging an application running on a physical device

 

1.     Ensure the Application Development Toolkit (ADT) environment variables have been exported to the development machine

$ . /opt/poky/1.1/environment-setup-i586-poky-linux

 

2.     Please note which IP address is assigned to your device in the network.

 

Note:

When using an OS image it is recommended to have ssh enabled. This allwows to copy files easily to and from the target, and start the remote debug agent.

 

3.     Copy the remote debug agent to the target:

$ scp /opt/intel/atom/idb/2.3.xxx/bin/ia32/idbserver root@192.168.7.2:/home/root/

 

4.     In the console window you are building your applications and starting the debugger from you need to source ADT as well:

$ . /opt/poky/1.1/environment-setup-i586-poky-linux

5.     Launch the debugger.

$ /opt/intel/atom/idb/2.3.xxx/bin/ia32/idb_remote &

6.     After launching the debugger you can then start the remote debug agent, idbserver, on the target (e.g via ssh).

 

7.     Connect to it from the debugger using the connect button and the IP address of your target device. The TCP/IP port defaults to 2000.

Per informazioni più dettagliate sulle ottimizzazioni basate su compilatore, vedere il nostro Avviso sull'ottimizzazione.