|
PART
2: Emulator and EPROM Basics
by George
Martin
Start ı Making
The Choice ı Getting The Debugger Going
ı Putting It All Together ı Sources
and PDF
MAKING THE CHOICE
Before I select an emulation plan, I
want to look into the CPU a bit more. First, Iım going to assume the
CPU is in a surface-mount package, which I think is reasonable. Because
there are 250ı400 pins, finding a connector that lets me remove the
CPU and plug in an emulator will be difficult at best.
Second, Iım assuming that Iıve selected
a highly integrated device. If I apply power and a clock, all I need
is memory and an LED or serial port to determine activity. The CPU
is permanently attached to the board and, with power and a clock,
itıs going to run.
Given these assumptions, I think an EPROM
emulator is a good choice for my embedded ı486 project. The development
plan: write code, transfer it to the EPROM emulator, and reset the
CPU using the EPROM emulator. The unit should then run the code I
loaded.
LAYING OUT THE TOOLS
Now that some of the peripheral issues
are covered let me look more closely at the CPU. I found two classes
of devicesıthose intended for desktop or laptop systems and those
intended for a more minimal existence. If you need desktop or laptop
characteristics, then use the first type of CPU.
Iım focusing on the second group. I need
to consider floating-point support (FPU), L1 and L2 cache, the bus
interface, and speed. Iım going to use the AMD ELAN series of embedded
devices, which consists of the SC300, SC400, and the just- announced
SC500. These devices incorporate a lot, and I mean a lot, of the support
circuitry from the desktop design into the more minimal, embedded
CPU.
The SC300 family is a ı386 machine, the
SC400 is a ı486, and the SC500 matches the Pentium. Each device uses
different supports, which are built into the chip. For example, serial,
parallel, DMA, keyboard, and LCD controller are built into these devices.
Others have a FPU and PCI bus interface. Check AMDıs web site for
a more complete overview (www.amd.com/products/lpd/32bitcont.html).
You can get a list of their evaluation boards at www.amd.com/products/lpd/prodsupp/20071.html.
And, vendor support is available at www.directories.mfi.com/embedded/amd-e86/.
Keep in mind that if you select a different device for your project,
most of the vendors and their products are applicable in some form.
The Elan family ranges from ı386 to ı486
without FPU and to ı586 with FPU. Clock speeds range from 25 to 133
MHz, and interfaces range from simple I/O to PCI support. I think
you should be able to find a solution that fits your price/performance
requirements.
In the web pages for the AMD (and other)
CPUs, thereıs a list of development tools such as development boards,
compilers, and emulators. I recommend finding a development board
thatıs close to your design, so you can use that as the basis for
your schematics and software development.
For language tools, I know I need an
assembler and a C compiler. As a ı486 machine, I could theoretically
use anything that runs on the desktop. Iım a big fan of Borlandıs
Turbo C V.3.0 (DOS), which I use to write C code that I can debug
in the PC and then compile for the target machine. Of course, you
could use Microsoft Visual C++ or a host of others. Keep in mind that
these compilers are 16 bit. If youıre wanting to work with protected
mode, tune in next month.
A vendor that I have used in the past and
one which works well with the Borland set of tools is Paradigm (www.devtools.com).
Paradigm has taken Borlandıs compiler and wrapped it into an integrated
environment that does the usual editing and compiling, while also
offering downloading and emulation through its Remote Debug Utility.
If I have a CPU running PDREM, then I can load code, single step,
insert breakpoints, and examine variables. Itıs been around for years
and is a stable product.
Now, for the last piece of the puzzle.
Because I donıt want to burn EPROMs to transfer and test the code,
the obvious solution is an EPROM emulator. Some of my customers have
used these in the past and reported good results. I tried a couple
of years ago without much luck (I always suspected it was my fault).
To successfully embed a CPU as complicated as a ı486, I need an emulator
or the combination of a remote debug and EPROM emulator. Again, there
are several manufactures, but the one I selected was Grammar Engineıs
Prom Ice (www.gei.com).
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ıCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |