AN2302 Freescale Semiconductor / Motorola, AN2302 Datasheet - Page 35

no-image

AN2302

Manufacturer Part Number
AN2302
Description
EEPROM Emulation for the MC9S12C32
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Debugging Tips
MOTOROLA
When debugging the examples, the users final application, or any other code
that writes to Flash, it is essential that the debugger does not attempt to effect
a breakpoint by attempting to write a SWI instruction to a Flash address. The
write to Flash by the debugger is interpreted as the beginning of a Flash
programming sequence by the Flash state machine, leading to a Flash access
error when the Flash programming routine is executed.
When using the Metrowerks HI-WAVE debugger, SWI breakpoints are
prevented by setting the debugger option:
HWBREAKONLY ON
This may be done on the debugger command line, or within the startup.cmd file.
When set to ON, this option prevents the debugger from attempting to write the
SWI instruction to effect a breakpoint. Instead, the hardware breakpoint module
is used exclusively.
A current limitation of the Metrowerks HI-WAVE debugger is that it is only able
to load symbols from a single ELF executable file at a time.
In order to debug the code in the ROM library, the following steps must be
followed:
When returning to the main application, repeat the above process to re-load the
symbol table for the main application again.
Freescale Semiconductor, Inc.
For More Information On This Product,
Delete all commands from the preload.cmd and postload.cmd files.
Put a breakpoint on the call to the ROM library function,
Make a single step to enter into the ROM library code. The assembly
window should display some code, but the Source and Data 1 window
will be empty.
In the Target menu select Load.
In the "Load Executable File" dialog, browse for the ROM library
executable file and make sure the "Load Symbol Only" radio button is
checked.
Click on "Open". The symbolic information from the ROM library should
be loaded into the debugger and you should be able to debug your ROM
library.
EEPROM Emulation for the MC9S12C32
Go to: www.freescale.com
Example Project
AN2302/D
35

Related parts for AN2302