Upload
others
View
8
Download
0
Embed Size (px)
Citation preview
SDK in the Browserfor Zephyr™
Sakari Poussa@spoussa
Intel
Zephyr is a trademark of the Linux Foundation. *Other names and brands may be claimed as the property of others.
AgendaProblem StatementSolutionDemoHow does it Work?JavaScript*
Web USBWeb Application
*Other names and brands may be claimed as the property of others.
Problem Statement
IoT is Hard!
Starting New IoT Project is HardDevelopment Environment SetupCablesSensorsDocumentationSample codeBIOS, firmware, OS updates
Solution
What if……this is all you need?
Demo
How Does It Work?
How Does It Work?
MCU
Zephyr
JerryScript
JS Runtime
WebUSB
ashell
Web Site
USB Cable
1. Supported URLs
2. Tell URLs 3. Show USB Dialog
4. Get URL
5. Load Application
6. Connect
DATA
Development Flow
Edit
CopyRun
Edit
Compile
Reboot
Flash
Reboot
Run
Native JavaScript*
*Other names and brands may be claimed as the property of others.
WebIDE
WebUSBJS Runtime for
Zephyr
JavaScript*
*Other names and brands may be claimed as the property of others.
JavaScript* Runtime for Zephyr OSEnable JavaScript application development on Zephyr OSAddress large JavaScript developer communityFast development cycle - No flashing, just copy .js filesBased on open source JerryScript JS engine and API layerWell known JavaScript APIs (Node.js* like)Application portability between MCU and MPU platformsSupport now for Arduino101* board and FRDM-K64F, all Zephyr OS supported boards in the future
*Other names and brands may be claimed as the property of others.
ArchitectureJavaScript* App
Business logic by the app developer
JS Runtime for ZephyrAPI bindingsBuild toolsSample and demo appsAPI docsOpen source (Apache 2.0)
JS EngineMicro JS engine - JerryScriptOpen source (Apache 2.0)
MCU
Zephyr
JerryScript
JS Runtime for Zephyr
JavaScript App Application
JavaScript APIs
*Other names and brands may be claimed as the property of others.
Two ModesRuntime Mode
JavaScript* source is converted into C string and embedded into zephyr.bin imageOnly the embedded JavaScript application is executed
Developer ModeJavaScript application is executed from Zephyr OS filesystemJavaScript application replaceable via USB or BLE using browser IDE or CLI tool
*Other names and brands may be claimed as the property of others.
Build$ git clone [email protected]/01org/zephyr.js
$ cd zephyr.js$ make DEV=ashell
MCU
Zephyr OS
JerryScript
JS Runtime for Zephyr
JavaScript* App
Building…
zephyr.bin$ make dfu
*Other names and brands may be claimed as the property of others.
Runtime M
ode
Developer M
ode
Browser IDEOnly in DEV modeCopy-n-Run3rd Party IDEsCLI ToolsWeb USB
Zephyr OS
JS Runtime
Web USB
JavaScript* App
Host PCUSB/BLE
*Other names and brands may be claimed as the property of others.
JavaScript* APIsAPI Zephyr OS Node.js
Events, Timers, Console Now Core API
Buffer Now Core API
BLE Now Bleno NPM
GPIO, I2C, AIO, PWM, UART Now Johnny-Five like
OCF Now IoTivity-node NPM
CoAP Planned CoAP NPM
MQTT Planned MQTT NPM
W3C Sensors, Performance Now TBD
UDP Now Core API
TCP, HTTP Coming Core API
File System Coming Core API
*Other names and brands may be claimed as the property of others.
Web USB
Web USB - Why It MattersUSB is a de-facto standard for connecting devices over short distancesIt is fast, reliable and inexpensiveIt allows for powering devices while communicatingAdvances over Bluetooth® and other wireless techs
Faster and more reliable - just worksWorks with laptop, desktop and phoneAllows for powering the deviceCan be used in places where signals are disallowed (planes, hospitals)Access to a device can be guarded physically
Introducing Web USBA new W3C standard allowing web sites and apps access to USB devicesNew USB headers creates further security and allows for a popup when plugging in the peripheralHeaders will become optional, but are recommended and required for popupWorks in Chrome* today on Linux*, Macintosh*, and Windows*
*Other names and brands may be claimed as the property of others.
Issues Web USBLinux*
modemmanager hijacks USB CDC devices unless their VID/PID are blacklisted
Windows*Does not autoload Web USB driver but requires MS OS descriptors (or INF file)Earlier versions (< 10) of Windows, requires a signed "driver", which is basically a signed INF text file, binding the VIP/PID to usbser.sys (the default USB serial driver)
Macintosh*No issues !
*Other names and brands may be claimed as the property of others.
Web Application
JavaScript* Web IDE for Zephyr OS Browser only Web Application - no server componentJavaScript code editor (Monaco from Microsoft*)Console (Google* console module)Board Viewer (new)Web USB for device communicationMultiple tabs and devicesGit Hub IntegrationAngular2
*Other names and brands may be claimed as the property of others.
JavaScript Web IDE for Zephyr OS (#2)
Open Sourcehttps://github.com/01org/zephyrjs-ide
Live sitehttps://01org.github.io/zephyrjs-ide/
Apache* 2.0
*Other names and brands may be claimed as the property of others.
Next Steps and Summary
Next StepsMore boards to board viewerCommunication between panelsProper API documentation to MonacoPlugins to other IDEsFlashing with Web USBAccess to local file systemWebUSB changesArduino 101* board ROM sizeTesting with other boards
*Other names and brands may be claimed as the property of others.
SummaryEasy to use development environmentLower the entry barrier to start IoT ProjectsGood fit for class rooms, hackathons and demos
Join the Open Source Projects !We are looking for contributionshttps://github.com/01org/zephyr.jshttps://github.com/01org/zephyrjs-ide
Questions ?
Try it Out @HackathonWed 1-4 pmForum SuiteSpace is limited, registration required
http://sched.co/9XjO