embedded linux systems basics

17
Embedded Linux Systems Basics -What it is and when to use it -Pro/con consideration -System architectures -Physical platforms -Custom distributions: Yocto -Demo with uSOM (SSH via USB, GPIO, streaming images, Bash scripting)

Upload: max-henery

Post on 12-Apr-2017

90 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: Embedded Linux Systems Basics

Embedded Linux Systems Basics

-What it is and when to use it

-Pro/con consideration

-System architectures

-Physical platforms

-Custom distributions: Yocto

-Demo with uSOM (SSH via USB, GPIO, streaming images, Bash scripting)

Page 2: Embedded Linux Systems Basics

What It Is

● A miniature computer (with operating system) running in an embedded device

● Runs a flavor of linux (generally custom)● Allows applications level code to be utilized in

an embedded device setting● Easily obtain: High definition displays (HDMI),

good sound, internet connectivity (wifi / Ethernet), file transfer (USB), consumer computer connectivity (SSH, bluetooth etc.)

Page 3: Embedded Linux Systems Basics

When To Use It

● Want to make something with a high degree of connectivity / computer like qualities but also want it to interact with the physical world?

● Any system with a high degree of “human interface” or data manipulation requirements that can not be implemented on a smart phone, web interface, or computer application alone is a candidate.

● Want to use the abstraction and development speed of Python in an embedded setting?

Page 4: Embedded Linux Systems Basics

Good Candidates

Page 5: Embedded Linux Systems Basics

Probably Not A Good Idea

Flight Controls

Page 6: Embedded Linux Systems Basics

Pros● Abstraction through applications level code (massive

improvements in development time)

● Easy internet connectivity (wifi, ethernet)

● Powerful data manipulation

● Low development time to achieve big wow factor: pretty screens / sounds etc.

● Ability to interact with the physical world (motors, valves, lights) without having to deeply understand “bare metal” embedded C

● Your gateway to building“Internet of Things” devices

● Can publish code updates to all devices via the internet

Page 7: Embedded Linux Systems Basics

Cons● Safety critical / very high reliability applications: 99%+ of the code on

your device you did not write, can you guarantee its functionality?

● Significant amount of power is required (Example: R Pi is ~4W). Presents challenges for low power /battery operated devices

● Cost: about 25USD minimum (up to 120USD) for embedded computer board

● Regulatory agency: Whats in your code? You - “I don't know but it works”.

● Boot time is ~45secounds. How is screen activated during booting? How do you respond instantly to a button press when in a sleep state?

● Tight timing requirements: difficult / impossible to achieve timing accuracy and speeds commonly seen in embedded C and RTOS

● Heat generation can be significant in an enclosed product

● Team needed: Hardware, software, firmware skills

● If using an off the shelf embedded computer, your ability to produce relies heavily on your supplier – what if they make a mistake / stop producing?

Page 8: Embedded Linux Systems Basics

Simple Architecture

Page 9: Embedded Linux Systems Basics

Parallel Architecture

Page 10: Embedded Linux Systems Basics

Physical Platforms

● Raspberry Pi Compute Module● $25USD● Can use Raspbian Jessie Lite image for a start

https://www.raspberrypi.org/downloads/raspbian/● https://www.raspberrypi.org/blog/raspberry-pi-compute-module-new-product/

Page 11: Embedded Linux Systems Basics

Physical Platforms Continued

● BeagleBone Black● SSH over USB ● $55USD● Debian Linux Image● https://www.adafruit.com/products/1996

Page 12: Embedded Linux Systems Basics

Physical Platforms Continued

● Solidrun uSOM● Wifi, SSH over USB● $70USD● https://www.solid-run.com/product/microsom-i2/

Page 13: Embedded Linux Systems Basics

Custom Physical Platform

● Huge sustainment, cost and design “elegance” advantages

● Get ready to spend a lot of time with Yocto● Clementine Core is probably a good place to

start (has image to start working with) http://circuitmaker.com/Projects/Details/Jay-Carlson-2/Clementine-Core

● IMX6 Processor series from Freescale

Page 14: Embedded Linux Systems Basics

What about Hardware?

● Remember: to pull this off we need hardware, software, and firmware knowledge.

● Geppetto for basic carrier board designs (2kUSD for a board)

● https://geppetto.gumstix.com/#!/

Page 15: Embedded Linux Systems Basics

Yocto

● Why do you want a custom linux distribution?● Set pin map and pin default state via layer● Define drivers for peripherals such as wifi chip

sets● Allows for smaller, more controlled and reliable

code base● Builds can take several hours● To quote a fellow engineer - “It's all very

magical but it seems to work...”

Page 16: Embedded Linux Systems Basics

Yocto Resources

● Good place to start: build an image for Raspberry Pihttp://www.jumpnowtek.com/rpi/Raspberry-Pi-Systems-with-Yocto.html

● Good book: https://www.amazon.com/Embedded-Systems-Prentice-Software-Development/dp/0133443248

● https://www.yoctoproject.org/downloads● https://www.yoctoproject.org/sites/default/files/y

pdd-2016.04-san_diego_1.pdf

Page 17: Embedded Linux Systems Basics

Demo