You are here: Home DOCUMENTATION Adapt9S12D Using Your Adapt9S12D Microcontroller Module - Software Debugging

Technological Arts Inc.

Your Shopping Cart

Your Cart is currently empty.

Using Your Adapt9S12D Microcontroller Module - Software Debugging

Article Index
Using Your Adapt9S12D Microcontroller Module
Overview of features
Getting Started
Setup the hardware
Application Programming
Software Debugging
Software Considerations
Memory Map
Interrupts
Software Considerations - S12 Clock
Hardware Details
Appendix
All Pages

Software Debugging

Writing software is only the first part of the development process.  Next comes testing to verify the program functionality.  This requires not just running the application on the target system, but having a means of tracing what is happening should something not function as expected.  There are two methods of accessing the S12 processor to do debugging.  The first is by using the flash-resident Monitor (D-Bug12 or Serial Monitor, depending on the variant).  The second is the use of an external BDM pod.  Each method has value and which is used will depend on the needs of the development process and the available budget.

Serial Monitor

The serial monitor preprogrammed into Adapt9S12DP512S and Adapt9S12DG128S variants is described in detail in Freescale document AN2548.  It provides a means to assist in debugging S12 code, among other capabilities.  However the serial monitor by itself can not do anything.  It is designed to work with an external program that communicates with it.  This can be uBug12, CodeWarrior, or noICE12

Because of this, the serial monitor has a requirement that an SCI port must be dedicated to its use.  Therefore if you use the serial monitor as part of your troubleshooting process, that SCI port can not be used by your application program.  The serial monitor uses the SCI0 port on the board, so you are free to use SCI1 for your application, if needed.

The AN2548 document is available at: http://www.freescale.com/files/microcontrollers/doc/app_note/AN2548.pdf?fsrch=1

uBug12

Technological Arts provides a Windows based program called uBug12 as a means of interfacing with the serial monitor in Flash.  The program enables the user to manage the use of Flash memory, as well as provide standard troubleshooting capabilities such as examination and modification of both CPU registers and memory locations.  A separate document on the Technological Arts website describes the installation, functionality, and operation of uBug12.

BDM Pods

MicroBDM12LX5:
This pod is based on a 9S12DG128 MCU running Freescale's D-Bug12 Monitor in Pod Mode.  Refer to the D-Bug12 Reference Guide for details on what its capabilities and limitations are, and how to use it.  D-Bug12 is not supported as a debug interface in CodeWarrior.  It can be used as a standalone debug interface with any terminal program.  It is also supported by the NoICE12 debugger (see below).

USBDMLT:
This pod is based on the open-source OSBDM project on the Freescale Community Projects board, and is supported as a Debug tool in CodeWarrior (select TBDML).  It comes with a DLL for CodeWarrior that needs to be installed first, however.  Check the Resources tab of the USBDMLT product web page for details and links to the files and documentation.  A small standalone Windows application called HCS12_Flash is also provided, which enables loading s-record files into virtually any HC12, S12, and S12X target.

noICE12:
This is a Windows-based source-level debugger for HC12, S12, and S12X targets, with support for Serial Monitor, D-Bug12-based pods, and the USBDMLT.

URL is: http://www.noicedebugger.com/

 



Last Updated ( Wednesday, 17 April 2019 11:53 )