sdk in the browser for zephyr™...1. supported urls 2. tell urls 3. show usb dialog 4. get url 5....
TRANSCRIPT
![Page 1: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/1.jpg)
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.
![Page 2: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/2.jpg)
AgendaProblem StatementSolutionDemoHow does it Work?JavaScript*
Web USBWeb Application
*Other names and brands may be claimed as the property of others.
![Page 3: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/3.jpg)
Problem Statement
![Page 4: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/4.jpg)
IoT is Hard!
![Page 5: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/5.jpg)
Starting New IoT Project is HardDevelopment Environment SetupCablesSensorsDocumentationSample codeBIOS, firmware, OS updates
![Page 6: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/6.jpg)
Solution
![Page 7: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/7.jpg)
What if……this is all you need?
![Page 8: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/8.jpg)
Demo
![Page 9: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/9.jpg)
How Does It Work?
![Page 10: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/10.jpg)
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
![Page 11: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/11.jpg)
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
![Page 12: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/12.jpg)
JavaScript*
*Other names and brands may be claimed as the property of others.
![Page 13: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/13.jpg)
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.
![Page 14: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/14.jpg)
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.
![Page 15: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/15.jpg)
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.
![Page 16: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/16.jpg)
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
![Page 17: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/17.jpg)
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.
![Page 18: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/18.jpg)
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.
![Page 19: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/19.jpg)
Web USB
![Page 20: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/20.jpg)
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
![Page 21: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/21.jpg)
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.
![Page 22: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/22.jpg)
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.
![Page 23: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/23.jpg)
Web Application
![Page 24: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/24.jpg)
![Page 25: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/25.jpg)
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.
![Page 26: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/26.jpg)
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.
![Page 27: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/27.jpg)
Next Steps and Summary
![Page 28: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/28.jpg)
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.
![Page 29: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/29.jpg)
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
![Page 30: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/30.jpg)
Questions ?
![Page 31: SDK in the Browser for Zephyr™...1. Supported URLs 2. Tell URLs 3. Show USB Dialog 4. Get URL 5. Load Application 6. Connect DATA Development Flow Edit Run Copy Edit Compile Reboot](https://reader035.vdocument.in/reader035/viewer/2022070809/5f08165e7e708231d420459d/html5/thumbnails/31.jpg)
Try it Out @HackathonWed 1-4 pmForum SuiteSpace is limited, registration required
http://sched.co/9XjO