-=== Pre requites ===
+=== Prerequisites ===
* 1. Scons
3) The above command will build sample also.
- For Enabling Secured server,
+ For Enabling Secured server,
* Note: tinydtls library has to copied to "connectivity/lib/tinydtls" for secured build.
Secured Server will be only used for WIFI and ETHERNET transports.
Arduino Build:
-Note :- Currently only megaADK build is supported.
+Note :- Currently Mega & Due build is supported.
1) Set up Arduino first before building. Refer to "connectivity\build\arduino\Arduino_Setup_README.txt" file for help.
3) Execute following command to start build :
- $ scons TARGET_OS=arduino TARGET_TRANSPORT=<transport> TARGET_ARCH=avr BOARD=megaADK ARDUINO_HOME=<path_to_arduino_installation>
+For Arduino Mega
+ $ scons TARGET_OS=arduino TARGET_TRANSPORT=<transport> SHIELD=<shield> TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
+For Arduino Due
+ $ scons TARGET_OS=arduino TARGET_TRANSPORT=<transport> SHIELD=<shield> TARGET_ARCH=arm BOARD=arduino_due_x_dbg ARDUINO_HOME=<path_to_arduino_installation>
+ NOTE: BOARD=arduino_due_x_dbg|arduino_due_x. Default is arduino_due_x_dbg.
Possible values for <transport> are:
- -> ETHERNET :
- $ scons TARGET_OS=arduino TARGET_TRANSPORT=ETHERNET TARGET_ARCH=avr BOARD=megaADK ARDUINO_HOME=<path_to_arduino_installation>
- -> WIFI :
- $ scons TARGET_OS=arduino TARGET_TRANSPORT=WIFI TARGET_ARCH=avr BOARD=megaADK ARDUINO_HOME=<path_to_arduino_installation>
+ -> IP :
+ $ scons TARGET_OS=arduino TARGET_TRANSPORT=IP SHIELD=WIFI TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
+ $ scons TARGET_OS=arduino TARGET_TRANSPORT=IP SHIELD=ETH TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
-> BLE :
- $ scons TARGET_OS=arduino TARGET_TRANSPORT=BLE TARGET_ARCH=avr BOARD=megaADK ARDUINO_HOME=<path_to_arduino_installation>
+ $ scons TARGET_OS=arduino TARGET_TRANSPORT=BLE SHIELD=RBL_NRF8001 TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
Note :- Only single transport can be built at a time for Arduino.
5) After building sample, script will try to install on "/dev/ttyACM0" port in 'sudo' mode.
To skip installation, set command line argument 'UPLOAD=false'.
- "scons TARGET_OS=arduino TARGET_TRANSPORT=ETHERNET TARGET_ARCH=avr BOARD=megaADK ARDUINO_HOME=<path_to_arduino_installation> UPLOAD=false"
+ "scons TARGET_OS=arduino TARGET_TRANSPORT=IP SHIELD=ETH TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation> UPLOAD=false"
6) To set BLE Shield Name, include the option DEVICE_NAME during scons build.
- -> $ scons TARGET_OS=arduino TARGET_TRANSPORT=ETHERNET TARGET_ARCH=avr BOARD=megaADK ARDUINO_HOME=<path_to_arduino_installation> DEVICE_NAME=OIC
+ -> $ scons TARGET_OS=arduino TARGET_TRANSPORT=BLE SHIELD=RBL_NRF8001 TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation> DEVICE_NAME=OIC
Specified Device name length MUST be less than 10 characters. RBL Library has this limitation.
By Default DEVICE_NAME=OIC-DEVICE, if device name option is not specified
To change the port number, please modify "port" variable in __upload() function in: "/build/arduino/SConscript".
+