1. Samsung Open Source Group 1 https://www.meetup.com/Rennes-Embedded/
JavaScript in constrained devices
Using :RT
with IoT.js
#RennesEmbedded
Rennes, France <2018-10-11>
Philippe Coval
Samsung Open Source Group / SRUK
p.coval@samsung.com
2. Samsung Open Source Group 2 https://www.meetup.com/Rennes-Embedded/
What do you know of ?
● Operating System powered by Linux Kernel
● Shipped into consumer electronics products
– TVs, Wearables, Home kitchen appliances…
● Tizen the OS of Everything?
– What about low-end and low-cost IoT devices?
● Note: uClinux is lowering requirements
– but not optimal so we need a dedicated kernel !
● TizenRT is targeting middle configurations (RAM+Flash):
– Cortex M3 (30KB+512KB), M4 (256KB+16MB), R4 (2MB+16MB)
3. Samsung Open Source Group 3 https://www.meetup.com/Rennes-Embedded/
TizenRT's origin
● TinyAra 2015 project to collect, store, and deliver IoT sensor data using:
– IoTivity for connectivity & AraStorage: Data management
– Sources released to public on tizen.org (SOSCON2016)
● It was based on NuttX RealTime kernel (deterministic and priorities)
– UNIX/Linux inspired OS (+shell +apps) comply to standards, POSIX, GNU tools
– Initial release in 2007, community led by main author Gregory Nutt
– Stable & Mature (2.5M LoC), 8 to 32 bits, ~20 archs, 200 boards (<16KB)
– BSD Licensed: Industry & community adoption
● TizenRT is the whole stack: TinyAra kernel + middlewares (TDC2017)
4. Samsung Open Source Group 4 https://www.meetup.com/Rennes-Embedded/
Tizen:RT Architecture
Current
status:
2.0_GBM_M1
+
~1000
patches
5. Samsung Open Source Group 5 https://www.meetup.com/Rennes-Embedded/
Tizen:RT plan for reliability
● Memory protection unit (MPU > MMU)
– User/Kernel separation
●
Per thread mem protection
● Micro kernel architecture
– Only for scheduling tasks, memory, IPC
● + user space services (Net, drivers...)
● Fault Tolerance
– Self healing
● restart services (and dependencies)
– Fallback option: Live update (DM)
6. Samsung Open Source Group 6 https://www.meetup.com/Rennes-Embedded/
Application development on Tizen:RT
●
Platform is supporting native development (POSIX)
– with optional middlewares:
– WiFi, LWIP port for IPv6, +LWM2M, CoAP, HTTP, DTLS, WebSockets, MQTT
– Wakaama (LWM2M) for device management
– IoTivity for seamless connectivity between devices
● But some (or most) applications
– Are not requiring low level primitives
● When high level API are available
– Need secured context
● For many developers
"Any application,
that can be written in JavaScript
will eventually be written in JavaScript."
~Jeff Atwood
7. Samsung Open Source Group 7 https://www.meetup.com/Rennes-Embedded/
“Simplicity
is the ultimate sophistication.”
~Leonardo da Vinci
8. Samsung Open Source Group 8 https://www.meetup.com/Rennes-Embedded/
IoT.js: platform powered by JerryScript engine
● JerryScript: A JavaScript interpreter
– Optimized for constrained devices: <64 KB RAM & <200 KB ROM
– Available in various RTOS: Tizen:RT, RIOT, Zephyr…
● IoT.js: Runtime environment
– Supports modules (built in)
● Timers, GPIO, ADC, I2C,UART
● UDP, HTTP, WebSockets, DNS, BLE
● Developer friendly environment:
– Develop using iotjs on GNU/Linux
– Port and deploy to constrained device
– Or even port modules (NPM)
9. Samsung Open Source Group 9 https://www.meetup.com/Rennes-Embedded/
“Any sufficiently
advanced technology
is indistinguishable
from magic.”
~ Arthur C. Clarke
10. Samsung Open Source Group 10 https://www.meetup.com/Rennes-Embedded/
Demo !
https://youtu.be/S7zpBpnpflU#tizen-rt-lpwan-20180204rzr
● https://my.wirelessthings.be/index.php/device/device_view/1229
11. Samsung Open Source Group 11 https://www.meetup.com/Rennes-Embedded/
Mozilla IoT & WebThings powered by ARTIK
https://youtu.be/qrFTn0eA8iQ#web-of-things-agriculture-20180712rzr
https://youtu.be/qrFTn0eA8iQ
web-of-things-agriculture-20180712rzr#
12. Samsung Open Source Group 12 https://www.meetup.com/Rennes-Embedded/
Summary
● Tizen is based on Linux kernel for high end devices
● Tizen ecosystem is now addressing more constrained IoT devices
– Tizen:RT was originally based on NuttX kernel,
● then evolved into micro kernel architecture
● Tizen:RT is open to application developers by providing
– Native, C, C++ POSIX standard libraries
– Javascript runtime, using IoT.js + JerryScript interpreter
● Open Community (github.com/Samsung) & Tools: SDK (CLI or IDE)
13. Samsung Open Source Group 13 https://www.meetup.com/Rennes-Embedded/
References
Entry points:
– https://fosdem.org/2018/schedule/event/tizen_rt/
– https://wiki.tizen.org/Category:RT
– https://github.com/Samsung/TizenRT/
Keep in touch online:
– https://s-opensource.org/author/philcovalsamsungcom/
https://wiki.tizen.org/wiki/Meeting
– https://wiki.tizen.org/wiki/Events
– https://wiki.tizen.org/wiki/FOSDEM
More:
● https://source.tizen.org/documentation/tizen-rt
● https://www.artik.io/modules/artik-05x/
● https://developer.artik.io/documentation/artik-05x/getting-started/
● http://www.nuttx.org/
● http://youtube.com/channel/UC0QciIlcUnjJkL5yJJBmluw
● https://www.slideshare.net/MyungJooHam/tdc-mjham-armkernelintizen3noani
● http://opensource.samsung.com/
Bonus tip:
for demo convenience
I am drafting demo recipes (WIP)
git clone https://github.com/rzr/TizenRT
14. 14Samsung Open Source Group
Thank you
https://wiki.tizen.org/wiki/User:Pcoval
BTW greetings to :
Resources: flaticons CC