Cross Compilations247
8.3.2Is the Target System Real-Time.
If the target system is running a real-time operating system, you have to keep in mind
many other issues as well. Usually these issues don’t come into the picture when you are devel-
oping code for general-purpose machines. System scheduling is important and you need to know
what type of scheduling is available on the target system. Almost all real-time systems have pri-
ority-based scheduling. However, if two processes have the same priority, then scheduling may
be different depending upon the operating system. Some systems implement round-robin sched-
uling for equal priority tasks. On the other hand some systems run a task to completion. You
need to know what happens when a process or task is scheduled on a particular real-time sched-
uler. Time slices for running equal priority processes on round-robin schedulers can also be
changed on some real-time schedulers.
To complicate the situation, some systems also allow processes to increase or decrease
their priority levels at run time.
Interrupts and their service routine are usually critical in real-time systems. If your embed-
ded target platform is real-time, you should keep in mind limitations in this area and tolerance of
critical tasks in constrained environment. You should not miss a critical event in a real-time sys-
tem because that may result in disaster. If a packet is dropped in a router, it may be tolerated, but
if a robot reacts to some event late, it may result in major loss. Even dropped packets aren't par-
ticularly acceptable in modern routers.
8.3.3Testing Methodology
The testing methodology is also different in the case of embedded systems. In typical
cases, an embedded system is connected to some other device or system for control purposes.
These connections are not available on the host system where you are developing the software.
This is true even if the operating system and CPU on the host and target systems are the same.
For example, a Linux-based embedded system running an x86 family of processors may be con-
trolling some security system. It is difficult to simulate that security system on a PC and test
your software. So even if the platform is the same, you have to test and debug your programs on
the target system.
In some cases testing of embedded systems may be quite complicated as you need to get
results of the functionality testing sent or stored somewhere. In small embedded systems, not
connected to a network or a user-friendly output device, getting these results is difficult. In such
circumstances you may need to build special testing techniques or special code in your embed-
ded system to produce test results. I would recommend a thorough knowledge of how to write
testable code.
8.4Cross Compilations
Cross compilation tools are very important for successful product development. Selection of
these tools should be made based upon the embedded system itself as well as features to test and
debug software remotely. Since you are developing software on a Linux platform, your cross-
Next Page >>
<< Previous Page
Back to the Table of Contents