AGL Software Development Kit Stphane Desneux CTO at IoT.bzh < - - PowerPoint PPT Presentation

agl software development kit
SMART_READER_LITE
LIVE PREVIEW

AGL Software Development Kit Stphane Desneux CTO at IoT.bzh < - - PowerPoint PPT Presentation

AGL Software Development Kit Stphane 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


slide-1
SLIDE 1

AGL Software Development Kit

Stéphane Desneux CTO at IoT.bzh <sdx@iot.bzh>

AMM - Tokyo Winter 2016

slide-2
SLIDE 2

Feb 23, 2016 AGL Software Development Kit 2

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
slide-3
SLIDE 3

Feb 23, 2016 AGL Software Development Kit 3

Agenda

  • SDK Explained
  • Building the SDK in a Docker image
  • Demo - AGL 1.0 SDK
  • Future enhancements
  • Demo - AGL next SDK
  • Q&A
slide-4
SLIDE 4

Feb 23, 2016 AGL Software Development Kit 4

SDK Explained

slide-5
SLIDE 5

Feb 23, 2016 AGL Software Development Kit 5

Context

  • HTML5, native or hybrid applications
  • n 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

slide-6
SLIDE 6

Feb 23, 2016 AGL Software Development Kit 6

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

slide-7
SLIDE 7

Feb 23, 2016 AGL Software Development Kit 7

Proposed architecture

slide-8
SLIDE 8

Feb 23, 2016 AGL Software Development Kit 8

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

slide-9
SLIDE 9

Feb 23, 2016 AGL Software Development Kit 9

Availability

  • Available for AGL Albacore 1.0 on

Renesas Porter since January 2016

http://iot.bzh/download/public/2016/sdk/

slide-10
SLIDE 10

Feb 23, 2016 AGL Software Development Kit 10

Building the SDK

slide-11
SLIDE 11

Feb 23, 2016 AGL Software Development Kit 11

Three base components

1: Base Docker image - Debian 8.x 2: AGL Application Development Toolkit 3: IDE - Eclipse

slide-12
SLIDE 12

Feb 23, 2016 AGL Software Development Kit 12

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>

slide-13
SLIDE 13

Feb 23, 2016 AGL Software Development Kit 13

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

slide-14
SLIDE 14

Feb 23, 2016 AGL Software Development Kit 14

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

slide-15
SLIDE 15

Feb 23, 2016 AGL Software Development Kit 15

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
slide-16
SLIDE 16

Feb 23, 2016 AGL Software Development Kit 16

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
slide-17
SLIDE 17

Feb 23, 2016 AGL Software Development Kit 17

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
slide-18
SLIDE 18

Feb 23, 2016 AGL Software Development Kit 18

Demo: AGL 1.0 SDK for Renesas Porter board

slide-19
SLIDE 19

Feb 23, 2016 AGL Software Development Kit 19

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
slide-20
SLIDE 20

Feb 23, 2016 AGL Software Development Kit 20

AGL SDK Initialization

  • Load the SDK Docker image:
  • Instantiate a new SDK Container named 'aglsdk':
  • Open a new RDP session on localhost:3389

docker pull docker.iot.bzh/agl/snapshot-stable-sdk:1.0 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 xfreerdp -u devel -p devel -g 1200x700 localhost

slide-21
SLIDE 21

Feb 23, 2016 AGL Software Development Kit 21

Connect through RDP

RDP session starting Eclipse IDE Initial Screen

slide-22
SLIDE 22

Feb 23, 2016 AGL Software Development Kit 22

Build a C/C++ program

Cross-compilation using Yocto & Eclipse

slide-23
SLIDE 23

Feb 23, 2016 AGL Software Development Kit 23

Remote debugging

Remote debugging on Eclipse using SSH and gdbserver

slide-24
SLIDE 24

Feb 23, 2016 AGL Software Development Kit 24

Future Enhancements

slide-25
SLIDE 25

Feb 23, 2016 AGL Software Development Kit 25

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

slide-26
SLIDE 26

Feb 23, 2016 AGL Software Development Kit 26

Eclipse Che Architecture

https://www.fjlepicker.io/api/fjle/O3D1OORwRmCWzuE8mD2s

slide-27
SLIDE 27

Feb 23, 2016 AGL Software Development Kit 27

Next SDK Architecture

slide-28
SLIDE 28

Feb 23, 2016 AGL Software Development Kit 28

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

slide-29
SLIDE 29

Feb 23, 2016 AGL Software Development Kit 29

Demo: AGL 2.0 SDK preview based on Eclipse Che

slide-30
SLIDE 30

Feb 23, 2016 AGL Software Development Kit 30

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

slide-31
SLIDE 31

Feb 23, 2016 AGL Software Development Kit 31

HTML5 Apps

Radio, Annex, Rabbit

slide-32
SLIDE 32

Feb 23, 2016 AGL Software Development Kit 32

Application Framework Design

slide-33
SLIDE 33

Feb 23, 2016 AGL Software Development Kit 33

Eclipse Che: dashboard

slide-34
SLIDE 34

Feb 23, 2016 AGL Software Development Kit 34

Eclipse Che: new project

slide-35
SLIDE 35

Feb 23, 2016 AGL Software Development Kit 35

Eclipse Che: HTML5 workspace

slide-36
SLIDE 36

Feb 23, 2016 AGL Software Development Kit 36

Q&A

Gulf of Morbihan, south of Brittany, France

slide-37
SLIDE 37

Feb 23, 2016 AGL Software Development Kit 37

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