diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:36:50 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 15:25:03 +0100 |
commit | 41ac47d732eed8392d60d0f6773e5a279d49b999 (patch) | |
tree | cf19d099db9cfdb8d73aa21c31e7aa1cc86ff860 /plugins/org.yocto.sdk.ide.doc.user/cheatsheets | |
download | eclipse-poky-juno-master.tar.gz |
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'plugins/org.yocto.sdk.ide.doc.user/cheatsheets')
-rw-r--r-- | plugins/org.yocto.sdk.ide.doc.user/cheatsheets/createNewHelloWorldProject.xml | 222 |
1 files changed, 222 insertions, 0 deletions
diff --git a/plugins/org.yocto.sdk.ide.doc.user/cheatsheets/createNewHelloWorldProject.xml b/plugins/org.yocto.sdk.ide.doc.user/cheatsheets/createNewHelloWorldProject.xml new file mode 100644 index 0000000..310dce6 --- /dev/null +++ b/plugins/org.yocto.sdk.ide.doc.user/cheatsheets/createNewHelloWorldProject.xml | |||
@@ -0,0 +1,222 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!-- | ||
3 | /******************************************************************************* | ||
4 | * Copyright (c) 2012 BMW Car IT GmbH. | ||
5 | * All rights reserved. This program and the accompanying materials | ||
6 | * are made available under the terms of the Eclipse Public License v1.0 | ||
7 | * which accompanies this distribution, and is available at | ||
8 | * http://www.eclipse.org/legal/epl-v10.html | ||
9 | * | ||
10 | * Contributors: | ||
11 | * Atanas Gegov - initial cheat sheet for creating the hello world project. | ||
12 | ******************************************************************************* | ||
13 | --> | ||
14 | <cheatsheet title="Creating a Hello World ANSI C or C++ Autotools Project"> | ||
15 | <intro> | ||
16 | <description> | ||
17 | This cheat sheet will guide you through the process of creating and | ||
18 | building a "Hello World ANSI C Autotools Project" or | ||
19 | a "Hello World C++ Autotools Project" | ||
20 | application that uses a Yocto Project template. | ||
21 | </description> | ||
22 | </intro> | ||
23 | <item title="Open the C/C++ Perspective" dialog="false" skip="true"> | ||
24 | <description> | ||
25 | Select <b>Window</b> > <b>Open Perspective</b> > | ||
26 | <b>Other...</b> from the menu bar.<br/> | ||
27 | Choose <b>C/C++</b> from the <b>Open Perspective</b> dialog. | ||
28 | Click <b>OK</b>. | ||
29 | </description> | ||
30 | <command | ||
31 | required="false" | ||
32 | serialization="org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.cdt.ui.CPerspective)"> | ||
33 | </command> | ||
34 | </item> | ||
35 | <item title="Specify a toolchain and sysroot location" dialog="true" skip="true"> | ||
36 | <description> | ||
37 | You need to specify a toolchain and sysroot location before | ||
38 | building any project in the workspace. | ||
39 | </description> | ||
40 | <subitem> | ||
41 | <description> | ||
42 | The global settings can be modified in the <b>Yocto Project ADT</b> | ||
43 | section of the eclipse preferences. Select <b>Window</b> > | ||
44 | <b>Preferences</b> from the menu bar and then select the section | ||
45 | <b>Yocto Project ADT</b>. These settings are the default ones for | ||
46 | every project you create in the workspace. | ||
47 | </description> | ||
48 | <command | ||
49 | required="false" | ||
50 | serialization="org.eclipse.ui.window.preferences(preferencePageId=org.yocto.sdk.ide.preferences.YoctoSDKPreferencePage)"> | ||
51 | </command> | ||
52 | </subitem> | ||
53 | <subitem> | ||
54 | <description> | ||
55 | Choose in the <b>Cross Compiler Options</b> the | ||
56 | <b>Standalone pre-built toolchain</b>. | ||
57 | </description> | ||
58 | </subitem> | ||
59 | <subitem> | ||
60 | <description> | ||
61 | Provide a <b>Toolchain Root Location</b> (e.g. | ||
62 | /opt/poky/1.3 or some other location on the filesystem). | ||
63 | </description> | ||
64 | </subitem> | ||
65 | <subitem> | ||
66 | <description> | ||
67 | Provide a <b>Sysroot Location</b>. This is the filesystem | ||
68 | containing libraries, headers etc. used while cross-building | ||
69 | binaries for the target. | ||
70 | </description> | ||
71 | </subitem> | ||
72 | <subitem> | ||
73 | <description> | ||
74 | If more than one toolchain is found in the <b>Toolchain | ||
75 | Root Location</b>, use the drop-down box to select the <b>Target | ||
76 | Architecture</b>. Make sure that the selected sysroot matches | ||
77 | the toolchain. | ||
78 | </description> | ||
79 | </subitem> | ||
80 | <subitem> | ||
81 | <description> | ||
82 | Choose in the <b>Target Options</b> whether the target is a QEMU | ||
83 | emulation (kernel location required) or an external hardware. | ||
84 | The target is used for running or remote debugging the binaries | ||
85 | created for it. | ||
86 | </description> | ||
87 | </subitem> | ||
88 | <subitem> | ||
89 | <description> | ||
90 | Save the settings with <b>Apply</b> and <b>OK</b>. You can later | ||
91 | change these settings for any project from the menu | ||
92 | <b>Project</b> > <b>Change Yocto Project Settings</b>. | ||
93 | </description> | ||
94 | </subitem> | ||
95 | </item> | ||
96 | <item title="Choose the programming language for the project" dialog="true"> | ||
97 | <description> | ||
98 | Choose between the available "Hello World ANSI C Autotools | ||
99 | Project" or the "Hello World C++ Autotools Project" | ||
100 | template projects. | ||
101 | </description> | ||
102 | <command returns="progLanguage" | ||
103 | serialization="org.eclipse.ui.dialogs.openMessageDialog(title=Select Programming Language,buttonLabel0=C++,message=Select the programming language for the Hello World Autotools Project project,buttonLabel1=C)"/> | ||
104 | <onCompletion> You selected ${progLanguage}.</onCompletion> | ||
105 | </item> | ||
106 | <item title="Create a Hello World Autotools Project"> | ||
107 | <description> | ||
108 | Create a Yocto Project ADT Project "Hello World ANSI C Autotools | ||
109 | Project" or "Hello World C++ Autotools Project" | ||
110 | by using the appropriate Project wizard. | ||
111 | </description> | ||
112 | <conditional-subitem condition="${progLanguage}"> | ||
113 | <subitem when="C++"> | ||
114 | <description> | ||
115 | Click <b>File</b> > <b>New</b> > <b>C++ Project</b> to | ||
116 | launch the C++ Project wizard. | ||
117 | </description> | ||
118 | <command | ||
119 | required="false" | ||
120 | serialization="org.eclipse.ui.newWizard(newWizardId=org.eclipse.cdt.ui.wizards.NewCWizard1)"> | ||
121 | </command> | ||
122 | </subitem> | ||
123 | <subitem when="C"> | ||
124 | <description> | ||
125 | Click <b>File</b> > <b>New</b> > <b>C Project</b> to | ||
126 | launch the C Project wizard. | ||
127 | </description> | ||
128 | <command | ||
129 | required="false" | ||
130 | serialization="org.eclipse.ui.newWizard(newWizardId=org.eclipse.cdt.ui.wizards.NewCWizard2)"> | ||
131 | </command> | ||
132 | </subitem> | ||
133 | </conditional-subitem> | ||
134 | <conditional-subitem condition="${progLanguage}"> | ||
135 | <subitem when="C++"> | ||
136 | <description> | ||
137 | Enter <b>HelloWorld</b> as the project name, then select | ||
138 | <b>Yocto Project ADT Project</b> > | ||
139 | <b>Hello World C++ Autotools Project</b> from the Project type | ||
140 | list and click <b>Next</b>. | ||
141 | </description> | ||
142 | </subitem> | ||
143 | <subitem when="C"> | ||
144 | <description> | ||
145 | Enter <b>HelloWorld</b> as the project name, then select | ||
146 | <b>Yocto Project ADT Project</b> > | ||
147 | <b>Hello World ANSI C Autotools Project</b> from the Project type | ||
148 | list and click <b>Next</b>. | ||
149 | </description> | ||
150 | </subitem> | ||
151 | </conditional-subitem> | ||
152 | <subitem skip="true"> | ||
153 | <description> | ||
154 | Fill in the name of the <b>Author</b>. Make some changes in the | ||
155 | other fields if needed. Possibly change the <b>License</b> from | ||
156 | the drop-down box and click <b>Next</b>. | ||
157 | </description> | ||
158 | </subitem> | ||
159 | <subitem skip="true"> | ||
160 | <description> | ||
161 | If needed make some Advanced settings. Confirm them with | ||
162 | <b>Apply</b> and <b>OK</b>. | ||
163 | </description> | ||
164 | </subitem> | ||
165 | <subitem> | ||
166 | <description> | ||
167 | Click <b>Finish</b> to create the project in your workspace. You | ||
168 | will find the created project in the <b>Project Explorer</b> view. | ||
169 | </description> | ||
170 | </subitem> | ||
171 | </item> | ||
172 | <item title="Build the project" dialog="true"> | ||
173 | <description> | ||
174 | Create the project's binary using a specified toolchain and | ||
175 | sysroot. | ||
176 | </description> | ||
177 | <subitem> | ||
178 | <description> | ||
179 | Make sure that the project is on focus in the | ||
180 | <b>Project Explorer</b> view. | ||
181 | </description> | ||
182 | </subitem> | ||
183 | <subitem> | ||
184 | <description> | ||
185 | If you want to change the default settings for toolchain and | ||
186 | sysroot location go to <b>Project</b> > | ||
187 | <b>Change Yocto Project Settings</b> in the menu bar. Finish the | ||
188 | editing by pressing <b>OK</b>. | ||
189 | </description> | ||
190 | </subitem> | ||
191 | <subitem> | ||
192 | <description> | ||
193 | If you have changed the settings in the previous step, call | ||
194 | <b>Project</b> > <b>Reconfigure Project</b> to reconfigure the | ||
195 | project with these new settings (e.g. create the correct Makefiles | ||
196 | that make use of the selected toolchain and sysroot). | ||
197 | </description> | ||
198 | </subitem> | ||
199 | <subitem> | ||
200 | <description> | ||
201 | Build the project with a click on the hammer symbol in the | ||
202 | Toolbar. Alternatively, go to <b>Project</b> > | ||
203 | <b>Build Project</b>. If you didn't change the default | ||
204 | toolchain and sysroot, now the configuring step will be executed | ||
205 | at first, followed by the build step itself. | ||
206 | </description> | ||
207 | </subitem> | ||
208 | <subitem> | ||
209 | <description> | ||
210 | Observe the output in the different consoles (e.g. | ||
211 | <b>Configure [HelloWorld]</b> and | ||
212 | <b>CDT Build Console [HelloWorld]</b>) to check if everything | ||
213 | was successful. | ||
214 | </description> | ||
215 | </subitem> | ||
216 | <onCompletion> | ||
217 | Congratulations, you have completed this cheat sheet! You may | ||
218 | continue with editing, rebuilding or debugging the | ||
219 | Hello World Autotools Project. | ||
220 | </onCompletion> | ||
221 | </item> | ||
222 | </cheatsheet> | ||