Page 151 - Embedded Microprocessor Systems Real World Design
P. 151
High-level languages are also important if there is a possibility that a future
version of the product may use a different microprocessor or if there is a chance
the processor selection will change during the design process. While many designs
will use processor-specific functions in whatever language they are written in, a
complex design is much easier to port to another processor if it is written in an
HLL.
I will not attempt to recommend the best HLL for your application. Every
software engineer has a preference. What I will do is list some things that should
be considered in the decision.
Processors Supported
C has become almost a universal language, available for nearly any microprocessor.
Ctk is not currently available for small microcontrollers, although it is popular
for microprocessor-based designs. As processor speeds increase, Java will increase
in popularity for systems that can afford the CPU performance and memory
requirements.
As I already mentioned, be aware that HLL versions for microcontrollers may
not support the full language. Some things that are normal for an HLL on your
desktop computer are just not possible with 128 bytes of RAM. Also, be sure that
the compiler supports the version of the processor you use. An extreme example
in which this could be a problem is if you are developing code for a Pentium-class
processor with a compiler that generates only 8086 code. You would be unable to
take advantage of the added features in the Pentium CPU.
Emulator Support
Most current emulators, instead of displaying hex addresses, can display labels from
the source code (called source-level debug). Instead of single-stepping through one
machine instruction at a time, you can step through one C (or whatever) instruc-
tion at a time. You can even step through entire functions as if they were a single
statement. You can set breakpoints the same way. This can reduce debug time enor-
mously. However, the emulator software must have a table of addresses versus labels.
Be sure your language and emulator are compatible. This process is simplified
somewhat by the emergence of standard file formats for this data, such as UBROF.
However, the emulator needs to handle whatever file format the compiler produces
if you want to do source-level debug. Ideally, you want the debugger to display the
data in the correct format, recognizing &bit character variables, integers, and other
data types.
CoddStorage Size
Some compilers are extremely inefficient in their use of PROM and RAM resources.
Be sure the compiler will not require enormous increases in hardware cost to
132 Embedded Micr@ocessor Systems