5 Please refer to the following page to install scons:
6 http://www.scons.org/doc/production/HTML/scons-user.html#chap-build-install
7 (Note: on Windows, install Python 2.x before installing scons)
9 * 2. IDE/SDK Pre-requites
10 To build for some OS (Android / Arduino / IOS ...), an IDE/SDK may be required,
11 please go to the relative page to download and install the required IDE/SDK.
13 Note: Connectivity module building has been changed. We have to build connectivity
14 from the iotivity root folder.
18 1) Go to "iotivity/" folder.
20 2) Execute following command(s) to start build based on transport selection required :
22 -> Building for all transports :
23 $ scons resource/csdk/connectivity/samples/linux/ TARGET_OS=linux TARGET_TRANSPORT=ALL
25 -> Building for a specific transport :
26 $ scons resource/csdk/connectivity/samples/linux/ TARGET_OS=linux TARGET_TRANSPORT=IP
28 -> Building for multiple transports :
29 $ scons resource/csdk/connectivity/samples/linux/ TARGET_OS=linux TARGET_TRANSPORT=IP,BT
31 -> Clean Build (all transports) :
32 scons resource/csdk/connectivity/samples/linux/ TARGET_OS=linux TARGET_TRANSPORT=ALL -c (for clean)
35 3) The above command will build sample also.
37 For Enabling Secured server,
38 * Note: tinydtls library has to copied to "connectivity/lib/tinydtls" for secured build.
40 Secured Server will be only used for IP transports.
42 Give command "scons resource/csdk/connectivity/samples/linux/ TARGET_OS=linux TARGET_TRANSPORT=IP SECURED=1
46 1) Go to "iotivity/" folder.
48 2) Execute following command(s) to start build based on transport selection required :
50 -> Building for all transports :
51 $ scons resource/csdk/connectivity/samples/android/ TARGET_OS=android TARGET_TRANSPORT=ALL TARGET_ARCH=x86 ANDROID_NDK=your_ndk_path
53 -> Building for a specific transport :
54 $ scons resource/csdk/connectivity/samples/android/ TARGET_OS=android TARGET_TRANSPORT=IP TARGET_ARCH=x86 ANDROID_NDK=your_ndk_path
56 -> Building for multiple transports :
57 $ scons resource/csdk/connectivity/samples/android/ TARGET_OS=android TARGET_TRANSPORT=IP,BT TARGET_ARCH=x86 ANDROID_NDK=your_ndk_path
59 Note :- Upon successful execution of above command(s) CA library will be generated at path
60 "iotivity/out/android/TARGET_ARCH/release or debug".
64 1) If you are building first time, then delete GBS-ROOT folder from home directory.
65 Note: Default build server URL for Tizen is set in gbs configuration file @ iotivity/tools/tizen/.gbs.conf.
66 If need be, same can be modified as per appropriate target.
68 2) Go to "iotivity/" folder.
70 3) Execute following command(s) to start build based on transport selection required :
72 -> Building for all transports :
73 $ scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=ALL
75 -> Building for a specific transport :
76 $ scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP
78 -> Building for multiple transports :
79 $ scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP,BT,BLE
81 4) By default, above command will build sample also.
82 To disable building sample, add BUILD_SAMPLE=OFF to the build command.
83 Ex: scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=ALL BUILD_SAMPLE=OFF
84 Making this flag ON builds the sample.
86 Note :- Upon successful execution of above command(s) CA library and sample applications will be
87 generated at path "~/GBS-ROOT/local/repos/redwood/armv7l/RPMS".
91 Note :- Currently Mega & Due build is supported.
93 1) Set up Arduino first before building. Refer to "connectivity\build\arduino\Arduino_Setup_README.txt" file for help.
95 2) Go to "iotivity/" folder.
97 3) Execute following command to start build :
100 $ scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=<transport> TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
102 $ scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=<transport> TARGET_ARCH=arm BOARD=arduino_due_x_dbg ARDUINO_HOME=<path_to_arduino_installation>
103 NOTE: BOARD=arduino_due_x_dbg|arduino_due_x. Default is arduino_due_x_dbg.
105 Possible values for <transport> are:
107 $ scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=IP TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
109 $ scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=BLE TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
111 Note :- Only single transport can be built at a time for Arduino.
113 4) The above command will build sample also. The "CASample.hex" can be found at "/samples/arduino/"
115 5) After building sample, script will try to install on "/dev/ttyACM0" port in 'sudo' mode.
116 To skip installation, set command line argument 'UPLOAD=false'.
117 "scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=ETHERNET TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation> UPLOAD=false"
119 6) To set BLE Shield Name, include the option DEVICE_NAME during scons build.
121 -> $ scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=ETHERNET TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation> DEVICE_NAME=OIC
123 Specified Device name length MUST be less than 10 characters. RBL Library has this limitation.
124 By Default DEVICE_NAME=OIC-DEVICE, if device name option is not specified
126 To change the port number, please modify "port" variable in __upload() function in: "/build/arduino/SConscript".