Using the Anjuta Poky SDK Plugin
Since I recently rolled a new release of the Poky Anjuta Plugin I thought it would be worth re-capping how to use it.
To install you need a to have Anjuta and it’s development headers installed. Then it’s the usual configure make dance to install (see the README for more details).
If you want to take advantage of the remote debugging support, which I strongly recommend you do, then you’ll want to pass configure the –enable-gdb-integration switch.
Once done, you can launch Anjuta and Create a new Generic project in Anjuta (File > New > Project), this gives you a simple C Hello World application which is enough to demonstrate the plugins functionality.
Next, in the preferences pane enable the Poky plugin.
You can configure the plugin to use either a Poky generated SDK or a full Poky build tree, for the purposes of this tutorial I’ll use an SDK toolchain and QemuX86 image I built earlier (read more about SDK images in the handbook).
As I’ve used an SDK tarball I have set SDK root to the toolchains subdirectory in /usr/loca/poky/. The toolchain triplet is arch-distro-abi and can be easily discovered by looking at the environment-setup scripts file name, for a qemux86 toolchain this is environment-setup-i586-poky-linux so the toolchain triplet I’ve used is i586-poky-linux. Finally I use the file chooser to locate the Kernel and Root filesystem of my generated image.

Now that we have configured Anjuta to use our toolchain and image we can build and test our software against it. Building the project now will use the cross-toolchain from the Poky SDK.
Once built you’re ready to test on the emulated device, use Tools -> Start QEMU to launch the emulated image (this will request your root or sudo password to configure networking).
You can install the project to the target with Tools -> Deploy, this will install the project to /usr/local where you can now interact with it directly on the device or use Tools -> Run Remote to execute the binary.
Finally, and perhaps most usefully, you can debug the deployed application using gdbserver. You need only select a local binary (for debug symbols) and enter the command of the remote binary. THe plugin then negotiates starting GDB on the target, connects to it and starts the binary but paused at the entry point.
You can then add break points as required using the IDE and use Debug -> Run/Continue to continue the programs execution.
The Anjuta SDK plugin is still very much a work in progress but should be reasonably usable as is. Please report any bugs in the Poky product, Anjuta Integration component of bugzilla.openedhand.com
Enjoy using it, watch this space for news of new hotness and please feel free to file feature enhancement requests!

