Sunday, August 2, 2009

Hello World

The hello-world from R1.6 has some problems, so I will use the version from R1.5, which is not that much different from R1.6.
You can find the example program hello-world here. Unzip it somewere and double-click the hello-world.anjuta icon, Anjuta will be started and at the left-side show the files from hello-world. The first thing to do now is to enable the Poky Plug-in, see also section 3.3.2 of the 'iOn Development Environment'-document which explains nicely how to do this. You will now have an extra Tools-menu. If you have not yet configured the Poky Anjuta PlugIn, follow the instructions from the iRex document.
The steps to follow after starting a Anjuta project are always the same:
1) Choose Builds->Autogenerate to update the makefiles
2) Choose Builds->Configure to update the configure file. As a parameter use --prefix=/usr. This will put the generated program and its data in /usr/bin and /usr/share.
Watch for the 'Completed Sucessfully'.
3) Choose Build->Build Project to generate the applciation and the resources it needs.
4) Start the emulator using Tools->Start QEMU. (This will take some time and ask you for the su password.)
5) Deploy to target: Tools->Deploy, this will prepare everything and copy it to the emulator into the location that was indicated with the Configure call (--prefix=/usr). It will ask you for the qemu-password which is empty.
6) Start a new Terminal window and open a connection with the emulator: 'ssh root@qemu' it will prompt for the password, which is empty.
7) Start the application: In the terminal window first type 'export DISPLAY=:0.0' (0=zero, not so obvious in this font) and then type 'hello-world' it will print a lot of logging in the terminal window and start the hello-world application in the emulator.
The procedure explained in the iRex develoment document, using Tool->Debug Remote, did not work well for me, so you will have to experiment yourself with that.

The application does not do that much (at least not that you can see). You can select 'Close Application' from the menu to close the application. That's that, first application build, downloaded and started on the emulator.

No comments:

Post a Comment