aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: 7627df0b6c2baeef5e6cd54574f4666d63ffe73e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
Anjuta Poky SDK Plugin
~~~~~~ ~~~~ ~~~ ~~~~~~

This plugin provides a platform for software development against the Poky
platform.

This plugin was developed by OpenedHand Ltd. with funding from iRex
Technologies B.V. 

Please see the AUTHORS file for details of the authors.


Features:
~~~~~~~~~

* Starting and stopping QEMU
* Cross-compiling an autotooled project within the the Anjuta IDE
* Deployment of the built project and data files into QEMU
* Remote invocation of programs in QEMU
* Cross-debugging of the binaries in QEMU
* Integration with OProfileUI


Dependencies
~~~~~~~~~~~~

* A Poky cross toolchain (this can be fetched fetched by following the links
  from http://www.pokylinux.org).

* Anjuta 2.3.4 or newer (e.g. SVN trunk). Although this can be installed into
  a custom prefix please ensure you do not have any older versions installed
  in other prefixes which might conflict.

* OProfileUI 0.2.0 or newer (e.g. SVN trunk). [Optional]


Building
~~~~~~~~

Once Anjuta is installed the plugin can be built with the following commands:

./configure
make
sudo make install

(NB: If you install an updated Anjuta you may need to rebuild the plugin and
reinstall it.)


Setup
~~~~~

Extract the tarball for the toolchain into / as root. The toolchain will be
installed into /usr/local/poky.

To use the plugin, first open or create an existing project. If creating a new
project the "C GTK+" project type will allow itself to be cross-compiled.
However you should be aware that this uses glade for the UI.

To activate the plugin go Edit->Preferences, then choose "General" from the left
hand side. Choose the Installed plugins tab, scroll down to "Poky SDK" and
check the box. The plugin is now activated but first it must be configured.

Choose the "Poky SDK" icon from the left hand side, this will show the
configuration options for the plugin.


Configuration
~~~~~~~~~~~~~

The configuration options presented in the preferences are:

* "SDK root" this is the root directory of the SDK for an ARM EABI SDK this
  will be "/usr/local/poky/eabi-glibc/arm". This directory will contain
  directories named like "bin", "include", "var", etc. With the file chooser
  it is important to enter into the "arm" subdirectory for this example.

* "Toolchain triplet" this is the cross compile triplet, e.g.
  "arm-poky-linux-gnueabi". The triplet can be identified from a directory
  within the "SDK root"

* "Kernel" use the file chooser to select the kernel to use with QEMU

* "Root filesystem" use the file chooser to select the root filesystem image,
  this should be an image (not a tarball)


Usage
~~~~~

As an example, cross-compiling a project, deploying it into QEMU and running a
debugger against it.

* Choose "Build->Run Configure" or "Build->Run Autogenerate" to configure (or
  to run "autogen" on the project.) This passes command line arguments to
  instruct it to cross-compile. 

* Next do "Build->Build Project" to build and compile the project. If you have
  previously built the project in the same tree without using the
  cross-compiler you may find that your project fails to link. Simply do
  "Build->Clean Project" to remove the old binaries. You may then try building
  again.

* Next start QEMU by using "Tools->Start QEMU", this will start QEMU and will
  show some any error messages in an message view. Once Poky has fully booted
  within QEMU you may now deploy into it

* Once built and QEMU is running, choose "Tools->Deploy", this will install
  the package into a temporary directory and then copy using rsync over SSH
  into the target. Progress and messages will be shown in the message view.

* To debug program installed into onto the target choose "Tools->Debug
  remote". This prompts for the local binary to debug and also the command
  line to run on the target. This will start a gdbserver over SSH on the
  target and also an instance of a cross-gdb in a local terminal. This will be
  preloaded to connect to the server and use the "SDK root" to find symbols.
  This gdb will break in "main" you should setup your breakpoints when it
  execution is stopped on this breakpoint otherwise you may not be able to
  interupt execution. The command line to run should include the full path to
  the to binary installed in the target. You may find it necessary to stop the
  debugger in the target using "Tools->Stop debugger".

* It is also possible to execute a command in the target over SSH, the
  appropriate environment will be be set for the execution. Choose "Tools->Run
  remote" to do this. This will open a terminal with the SSH command inside.


Bugs
~~~~

Please submit bugs to http://bugzilla.o-hand.com