The Motorola/Freescale 68HC12 family includes a wide variety of
68HC12 and MC9S12 parts.
Features include
- A very nice instruction set that permits C compilers to generate
efficient code but also allows for pleasant assembly programming.
- Built-in debugging support via Background Debug Mode (BDM)
- On-chip Flash in most parts.
- Two or three hardware breakpoints in most parts.
Background Debug Mode (BDM)
Probably the best way to use NoICE with the 68HC12 is with Background
Debug Mode (BDM). This requires the use of a BDM pod, but allows in-circuit
debugging of programs in Flash with little or no interference to the user
program being debugged.
NoICE supports a variety of BDM pods
- Elektronikladen ComPOD12, available from
Elektronikladen (https://elmicro.com/compod12.html)
- P&E USB MULTILINK12, MULTILINK12, and CABLE12, available from
P&E Microcomputer Systems (https://pemicro.com)
- SofTec Microsystems inDART-HCS12 and PK-HCS12, available from
SofTec Microsystems (http://www.softecmicro.com)
- Technological Arts microBDM12SX, available from
Technological Arts (https://www.technologicalarts.ca)
- Kevin Ross BDM12, available from
Kevin Ross (http://www.kevinro.com/products.html)
- Daniel Malik's TBDML, plans available from
Free Geeks (http://www.freegeeks.net)
- Axiom AX-BDM12, available from
Axiom Manufacturing Company (https://www.axman.com)
Setup and use of BDM is described in a separate document.
AN2548 Monitor
If you can't use a BDM pod, similar features are provided by a Flash-resident
monitor program described in Freescale application note AN2548. This is a
popular option for schools and other applications where low cost is the
primary consideration. The only hardware requirement is an RS-232 serial port.
The AN2548 monitor occupies the top 4K of Flash, including the reset and
interrupt vectors. Thus, it has some impact on the memory organization and
operation of user programs. Please download and read the Freesacale application
note for details.
A chicken an egg detail: once the AN2548 monitor is burned into Flash,
NoICE can use it to burn user programs into the remaining Flash. But how
do you burn the AN2548 monitor into Flash? Your easy choices are to
either borrow a BDM pod or to buy a development board that already contains
the monitor.
Setup and use of the AN2548 monitor is
described in a separate document.
68HC12 Simulator
Instruction set simulation is quite straightforward. However, simulating
the UARTs, timers, and other peripherals found on current microprocessors is a
very complex task - at least if you want a good (i.e., useful) simulation.
The cycle-by-cycle operation of these peripherals is seldom publicly documented,
and anything less than a cycle-by-cycle simulation will mask problems which
occur in real systems.
NoICE's 68HC12 simulator provides simulation
of instruction execution and a "simulated UART" so that you can use printf etc.
The simulator does not do cycle-accurate simulation of a UART
or simulate other peripherals such as timers or interrupts.
That said, the simulator can be very useful in debugging algorithms and
becoming familiar with a processor without investing in any hardware.
More information here.
Legacy NoICE Monitor
Because the legacy monitor assumes that code is in RAM and cannot use hardware
breakpoints, we recommend that most people use BDM or AN2548.
However, the legacy NoICE monitor is
also available for the HC12.
|