- Embedded Systems Architecture
- Daniele Lacamera
- 511字
- 2021-06-25 21:54:58
Understanding the challenge
Approaching embedded development means keeping the focus on the specifications as well as the hardware restrictions at all times. Embedded software development is a constant challenge to focus on the most efficient way to perform a set of specific tasks, but keeping in strong consideration the limited resources available. There are a number of compromises to deal with, which are uncommon in other environments. Here are some examples:
- There might be not enough space in the flash to implement a new feature
- There might not be enough RAM to store complex structures or make copies of large data buffers
- The processor might be not fast enough to accomplish all the required calculations and data processing in due time
- Battery-powered and resources-harvesting devices might require lower energy consumption to meet lifetime expectations
Moreover, PC and mobile operating systems make large use of the MMU, a component of the processor that allows runtime translations between physical and virtual addresses. The MMU is a necessary abstraction to implement address space separation among the tasks, and between the tasks and the kernel itself. Embedded microcontrollers do not have an MMU, and usually lack the amount of non-volatile memory required to store kernel, applications, and libraries. For this reason, embedded systems are often running in a single task, with a main loop performing all the data processing and communication in a specific order. Some devices can run embedded operating systems, which are far less complex than their PC counterparts.
Application developers often see the underlying system as a commodity, while embedded development often means that the entire system has to be implemented from scratch, from the boot procedure up to the application logic. In an embedded environment, the various software components are more closely related to each other, because of the lack of more complex abstractions, such as memory separations between the processes and the operating system kernel. A developer approaching embedded systems for the first time might find testing and debugging on some of the systems a bit more intricate than just running the software and reading out the results. This becomes especially true on those systems that have been designed with little or no human interaction interfaces.
A successful approach requires a healthy workflow, which includes well-defined test cases, a list of key performance indicators coming from the analysis of the specifications to identify possibilities of trade-offs, a number of tools and procedures at hand to perform all the needed measurements, and a well-established and efficient prototyping phase.
In this context, security deserves some special consideration. As usual, when writing code at the system level, it is wise to keep in mind the system-wide consequences of possible faults. Most embedded application code run with extended privileges on the hardware, and a single task misbehaving can affect the stability and the integrity of the entire firmware. As we will see, some platforms offer specific memory-protection mechanisms and built-in privilege separation, which are useful for building fail-safe systems even in the absence of a full operating system based on separating process address spaces.
- Modern Web Testing with TestCafe
- 構建高可用Linux服務器(第4版)
- 從零開始寫Linux內核:一書學透核心原理與實現
- 大學計算機應用基礎實踐教程(Windows 7+Office 2013)
- Learning Android Intents
- FreeRTOS實時內核應用指南
- 精解Windows8
- 網絡操作系統管理與應用(第三版)
- Linux自動化運維:Shell與Ansible(微課版)
- Linux基礎使用與案例
- Python UNIX和Linux系統管理指南
- 跟老男孩學Linux運維:Shell編程實戰
- 鴻蒙HarmonyOS手機應用開發實戰
- Azure Resource Manager Templates Quick Start Guide
- Implementing Domain-Specific Languages with Xtext and Xtend(Second Edition)