-
Notifications
You must be signed in to change notification settings - Fork 438
Build for ARTIK053 TizenRT
This directory contains files to run IoT.js on TizenRT.
Get the build in binaries and libraries, gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.
Untar the gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar and export the path like
tar xvf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar
export PATH=<Your Toolchain PATH>:$PATH
sudo apt-get install genromfs
Refer to Kconfig-frontends Installation
Clone IoT.js and TizenRT into iotjs-tizenrt directory
mkdir iotjs-tizenrt
cd iotjs-tizenrt
git clone https://github.com/Samsung/iotjs.git
git clone https://github.com/Samsung/TizenRT.git
The following directory structure is created after these commands
iotjs-tizenrt
+ iotjs
+ TizenRT
This step is optional. You can edit the build config of IoT.js in iotjs/build.config
. In order to enable modules you want, you can configure your own profile file, or you can add them as an option to the build command. For more details, please find the ENABLE_MODULE_[NAME]
section in How to write a new module.
ENABLE_MODULE_ADC
ENABLE_MODULE_GPIO
$ ./tools/build.py --external-modules=./my-module --cmake-param=-DENABLE_MODULE_MYMODULE=ON
cd TizenRT/os/tools
./configure.sh artik053/iotjs
cd ..
cp <your test app> ../tools/fs/contents/
# make ROMFS image
../tools/fs/mkromfsimg.sh
# The contents folder is later flashing into the target's /rom folder
NOTE: The romfs image file must not exceed 400kb.
make IOTJS_ROOT_DIR=../../iotjs
If IOTJS_ROOT_DIR
isn't given as the argument, IoT.JS codes, which are located in external/iotjs
of TizenRT, will be used for the build.
❕ Trouble Shooting: Building IoT.js fails: You may encounter
arm-none-eabi-gcc: Command not found
error message while building IoT.js on a 64-bit system. This may be because the above toolchain you set uses 32-bit libs. For this matter, install the below toolchain as alternative.$ sudo apt-get install -y libc6-i386
make download ALL
❕ Trouble Shooting: Flashing the binary via USB fails: Refer to add-usb-device-rules. Your
VendorID:ProductID
pair can be found inlsusb
output as the below instance.$ lsusb Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 005: ID 0403:6010 Future Technology Devices International, Ltd >FT2232C Dual USB-UART/FIFO IC
You should use minicom
to login to the device.
$ sudo minicom -s
The following changes are necessaries in the Serial port setup
menu:
Serial Device : /dev/<device-id> # e.g. /dev/ttyUSB0
Hardware Flow Control : No
After Exit
, press an enter and the prompt should be available:
TASH>>
The following commands help to establish Internet connection on the device:
TASH>> wifi startsta
TASH>> wifi join <ssid> <password>
TASH>> ifconfig wl1 dhcp
Finally, the iotjs
built-in command can be executed:
TASH>> iotjs
Usage: iotjs [options] {FILE | FILE.js} [arguments]
TASH>>