Procedures for Building an Embedded System
Developing an embedded system with an ARM9 development board is pratically complicated, especially for new engineers, it always takes long time for them to become familiar with the developing procedures. Luckily, some experienced engineers (Chi-Hung Chou, Tsung-Hsien Yang, Shih-Chiang Tsao and Ying-Dar Lin in Embedded) introduced us a standard operating procedure, which might greatly help us with saving the costs of building an embedded system.
The standard operating procedure involves five steps:
2.Setting up the development platform
3.Getting the required packages
4.Integrating the packages into your embedded system
5.Testing your embedded system
In this article we are going to introduce these five steps one by one.
1. Selecting a target platform that enclosing all necessary hardwares (development board, emulator) and softwares (including the bootloader, root filesystem, and kernel). Each of them must be selected carefully for the reason that they might be not compatible with each other, in other words, we have to make sure that the hardware and software you selected would work together. For instance, an operating system that requires MMU may fail to collaborate with MMU-supported processors, so long as we have gotten a MMU-less processor, we should select an operating system that does not require MMU.
2. Setting up development platform. In consideration of its small RAM and slow CPU, a development board is not totally qualified for development. Therefore a development platform with a faster CPU and larger RAM is still needed. In additon, since the hardware architectures of these two platforms are different with each other, a cross-compiler environment is also needed. Building such an environment would be not so daunting since we have Buildroot. In fact, Buildroot provides a list of useful packages, such as iproute2, freeswan and squid.
4. Integrating the packages. Integrating here means using a cross-compiler to compile the source code into object code that can be executed in the target platform and adding them into the root filesystem. Again the Buildroot can be used. You can employ any one of the three methods below to add packages into the root filesystem.
Method 1: to select the packages from the options in Buildroot
Method 2: if the packages are not listed in the Buildroot, while you do not feel like to write a Makefile for the package and modify the config.in file of Buildroot, you can simply place the compiled packages in the directory ‟buildroot packages/customize/source‟ and then rebuild the Buildroot, Buildroot will copy the packages into the root filesystem during the building procedure.
Method 3: mount the root filesystem on any one directory and then copy the compiled packages into the directory. Then unmount the directory and you will get an updated root image.
5. Testing your system. The basic way is to download the root filesystem into the target platform and then execute the package, however this usually takes a long time. Another method is to test in a virtual machine, such as QEMU and VMware.