Merge "Implementation of connectivity abstraction feature-Ubutu v0.1"
[platform/upstream/iotivity.git] / resource / README.setup.txt
1 ******************************************************************
2
3  Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
4
5 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6
7  Licensed under the Apache License, Version 2.0 (the "License");
8  you may not use this file except in compliance with the License.
9  You may obtain a copy of the License at
10
11       http://www.apache.org/licenses/LICENSE-2.0
12
13  Unless required by applicable law or agreed to in writing, software
14  distributed under the License is distributed on an "AS IS" BASIS,
15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  See the License for the specific language governing permissions and
17  limitations under the License.
18
19 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 ===============================================================================
22 ==                      Rich Stack & Lite Stack                              ==
23 ===============================================================================
24
25 The OIC-RESOURCE repository (referred as "<oic-resource>") contains two SDKs
26 with underlying code (i.e. "stack"). The two SDKs are referred to as "Rich SDK"
27 (or "C++ SDK") and "Lite SDK" (or "C SDK"). The associated stacks are referred
28 to as "Rich Stack" (or "C++ Stack") and "Lite Stack" (or "C Stack"),
29 respectively. The Rich Stack-SDK pair requires that the Lite Stack-SDK pair is
30 built under it.
31
32 For a list of artifact locations for all possible build processes in the
33 OIC-RESOURCE repository, please refer to:
34 <oic-resource>/artifact_output_locations.txt.
35
36 ===============================================================================
37
38 The Rich Stack is intended ONLY for Linux Ubuntu 12.04 operating system.
39 To build Rich Stack, please follow these requirements:
40 - GCC compiler version is 4.6
41 - Pre-install the "gnu-libc" libraries package.
42 - You have pre-built the Lite Stack for Linux Ubuntu 12.04.
43 - You have installed and pre-built Boost 1.54.
44 - To compile Rich Unit Tests, you must have Google Test 1.7.0 and must also
45   create/append "local.properties" file at <oic-resource>/csdk/ with the
46   following specified:
47
48   GTEST_DIR=<gtest-1.7.0>
49
50 The Lite Stack is intended ONLY for Linux Ubuntu 12.04, Arduino ATMega 2560 with
51 Arduino Framework 1.0.5, and Arduino Due with Arduino Framework 1.5.7.
52 Tip: Use Cutecom in Ubuntu 12.04 to view logs from Arduino ATMega 2560 and
53 Arduino Due.
54
55 To build Lite Stack, please follow these requirements for Linux Ubuntu 12.04:
56 - GCC compiler version is 4.6
57 - Pre-install the "gnu-libc" libraries package.
58
59 To build Lite Stack, please follow these requirements for Arduino ATMega 2560:
60 - Arduino Framework 1.0.5 is installed. (Newer versions of the Arduino
61   Framework for Arduino ATMega 2560 have not been tested.)
62 - AVR-GCC compiler version is 4.5.3 (Distributed with Arduino 1.0.5, no further
63   action necessary if framework was obtained from
64   http://arduino.cc/en/Main/OldSoftwareReleases. Note: Frameworks obtained from
65   apt-get have had different compiler versions.)
66 - Unzip the Time Library from here to your Arduino Directory Structure:
67   http://playground.arduino.cc/code/time
68 - Apply patch "arduino-1.0.5_linux.patch" at
69   <oic-resource>/tools/arduino/patches to your Arduino Directory Structure at
70   location <Arduino 1.0.5>.
71 - Create/Append "local.properties" file at location
72   <oic-resource>/resource/csdk/ with the following specified:
73
74   ARDUINO_DIR := <arduino-1.0.5>
75   ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/avr/bin
76
77 To build Lite Stack, please follow these requirements for Arduino Due:
78 - Arduino Framework 1.5.7 is installed. (Newer versions of the Arduino
79   Framework for Arduino Due have not been tested.)
80 - AVR-GCC compiler version is 4.8.3 (Distributed with Arduino 1.5.7, no further
81   action necessary if framework was obtained from
82   http://arduino.cc/en/Main/OldSoftwareReleases. Note: Frameworks obtained from
83   apt-get have had different compiler versions.)
84 - Unzip the Time Library from here to your Arduino Directory Structure:
85   http://www.pjrc.com/teensy/td_libs_Time.html
86 - Apply patch "arduino-1.5.7_linux.patch" at
87   <oic-resource>/tools/arduino/patches to your Arduino Directory Structure at
88   location <Arduino 1.5.7>.
89 - Create/Append "local.properties" file at location
90   <oic-resource>/resource/csdk/ with the following specified:
91
92   ARDUINO_DIR := <arduino-1.5.7>
93   ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/avr/bin
94
95 Note: If you are building Unit Tests for Linux, building for Arduino Mega, and
96 building for Arduino Due you may find it useful to set the "local.properties"
97 file to look like this:
98
99 GTEST_DIR=<gtest-1.7.0>
100
101 ifeq ($(PLATFORM), arduinomega)
102         #Location of arduino sdk for Arduino Mega
103         ARDUINO_DIR := <arduino-1.0.5>
104         ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/avr/bin
105 else
106         #Location of arduino sdk for Arduino Due
107         ARDUINO_DIR := <arduino-1.5.7>
108         ARDUINO_TOOLS_DIR := $(ARDUINO_DIR)/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin
109 endif
110
111 ===============================================================================
112
113 Instructions for Common Build Processes:
114
115 NOTE: 'GNU Make' is required to utilize the build script at location:
116 <oic-resource>/buildScript.mk.
117
118 =======================================
119 == All Targets - Linux, ATMega & Due ==
120 =======================================
121
122 - All Modules, including OCICUC, in Release & Debug (Lite Stack, Lite Unit
123   Tests, Lite Examples, Rich Stack, Rich Unit Tests, Rich Examples, Rich
124   OCICUC) for linux, Arduino ATMega 2560 with Ethernet Shield, Arduino ATMega
125   ATMega 2560 with WiFi Shield, Arduino Due with Ethernet Shield and Arduino
126   Due with WiFi Shield:
127   (This will be what is used on the Build Server(s) to limit regression.)
128
129         make -f buildScript.mk all_dev
130
131 =======================================
132 == All Targets - Linux & ATMega 2560 ==
133 =======================================
134
135 - All Modules in Release (Lite Stack, Lite Unit Tests, Lite Examples, Rich
136   Stack, Rich Unit Tests, Rich Examples) for Linux & Arduino ATMega 2560 with
137   Ethernet Shield:
138
139         make -f buildScript.mk all
140
141 - All Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples, Rich Stack,
142   Rich Examples) for Linux & Arduino ATMega 2560 with Ethernet Shield:
143
144         make -f buildScript.mk all_debug
145
146 =======================================
147 ==     All Targets - Linux & Due     ==
148 =======================================
149
150 - All Modules in Release (Lite Stack, Lite Unit Tests, Lite Examples, Rich
151   Stack, Rich Unit Tests, Rich Examples) for Linux & Arduino Due with Ethernet
152   Shield:
153
154         make -f buildScript.mk complement
155
156 - All Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples, Rich Stack,
157   Rich Unit Tests, Rich Examples) for Linux & Arduino Due with Ethernet Shield:
158
159         make -f buildScript.mk complement_debug
160
161 =======================================
162 ==     All Targets - Linux Only      ==
163 =======================================
164
165 - All Modules, without OCICUC, in Release (Lite Stack, Lite Unit Tests, Lite
166   Examples, Rich Stack, Rich Unit Tests, Rich Examples) for linux:
167
168         make -f buildScript.mk linux
169
170 - All Modules, without OCICUC, in Debug (Lite Stack, Lite Unit Tests, Lite
171   Examples, Rich Stack, Rich Unit Tests, Rich Examples) for linux:
172
173         make -f buildScript.mk linux_debug
174
175 - All Rich Stack Modules in Release, without OCICUC, (Lite Stack, Rich Stack,
176   Rich Unit Tests, Rich Examples) for Linux:
177
178         make -f buildScript.mk linux_ub
179
180 - All Rich Stack Modules in Debug, without OCICUC, (Lite Stack, Rich Stack,
181   Rich Unit Tests, Rich Examples) for Linux:
182
183         make -f buildScript.mk linux_ub_debug
184
185 - All Rich Stack Modules, including OCICUC, in Release & Debug (Lite Stack,
186   Rich Stack, Rich Unit Tests, Rich Examples, Rich OCICUC) for linux:
187
188         make -f buildScript.mk linux_ub_dev
189
190 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
191   Examples) for Linux:
192
193         make -f buildScript.mk linux_tb
194
195 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
196   for Linux:
197
198         make -f buildScript.mk linux_tb_debug
199
200 =======================================
201 ==      All Targets - Mega Only      ==
202 =======================================
203
204 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
205   Examples) for Arduino ATMega 2560 with Ethernet Shield:
206
207         make -f buildScript.mk arduinomega
208
209 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
210   for Arduino ATMega 2560 with Ethernet Shield:
211
212         make -f buildScript.mk arduinomega_debug
213
214 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
215   Examples) for Arduino ATMega 2560 with WiFi Shield:
216
217         make -f buildScript.mk arduinomega_wifi
218
219 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
220   for Arduino ATMega 2560 with WiFi Shield:
221
222         make -f buildScript.mk arduinomega_wifi_debug
223
224 =======================================
225 ==      All Targets - Due Only      ==
226 =======================================
227
228 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
229   Examples) for Arduino Due with Ethernet Shield:
230
231         make -f buildScript.mk arduinodue_all
232
233 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
234   Examples) for Arduino Due with Ethernet Shield:
235
236         make -f buildScript.mk arduinodue_all_debug
237
238 - All Lite Stack Modules in Release (Lite Stack, Lite Unit Tests, Lite
239   Examples) for Arduino Due with WiFi Shield:
240
241         make -f buildScript.mk arduinodue_wifi
242
243 - All Lite Stack Modules in Debug (Lite Stack, Lite Unit Tests, Lite Examples)
244   for Arduino Due with WiFi Shield:
245
246         make -f buildScript.mk arduinodue_wifi_debug
247
248 =======================================
249 ==         Clean All Targets         ==
250 =======================================
251
252 - Clean All:
253
254         make -f buildScript.mk clean
255