Embedded Systems

Embedded Vs Open Systems

  • Embedded System - Programmable electronics system immersed in a larger physical system, and has fixed functionalities.
  • Open System - General purpose system which is inter-operable and sticks to open standards, whose hardware and software features are scaleable and extensible.
  • We are in an era of Hybrid embedded systems, where the devices built has mixed properties of both embedded system and open system.
  • Currently the specific purpose embedded systems are classified as deeply embedded systems.

Embedded Software Model

  • Mostly in deeply embedded systems monolithic binary image of software called as firmware is developed.
  • In mid level embedded systems the minimalist multi-threaded OS or real-time OS (RTOS) is used along with the application code to build the firmware image.
  • In above firmware model the software features are freezed at compile time itself and it cannot be scaled at later point.
  • The high level embedded systems are hybrid and uses general purpose operating systems (GPOS).

Embedded Software Model Contd.

figures/embedded-software-model.png

High Level Embedded Systems Application

They are used in

  • Telecom
  • Network
  • Consumer electronics

General Purpose Operating System

  • Supports running several applications together.
  • It would be multi-layered with multiple software components integrated together.
  • Follows open standards like POSIX
  • Applications can be installed or removed at runtime.
  • Applications are untrusted by OS and are provided less privileges.
  • Linux, BSD, MAC, Windows etc.,
figures/gpos-stack.png

Linux

What is Linux

  • Unix-like: a GPOS provides an interface similar to the Unix operating system developed by Bell labs.
  • multi-tasking: many different applications at the same time
  • multi-user: many different users can use the system
  • cross-platform: supports wide variety of hardware - desktops, mainframes, supercomputers, gaming stations, mobile phones, routers, etc.

Linux Usage

User Interaction

  • User can interact to an UNIX system through shell or through desktop environment.
  • A shell is a command line application provides a means for navigating through the file system, and launching other programs on request.
  • Desktop environment is the graphical replacement for shell and provides much more convenience for desktop users.

figures/unix-rings.png

Files in Linux

  • File system allows to organize the user’s data as files in a convenient way in the storage devices.
  • Files in GNU/Linux can be broadly classified as follows:
    • Regular files like text files, images, binaries, pdfs etc.,
    • Directories to group the related files
    • Links is like shorcuts in windows
    • And Device files which allows to access devices

Embedded Linux

Why Embedded Linux?

Pros
  • No royalties or licensing fee.
  • Support is available from the community, as well from multiple vendors. This avoids vendor lock in.
  • Linux kernel supports a wide range of microprocessors and peripherals devices.
  • Re-use existing Linux application base.
  • Re-use existing Linux resource pool in embedded systems.

Why Embedded Linux Contd.

Cons
  • Large memory foot print.
  • The stock kernel only offers soft real-time capabilities. Third party patches are available for latency reduction and adding hard real-time capabilities.

What is Embedded Linux

  • Customizing the Linux and its allies for a custom target board.
    • adding additional software for embedded interfaces
    • removing unnecessary components to reduce time and space

Desktop Components

figures/desktop.png

Target Hardware Components

  • Processor
  • Flash
  • SDRAM
  • Serial Port
  • Ethernet
figures/hardware.png

Development Setup

  • Host System - development env.
  • Target System - execution env.
  • The application running in the target system read input from the serial port, and send output to the serial port.
  • In other words, the standard input and standard output of the applications is attached to the serial port.
figures/setup.png

Development Setup Contd.

  • Host system uses a serial terminal program like minicom and putty to communicate with the target system.
  • Kernel image and filesystem image download is done through Ethernet interface. Serial interface is not fast enough.

ZKit-ARM-VF51

Base Board Details

  • The board designed by Zilogic and named as ZKit-ARM-VF51
  • This is the platform designed to explore and prototype Linux for various solutions.
  • Designed to be low in power consumption, so that even with add-on boards, it can be powered from USB cable.
  • It has
    • Vybrid VF5x
      • ARM Cortex A5
      • 400 MHz
      • From NXP/Freescale

Base Board Details Continued

  • 128 MB RAM
  • 128 MB NAND
  • MicroSD Slot
  • Ethernet x 2
  • USB host & device
  • Raspberry Pi compatible connector for peripherals
figures/zkit-arm-vf51.jpg

Add-on Board Details

  • It is internally code named as DietIO
  • Has peripherals devices
    • LEDs
    • Keys
    • 4-Way Key
    • Monochrome Graphics LCD
    • POT
    • LDR
    • Accelerometer
figures/dietio.jpg

Zkit + DietIO

figures/zkit-dietio.jpg

Complete Peripheral Details

figures/peripheral-blocks.png

Tryout

  • Use Putty in Windows or Minicom to access debug console of board.
    • Check the COM number from device manager in Windows or ttyUSBx node from dmesg of Linux.
    • Use baudrate as 115200, data config as 8N1 and flow control as none.

Tryout Contd.

  • Write a hello world python code in your laptop.
  • In target board, type
 $ cat > hello.py
  • and copy paste the code to the target board’s terminal.
  • The press CTRL+D to save the copied content to the file in the target board.
  • execute the hello.py in target board.