Firmware Development

In a system, firmware is the software that resides in and operates on the lowest level of hardware. It literally means software that can not be changed. Most of the time, firmware performs those tasks which are absolutely necessary for the system to operate. These involve configuring and readying the hardware and peripherals at start-up or providing an abstraction layer for other software to easily use the concerned hardware. We will discuss here the firmware for microcontroller based embedded systems.

Microcontrollers based embedded systems are usually developed when discrete components are not able to perform the desired job efficiently or when there are some level of computational tasks involved. Firmware is the thing that is loaded on the microcontroller chips and it then drives the controller to get the desired results.

Microcontrollers are used immensely in all types and level of embedded systems. As firmware operates on the lowest level, it heavily depends on the hardware’s architecture. There exist a lot of diverse microcontroller families and, in addition, featuring a broad list of peripherals. Three of the most commonly used ones are Intel’s MCS-51 (8051), Microchip’s PIC and Atmel’s AVR. Each of these families offers distinct firmware development tools so quite a variety is available here.

Firmware can be coded in two categories of programming languages; low level and high level. Assembly is a low level language so it directly deals with the lowest hardware. While, on the other hand, a high level language like ‘C’ does abstraction so it is easier to code in. High level languages make the programming far easier but more efficient code is usually achieved using low level languages. Both low and high level languages use syntaxes or commands written in human- language and the actual code for the hardware is generated by an assembler or compiler. Nowadays, compilers for high level programming languages have become quite efficient so assembly is seldom used.

To achieve code efficiency, compilers are usually designed specific to the microcontroller family. So there is not a single compiler for all kinds of hardware. Compilers mostly come bundled with integrated development environments (IDE’s) which also offer code debuggers and simulators. For example, widely used IDE and compiler for MCS-51 (8051) family is KEIL, MPLAB for PIC and AVR Studio for AVR. Apart from these, CCS’s PIC-C and mikroElektronika’s mikroC are also famous. Compiler takes the source code and generates formatted “.HEX” file that actually contains the desired machine code. Many other files are also optionally generated, like “.COF” (debug info) and “.LST” (compatible assembly code), which are used for code debugging or troubleshooting. Assembler generates a binary “.BIN” file as the machine code.

The formatted “.HEX” files are used by devices called programmers or burners to transfer (or “burn”) the machine code into the target microcontroller. Commonly used “burning” techniques are in-system programming (ISP) and the JTAG (Joint Test Action Group) protocol. Both can also be used to perform in-circuit code debugging. JTAG was not developed for such works but is now used significantly, especially in the microprocessor and operating system based embedded systems.

, , , ,

Leave a comment

Software and Hardware Development Tools for Embedded Systems

Just as there are a lot different types of embedded systems, their development tools, both hardware and software, also exists in similar quantity. We will discuss here tools for larger scale embedded systems that require an embedded operating system to function. The base of development is the source code for the operating system kernel and the actual application. In the case of open source software, kernel source and the majority of the development tools are provided free for development, as is the case with Embedded Linux. In proprietary software case like Microsoft Windows CE, kernel source and development tools are bought and licensed for limited use. There are some exceptions like Microsoft’s DreamSpark and BizSpark projects which offer some of the Microsoft’s proprietary development tools and software free of cost to students and start-up businesses, respectively.

For embedded Linux development, the same kernel source as for the desktop computers is used. Linux kernel is downloaded from the official website, www.kernel.org, and then patched or configured for the target application and hardware. Such type of embedded development also requires a compatible host environment, usually the computer and the operating system running on that computer. Development can also be performed directly on the target hardware, if it is capable enough. While doing embedded development on desktop computer, developer can use an emulator, like QEMU (for Linux), to run the code on emulated target hardware.

The second most important thing for embedded development is the compiler package or toolchain. GNU Toolchain is one of the most used and popular toolchain for embedded development. It is a collection of compilers (GNU Compiler Collection (GCC), formerly GNU C Compiler) and tools like “make”,”binutils”, debugger (“gdb”) and “build”. Not only the GNU Toolchain is used for open source software development, but also for proprietary software (i.e. closed source). GNU Toolchain needs itself to be compiled or “build” for the target hardware platform but pre-built ones are also available, like the Mentor Graphics’ Sourcery G++ Lite (for Linux based development on ARM core hardware platform). An open source text and code editor, GNU Emacs is widely used for Linux based development.

In the case of Windows CE, development is done using the Windows CE Compiler. Microsoft offers an integrated development environment (IDE), known as Platform Builder, for development. All the necessary development tools also come with Platform Builder. Platform Builder is used for building the Windows CE kernel and the target hardware specific code package known as Board Support Package (BSP). Microsoft Visual Studio is also widely used for this purpose.

There comes an important stage in embedded development which is creating the boot loader for the completed firmware to make it run on the target hardware. Boot loaders load important hardware specific configurations at system start-up and hand-over the control to the operating system. Developer can create boot loaders themselves from scratch but pre-developed alternatives are also present. “Das U-Boot” (Universal Boot loader), or simply called “Uboot”, is such a widely used open source boot loader.

Hardware tools for embedded development include development or evaluation boards for specific processors and embedded architectures. Some famous ones are FriendlyARM’s Mini2440, Pandaboard, Beagleboard and Craneboard. Development boards are of various types and are usually categorized as Computer on Module  (CoM) and System-on-Chip (SoC). CoM is a complete embedded computer system with the core microprocessor, memory and all the peripherals present on a single board. On the other hand, SoC are small boards with just the microprocessor and memory (RAM and ROM). All the extra circuitry, peripherals, and power supply are present on another board, called Carrier board, on which the SoC board is mounted.

, , , , ,

Leave a comment

Embedded World Conference 2012

I love to go to conferences in the embedded industry. Over sponsored it might be, but sure gives you the best glance on the next developments and products of the embedded world. Some big companies – Microsoft, Freescale, IBM and others – are attending the event and giving some information on their next projects. Having a chat with friendly buddies behind the stands can also be useful.

The coming conference is the Embedded World Conference in Nurnberg Germany, starting on Feb. 28th. If you have a chance to drop by – it is very recommended to do so. You will just benefit from it.

Leave a comment

Comparison of Embedded Processor Families

Microprocessors designed for embedded systems offer limited processing power and features compared to the processors for computers. Microprocessors can be divided in to two types; RISC (Reduced instruction set computing) and, the opposite of it, CISC (Complex instruction set computing). Microprocessors for embedded systems are based on RISC mostly because RISC chips require far fewer transistors to perform the core logic compared to the CISC architecture. Smaller circuitry results in lesser area and energy consumption and this is the reason for the popularity and domination of RISC microprocessors in mobile and embedded devices market. Some of the top microprocessor families for embedded systems will be discussed here.

ARM Microprocessors

ARM (Advanced RISC Machine) is the most popular family of microprocessors in embedded systems market, based on the RISC instruction set architecture. Approximately 90% of all embedded 32-bit RISC processors belongs to the ARM family. Widely used ARM processor families are the ARM7, ARM9, ARM11 and Cortex, with ARM7TDMI being the most popular. The heart of Apple products, the A4 and A5 processors are also based on the ARM core. ARM family is basically 32-bit but there is also one other ARM architecture, known as Thumb, which supports 16-bit instructions. ARM microprocessors can perform multiple operations simultaneously due to the usage of multi stage pipelining and thus improving the processing speed. ARM microprocessors also offer rapid context switching as they have separate register banks for each mode of operation.

Texas Instruments bases many of their System on Chips on ARM architecture: OMAP4460, AM3517, DM3730, AM3703, AM3505. All the chips are based on ARM Cortex A-8, expect for the OMAP4460, which is designed over ARM Cortex A-9.

PowerPC

Another widely used RISC based embedded processor family is the PowerPC which was created jointly by IBM, Motorola and Apple. PowerPC architecture is an open standard and is based on IBM’s earlier POWER architecture. PowerPC family was actually designed for desktop computers and had been used considerably in Apple Macintosh computers, but they have also achieved popularity in embedded systems market. This is evident by the division of operating systems supported on PowerPC that some of them work on PowerPC based desktop computers and some work on PowerPC based embedded systems.

MIPS

MIPS, formerly an acronym for Microprocessor without Interlocked Pipeline Stages, is also a RISC based 32- & 64-bit microprocessor family for embedded systems. MIPS is one of the first RISC architecture based processor families. It is not that famous as the ARM and PowerPC families but still has a good presence in networking equipments market like routers and residential gateways. Embedded MIPS processors have very low power consumption. MIPS I, MIPS II, MIPS III, MIPS IV, MIPS V, MIPS32, and MIPS64, all are instruction sets for MIPS family.

, , , , ,

Leave a comment

High-Level & Real-Time Operating Systems for Embedded Systems

Embedded systems can be developed using discrete component or a microcontroller or microprocessor based hardware platforms. For small scale microcontroller based embedded system designs, usually a simple firmware is developed. But for high level or resource intensive embedded designs like mobile phones, media players, networking equipment, industrial automation, navigation equipment and medical instruments, we have to use an operating system based firmware to achieve system reliability and efficiency. In such designs, a developer usually keeps his focus on developing the actual application rather than managing or controlling the target system hardware which is handled by an operating system. Such operating systems are designed and optimized for hardware with limited feature set, unlike the operating systems for desktop PC’s.

Embedded operating systems are primarily categorized as high-level (or general-purpose) and real-time operating systems (RTOS). RTOS are further categorized as “soft” and “hard” real-time. RTOS’s schedule their tasks to execute them in a specific amount of CPU time because they have to respond to events in “real time” while simultaneously maintaining processing result accuracy. A “soft” real-time OS can tolerate delays in achieving task completion “deadlines”. On the other hand, a “hard” real-time OS must complete its tasks within the scheduled amount of time. Some popular embedded high-level and real-time OS’s are discussed in this article.

Linux, or commonly known as Embedded Linux, is the most popular and widely used operating system for embedded systems. This popularity of Linux in embedded systems community is primarily because of Linux being free and open source. This means no royalties or licensing fees, unlike the proprietary embedded operating systems. Linux is used by approximately 18% of embedded engineers. Help and support on Linux is available from a huge open source community.

Linux is not a real time operating system (RTOS) at its base but it offers some soft real-time capabilities. It can be made to function as a hard real-time OS by using one of at least two techniques. First technique is patching the Linux kernel, for example by using RTAI (Real-Time Application Interface). The second technique is using a real-time OS running Linux as the idle task, for example “RTLinux”. RTLinux extends the existing source to provide a framework that guarantees compliance with hard real-time requirements.

The other widely used embedded operating system is the Microsoft Windows CE which is a proprietary product and Microsoft licenses Windows CE to OEM’s (Original Equipment Manufacturers) and device makers. It is not directly based on the Windows for desktop PC’s. Windows CE also has a big user base and offers good embedded hardware and drivers support. Memory requirements by Windows CE are considerably low and this makes it suitable for devices with minimal storage. This is an advantage over Linux which implements comparatively larger memory footprint. Windows CE has built-in real-time operating system capabilities. Windows CE kernel implements “preemptive multitasking” to provide a guarantee that all applications will have a specific percentage of the CPU time.

Apart from all the embedded operating systems with or without the real-time capabilities discussed in this article, there exist some which are RTOS’s to their root. One of them is VxWorks by Wind River Systems (now owned by Intel) which is one of the most prominent and widely deployed embedded RTOS’s, especially designed for embedded systems. VxWorks comes with Integrated Development Environment (IDE), usually Wind River’s Workbench, and Board Support Package (BSP) or hardware specific code to speed up the application development process. VxWorks used to ran on top of real time kernels like VRTX (Versatile Real-Time Executive) and pSOS but now has its own kernel developed by the name “WIND”.

, , , , , ,

Leave a comment

System on Chip (SoC) Manufacturers – A Quick Overview

The global technology strive to converge most of any device’s functionality and hardware on a single chip. Some of the reasons for this are achieving smaller, lighter and energy efficient hardware and faster development speeds. When all or most of the components of a system are embedded or integrated into a single chip, the resulting product is a system-on-chip (SoC). SoC’s are used to simplify complex system designs, and have applications primarily in embedded systems due to the need for diminished size and high processing power and funcionality. Today’s SoC’s are capable enough to run software like Windows and Linux operating systems and some can even perform better than a decade old computer. Sometimes, specialized SoC’s are called by their application name like meter-on-chip and base station-on-chip. Few of SoC manufacturers are discussed here.

Texas Instruments (TI) is one of the top SoC manufacturers and is mostly ARM architecture focused. OMAP is a famous line of ARM based SoC’s from TI which is geared towards mobile multimedia applications and is divided into high performance, basic and integrated application processors. TI has developed different SoC’s for many different applications like data acquisition, media and telecommunication. TI’s analog-to-digital converter (ADC) front ends SoC’s are widely used for precision data acquisition and metering applications. For multimedia applications, OMAP4 line offers improved PowerVR SGX544 based graphic cores. TI is also working on introducing mobile carrier application SoC’s, called base station-on-chip, to improve performance of mobile communication hardware, covering smaller area usually termed as Microcells or Femtocells.

Freescale, another major SoC manufacturer, holds approximately 6,100 patent families. Freescale SoC’s are mostly targeted to communication applications. Many Freescale SoC’s are based on the “Power Architecture”, for example, Freescale’s e300, e500, e600 and e700 SoC’s. Other Power architecture based SoC family from Freescale is PowerQUICC for use in embedded networking equipment applications. Freescale has also introduced SoC’s for multimedia applications like the i.MX53 family based on ARM Cortex-A8 core. Like Texas Instruments, Freescale is also developing base station-on-chip SoC’s, named QorIQ Qonverge, for mobile carrier hardware and base station transceivers (BTS). Freescale has developed designs of meter-on-chip SoC’s for smart meter applications which integrate most of the smart meter functions into a single chip.

Marvell Technology Group is another company that develops SoC’s. One of their popular ARM based SoC line is “Orion” which has applications in networked storage. Marvell also produces award winning media processor SoC’s called ARMADA which is used in multimedia players, HD TV’s and set top boxes (STB). NXP (by Philips) is one of the largest semiconductor product manufacturers which also develops SoC’s. NXP SoC’s are targeted to energy, telecommunication and multimedia applications, for example, the EM773 and JN5148 SoC’s from NXP.

, , , , , , , , , ,

Leave a comment

AM3505 – TI’s sitara family microprocessor

AM3505 Overview

The AM3505 of Texas Instruments (TI) is a sister microprocessor of AM3517, both belonging to the Sitara family of ARM core based microprocessor units (MPU’s). Both AM3505 and AM3517 are similar except for the absence of an OpenGL graphics engine subsystem in AM3505 which is used for 3D graphics acceleration suitable for gaming applications. AM3505 and AM3517 were released by TI primarily to target industrial applications but both have also found good use in average consumer applications as well ranging from personal handheld multimedia & data management gadgets like smartphones, to large scale home & commercial automation solutions.

AM3505 block diagram (source: ti.com)

With power consumption of less than 1 milli Watt, AM3505 can be used in battery powered portable products. Like the AM3517, AM3505 is also based on the ARM Cortex A8 core which offers a considerable performance advantage over the ARM9 core which is used in other Sitara family MPU’s. This microprocessor is architecturally similar to the OMAP35xx application processors from TI except of the absence of a digital signal processor (DSP) module for HD (high definition) quality video processing. Despite the absence of a DSP, it  is capable of processing HD video signals but with limited functionality. As mentioned above, 3D graphics processing module is also absent in this microprocessor, hence unable to produce same quality effects and visuals as possible through AM3517. Apart from this, AM3505 offers many other video related processing features like multiple concurrent image manipulation which is commonly known as “picture in picture”. Although it may be a disadvantage for not providing a DSP and the graphics accelerator subsystem, it is affects the cost reduction of chip which is further decreased by the usage of DDR2 memory in this MPU. This might trade off this disadvantage in the eyes of some electrical engineers.

Due to its target market, AM 3505 comes with industry focused connectivity features like PHY (physical layer) functionality in USB On The Go (OTG), dual USB host, an advanced CAN controller and EMAC. Major requirements for devices with industry targeted applications are the ruggedness and endurance against temperature and mechanical extremes of an industrial environment, to which it complies. AM3505 has usage mostly in applications requiring video displays because of the presence of its vast array of video signal capture and output features, making it an appropriate choice for embedded systems requiring a HMI (Human Machine Interface) or information and entertainment video output. AM3505 offers lots of peripherals and connectivity interfaces some of which include different types of timers, multiple serial ports, interfaces for removable storage media like SD card, 186 general purpose input output (GPIO) pins for customized application circuitry, JTAG test interface, etc. All major high level and real time operating systems like Linux, Windows Embedded & CE and Android, are supported by the AM3505.

, , ,

Leave a comment

The Run for Android 4.0 Boards Continues with Variscite

After Pandaboard.org announcement of the release of Pandaboard ES board with Android 4.0 support, another major system on modules vendor Variscite is preparing to provide its own development board for Android 4.0 embedded development. The VAR-SOM-OM44, based on OMAP4460, shows strong capabilities of running Android 4.0 ICS smoothly:

Related Links:

, , ,

Leave a comment

Embedded Development Books

Embedded development books – overview and recommendations

Embedded systems come in all shapes and sizes with hardware platforms ranging from a discrete component or digital logic circuit to full scale, high performance microprocessors running advanced, high level operating systems. Development tools, both hardware and software, and programming languages for this large range of embedded systems are also equally vast. This is also the case with the learning material for embedded systems development, especially in the form of books. Here, in this article, only the books related to microprocessor based embedded systems are recommended and discussed, belonging to both aspects, that is the embedded system hardware and software.

Whatever the software or firmware, embedded system is nothing without the embedded hardware itself. “Designing Embedded Hardware” by John Catsoulis explains this topic. The book follows the common best practice (in the professional industry too) of using a readymade hardware or board architecture for initial development stage. A second similar book is “Embedded System Design: A Unified Hardware/Software Introduction” by Frank Vahid.

Software or firmware development books: Microprocessor based systems are usually developed with an operating system based firmware. Major OS’s include Microsoft Windows Embedded or CE and Linux (sometimes called Embedded Linux). Linux is mostly used because of it being free and open source. “Embedded Linux Primer – A Practical, Real-World Approach” by Christopher Hallinan. This is a very good book to get started. This book describes all the aspects of Linux for embedded systems like kernel development, device drivers and file systems. Being a general book, it doesn’t goes in depth of the described topics. “Building Embedded Linux Systems” by Karim Yaghmour provides similar level of information.

Kernel development is a very important part of porting an embedded operating system for the target application hardware. “Linux Kernel Development” by Robert Love provides this information in detail. “Linux Device Drivers”by Jonathan Corbet covers the second most important aspect of embedded Linux development, that is the creation of drivers for the hardware peripherals on the target board.

To start learning real time operating system (RTOS) concepts, “Real-Time Concepts for Embedded Systems”
by Qing Li and Caroline Yao is a good one. As the name suggests, real time operating systems must respond to events or complete their tasks in a very limited time. This books starts from the basics of operating systems (OS) and the difference between a normal (high level) and a real time OS, and takes it to the advanced level.

I hope that I covered that main aspects of embedded development industry. If you come across a worthy book – I’ll be happy to hear about it!

Leave a comment

Android 4.0 Development – The New Goodies

Android 4.0 (code name “Ice Cream Sandwich”) was officially launched on 19 October 2011 in Galaxy Nexus and Ice Cream Sandwich release event. Let’s go over the main features and improvement that this new version provides us as developers.

In developer’s point of view, the Android 4.0 brings many new features and capabilities and a lot of new APIs. Any Android 4.0 developer will agree on the point that this version has increased performance of applications dramatically. We start with the new connectivity feature Wi-Fi Direct. This allows developers to create applications for sharing data like photos or any other file without the need of wireless access point. This feature in particular enables game developers to add network gaming capability – again without the need of wireless access point.

The Android 4.0 brings a series of new social APIs. The most prominent include Android Beam, which is an exciting new feature which allows two NFC (Near Field Communication) enabled phones to start communication by just touching with each other. This allows developers to make applications to share small data in a new way. For large amount of data this type of connection can initiate Bluetooth connection. Second, is shared calendar content provider and framework API, which provides developers the possibility to use calendar services for their applications (and with the personalization of the various gadgets, this is quite useful).

In addition, the new release provides many new media capabilities, including direct and efficient path for low level streaming multimedia, new camera features like full resolution image capture while capturing video, and new ways of setting white balance and exposure. The support for many new media types and containers like VP8, HTTP Live streaming protocol version 3 and many more give application developer s a lot of flexibility and easiness in developing media related application .

When it comes to UI, Android 4.0 brings a new unified UI for phones, tablets and any Android powered device which was a demanding feature by developers, since it helps to maintain consisting design practices and easiness in code development process. Furthermore, this new UI gives a new layout called grid layout, which has proved to increase performance of applications. Similarly, a new texture view object lets developers directly integrate OpenGL ES textures as rendering targets in a UI hierarchy.

Android 4.0 offers an enhanced accessibility API specially designed for devices which have not hardware buttons. Using a text to speech API the developers can easily write text to speech engines. Earlier Android did not have text to speech API at framework level. This was also a demand by developers to develop text to speech conversion applications easily.

In conclusion, no doubt that Android 4.0 is a major improvement in comparison to the previous versions. This reflects the growth in the needs of the users, especially regarding connectivity and sharing and media handling. It will be interesting to see how the new generation of products and gadgets will look like with the Android ICS. Until then – it’s time to think and imagine how will Android 5.0 will look like!

Related Links:

, ,

Leave a comment