Hardware Reference
In-Depth Information
The CodeWarrior from Freescale is an IDE that consists of a text editor, an assembler, a linker,
a C compiler, a project manager, a simulator, device drivers, and a source-level debugger. Both
the MiniIDE and CodeWarrior will be used in this text for developing and testing programs. The
AsmIDE written by Eric Engler is similar to MiniIDE in function.
3.2.2 Hardware Development Tools
For learning a microcontroller, the most important hardware tool is the microcontroller
demo board. Tools such as function generators and oscilloscopes will be helpful for testing a
user's program. Hardware tools such as in-circuit emulators and logic analyzers will be very
useful in helping users in debugging their software. However, these are expensive debugging
tools and hence we will not discuss them in this text.
The background debug module (BDM) of the HCS12 microcontroller allows the user to
trace instruction execution on the target hardware (a HCS12 microcontroller) from a PC or
another HCS12-based demo board running appropriate software. When performing debug activi-
ties in the BDM mode, the PC or the host HCS12 communicates with the target HCS12 via the
BDM serial interface. This approach allows debug activities to be performed less intrusively.
3.2.3 Types of HCS12 Demo Boards
On the basis of the supporting debug environment, a demo board can be classified into the
following three categories:
D EMO B OARD WITH THE D-B UG 12 M ONITOR
An HCS12 demo board may have its microcontroller programmed with the D-Bug12 moni-
tor to support debug activities. The D-Bug12 monitor occupies the flash memory and supports
a set of debug commands. The user can use these commands to display and modify register
and memory contents, set breakpoints at certain memory locations (breakpoints can only be
set in SRAM), step through the program, and download the program onto the demo board for
execution. Using this approach, the user can only download his or her program onto the on-chip
SRAM of the HCS12. For learning assembly language programs, this type of demo board pro-
vides a simple environment for testing and debugging user programs. Both the MiniIDE and the
AsmIDE may work with this type of demo board.
D EMO B OARD WITH THE S ERIAL M ONITOR
An HCS12 demo board may also choose to have its microcontroller programmed with the
serial monitor from Freescale. The serial monitor occupies 2 kB of flash memory and allows
the user program to employ the remaining memory space. The CodeWarrior IDE from Freescale
may communicate with the serial monitor and allow the user to carry out all debug activities.
D EMO B OARD WITH THE BDM A DAPTOR
This type of demo board relies on the HCS12 background debug module to carry out debug
activities. The user runs an appropriate program on the PC to communicate with the HCS12
via a BDM adaptor to perform debug activities. The BDM adaptor may be a separate hardware
kit or a part of the demo board. There is a public domain BDM-based debugging interface called
Turbo BDM Light ( TBDML ) that every user can add to her or his demo board or make into a
separate debug adaptor. The TBDML is supported by the CodeWarrior IDE and provides a nice
debugging environment. CodeWarrior also supports a few other BDM adaptors including P&E
micro's BDM adaptor. To use this approach to debug programs, the demo board must have a
BDM interface circuit.
 
Search WWH ::




Custom Search