AGL Software Development Kit Stéphane Desneux CTO at IoT.bzh < sdx@iot.bzh > AMM - Tokyo Winter 2016
IoT.bzh ● Specialized on Embedded & IoT ● Contributing to AGL Project for Renesas ● Expertise domains: – System architecture – Security – Application Framework – Graphics & Multimedia – Middleware – Linux Kernel ● Located in Brittany, France AGL Software Development Kit Feb 23, 2016 2
Agenda ● SDK Explained ● Building the SDK in a Docker image ● Demo - AGL 1.0 SDK ● Future enhancements ● Demo - AGL next SDK ● Q&A AGL Software Development Kit Feb 23, 2016 3
SDK Explained AGL Software Development Kit Feb 23, 2016 4
Context ● HTML5, native or hybrid applications on top of the AGL BSP for a specific board ● Bypass shortage of Yocto skills – ~ 0.5M embedded developers – ~ 17M web & mobile apps developers ● Heterogeneous environments : for a good adoption, the SDK should work in various environments: Windows, Linux, Mac OS AGL Software Development Kit Feb 23, 2016 5
Proposed Features ● IDE - Integrated Development Environment ● Develop source code ● Build for a selected AGL target board (cross-compiling) ● Deploy the software package onto a target board or an emulator ● Remotely run & debug the software package in the target environment AGL Software Development Kit Feb 23, 2016 6
Proposed architecture AGL Software Development Kit Feb 23, 2016 7
Benefits ● Naturally aligned with the BSP – a SDK container is built after each BSP container, for every snapshot – applications in the SDK are built with the same toolchain as the BSP. ● Stability & Uniformity – a container provides simple, unbiased build environments – independent of the host system ● Ubiquity – a SDK container may run on the Cloud, on-premises, on developers hosts … ● Cost & Time to market – out-of-the-box solution – applications developed faster and ready earlier ● Long Term Support – re-create the development environment decades after product release AGL Software Development Kit Feb 23, 2016 8
Availability ● Available for AGL Albacore 1.0 on Renesas Porter since January 2016 http://iot.bzh/download/public/2016/sdk/ AGL Software Development Kit Feb 23, 2016 9
Building the SDK AGL Software Development Kit Feb 23, 2016 10
Three base components 1: Base Docker image - Debian 8.x 2: AGL Application Development Toolkit 3: IDE - Eclipse AGL Software Development Kit Feb 23, 2016 11
1: SDK Base Docker Image ● Based on latest Debian 8.x ● Meets the requirements for both Yocto ADT and Eclipse IDE ● XRDP Server, very light desktop environment (OpenBox) ● Extra tools: – gcc, g++ (x86_64 native toolchain), cmake, ccache, git, ... – nodejs, gulp, bower (HTML5 development) ● Upgradable and expandable: – this is a genuine Debian image, with “full” comfort – apt-get update && apt-get install <whatever> AGL Software Development Kit Feb 23, 2016 12
2: AGL App Dev Toolkit ● produced by bitbake using Yocto/OE tools and AGL layers bitbake agl-image-ivi-crosssdk ● auto-installable archive, ~400MB ● content: – cross toolchain (gcc, g++, binutils for the target platform) – C/C++ headers depending on distribution content – static and dynamic libraries – Target sysroot, Native sysroot ● should be built and published in every AGL snapshot/release for all target boards AGL Software Development Kit Feb 23, 2016 13
3: Integrated Dev Environment ● Eclipse IDE is popular and widely spread ● Maintained by Eclipse.org and Codenvy ● Many plugins are available, in particular: – Yocto ADT plugin – TCF (WindRiver) for deployment, access and remote debug on a target board (even behind firewalls) ● Eclipse Kepler for Yocto 1.7 compatibility AGL Software Development Kit Feb 23, 2016 14
Building SDK in a container ● Instantiate a new SDK base container ● Copy and install AGL ADT archive ● Install Eclipse IDE and plugins ● Finalize environment (XRDP server, user homescreen, extra tools ...) ● Commit the container into a new image AGL Software Development Kit Feb 23, 2016 15
Docker: Publish & Deploy ● Tag the SDK image with unique id: – IMAGE_ID=agl/sdk-porter-snapshot:b141 – docker tag 75293fda2e39 $IMAGE_ID ● Push to Docker hub or private Registry: – docker push $IMAGE_ID ● A developer can then grab and run the image: – docker run -p 3389 --privileged \ -v /sys/fs/cgroup:/sys/fs/cgroup:ro agl/sdk-porter-snapshot:b141 AGL Software Development Kit Feb 23, 2016 16
Deploy without Docker Hub ● Tag the SDK image with unique id: – IMAGE_ID=agl/sdk-porter-snapshot:b141 – docker tag 75293fda2e39 $IMAGE_ID ● Export the image to a file and publish it on the web: – docker save $IMAGE_ID | xz -T0 -c >sdk-porter-snapshot_b141.xz – scp sdk-porter-snapshot_b141.xz www@webserver:/srv/www/htdocs/downloads/ ● A developer can then grab and run the image: – curl http://.../sdk-porter-snapshot_b141.xz | docker load – docker run -p 3389 --privileged \ -v /sys/fs/cgroup:/sys/fs/cgroup:ro agl/sdk-porter-snapshot:b141 AGL Software Development Kit Feb 23, 2016 17
Demo: AGL 1.0 SDK for Renesas Porter board AGL Software Development Kit Feb 23, 2016 18
Renesas Porter Board ● R-Car M2 SoC – ARM Cortex-A15 – Dual Core 1.5GHz – Multimedia Engine – GPU PowerVR SGX544MP2 ● 2GB DDR3 ● 2 Flash Mem Chips ● Ethernet ● Storage: SATA, SD, microSD ● Video: Analog In, HDMI Out ● Audio: In/Out ● USB 2.0 ● CAN Transceiver AGL Software Development Kit Feb 23, 2016 19
AGL SDK Initialization ● Load the SDK Docker image: docker pull docker.iot.bzh/agl/snapshot-stable-sdk:1.0 ● Instantiate a new SDK Container named ' aglsdk ': docker run --publish=3389:3389 --detach=true \ --privileged \ --hostname=aglsdk --name=aglsdk \ -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ docker.iot.bzh/agl/snapshot-stable-sdk:1.0 ● Open a new RDP session on localhost:3389 xfreerdp -u devel -p devel -g 1200x700 localhost AGL Software Development Kit Feb 23, 2016 20
Connect through RDP RDP session starting Eclipse IDE Initial Screen AGL Software Development Kit Feb 23, 2016 21
Build a C/C++ program Cross-compilation using Yocto & Eclipse AGL Software Development Kit Feb 23, 2016 22
Remote debugging Remote debugging on Eclipse using SSH and gdbserver AGL Software Development Kit Feb 23, 2016 23
Future Enhancements AGL Software Development Kit Feb 23, 2016 24
Future enhancements ● Use Eclipse Che (next generation IDE) – Web & Containers based – Support for C/C++ and HTML5 apps ● AGL specific plugin for Eclipse can be developed AGL Software Development Kit Feb 23, 2016 25
Eclipse Che Architecture https://www.fjlepicker.io/api/fjle/O3D1OORwRmCWzuE8mD2s AGL Software Development Kit Feb 23, 2016 26
Next SDK Architecture AGL Software Development Kit Feb 23, 2016 27
Technical Improvements ● Smaller SDK image: – Remove RDP – ADT cleanup ● Target board emulation through Qemu ● Solve permission conflicts on shared files due to lack of UID mapping in Docker AGL Software Development Kit Feb 23, 2016 28
Demo: AGL 2.0 SDK preview based on Eclipse Che AGL Software Development Kit Feb 23, 2016 29
Building HTML5 Application ● Standard Web and Mobile build environment: – Angular.js, Foundation for Apps ● Build system: – Code optimization, compression – Support Development/Production modes ● Associated browser: – Debugging in Chromium – LiveReload extension AGL Software Development Kit Feb 23, 2016 30
HTML5 Apps Radio, Annex, Rabbit AGL Software Development Kit Feb 23, 2016 31
Application Framework Design AGL Software Development Kit Feb 23, 2016 32
Eclipse Che: dashboard AGL Software Development Kit Feb 23, 2016 33
Eclipse Che: new project AGL Software Development Kit Feb 23, 2016 34
Eclipse Che: HTML5 workspace AGL Software Development Kit Feb 23, 2016 35
Q&A Gulf of Morbihan, south of Brittany, France AGL Software Development Kit Feb 23, 2016 36
Links ● IoT.bzh: www.iot.bzh ● AGL SDK downloads: http://iot.bzh/download/public/2016/sdk/ ● Eclipse: www.eclipse.org ● Docker: www.docker.com ● Yocto Project: www.yoctoproject.org AGL Software Development Kit Feb 23, 2016 37
Recommend
More recommend