Hardware Reference
In-Depth Information
Alternatively, if an optional, normally open switch is wired to the XIRQ pin, pressing it gen-
erates an XIRQ interrupt and causes the running program to halt execution and return control
back to D-Bug12 where the CPU register contents are displayed. The Dragon12-Plus demo
board implements this option by providing the abort switch.
As with all ROM-based monitors, D-Bug12 utilizes some of the on-chip resources to per-
form its debugging functions. The D-Bug12's memory maps when running on 256-kB and 128-kB
devices are detailed in Table 3.2. For the HCS12 devices with 256-kB flash memory, there are
11 kB of SRAM available for the development of application programs. For devices with 128-kB
flash memory, only 7 kB is available for program development. The current implementation
of D-Bug12 does not allow any of the on-chip flash memory to be utilized by application code
when running in EVB mode.
Note that even though the HCS12Dx256 parts contain 4 kB of EEPROM, only the upper
3 kB are visible, as the lower 1 kB is overlaid with the I/O registers. Table 3.2 shows only
the 64-kB memory map. Most of the D-Bug12 code occupies the on-chip paged flash memory
beginning on page $38.
Address Range
Description
Address Range
Description
$0000 , $03FF
$0400 , $0FFF
$1000 , $3BFF
$3C00 , $3FFF
$4000 , $EE7F
$EE80 , $EEBF
$EEC0 , $EEFF
$EF00 , $EF8B
$EF8C , $EFFF
$F000 , $FFFF
I/O registers
On-chip EEPROM
On-chip SRAM (available to user)
On-chip SRAM (D-Bug12)
D-Bug12 code
User-accessible function table
Customization data
D-Bug12 startup code
Secondary reset/interrupt table
Bootloader
$0000 , $03FF
$0800 , $0FFF
$2000 , $3BFF
$3C00 , $3FFF
$4000 , $EE7F
$EE80 , $EEBF
$EEC0 , $EEFF
$EF00 , $EF8B
$EF8C , $EFFF
$F000 , $FFFF
I/O registers
On-chip EEPROM
On-chip SRAM (available to user)
On-chip SRAM (D-Bug12)
D-Bug12 code
User accessible function table
Customization data
D-Bug12 startup code
Secondary reset/interrupt table
Bootloader
Table 3.2a D-Bug12 memory map for HCS12Dx256
Table 3.2b D-Bug12 memory map for HCS12Dx128
D-Bug12 supports a set of commands that can be used for program development on the
demo board. A summary of the command set is given in Table 3.3. One can request the D-Bug12
monitor to show the complete command set by typing help at the D-Bug12 monitor prompt.
3.5 Using a Demo Board with the D-Bug12 Monitor
We need at least the following software programs in order to develop assembly programs to
be downloaded onto a demo board for execution:
1. A text editor
2. An HCS12 cross assembler
3. A terminal program
We prefer using an IDE program in developing assembly programs. Both the AsmIDE by Eric
Engler and the MiniIDE from Mgtek are well-designed IDEs for developing assembly programs for
the HCS12 and 68HC11 microcontrollers. These two freeware IDEs allow us to enter, assemble,
 
Search WWH ::




Custom Search