Keil Logo

µVISION DEBUGGER: Debug configuration via ini file vs dbgconf file

Information in this knowledgebase article applies to:

  • MDK


I can see two files used configure trace and other debug settings, the debug initialization (.ini) file and the .dbgconf file (AKA Debug Description). What is the difference?


A simple answer is, some device packs, but not all, contain a dbgconf file. This file has the same function as the debug initialization file, but makes the register assignments more device agnostic.

dbgconf File

This file essentially replaces the debug initialization file and is recommended to be used if available. It also allows the debugger to be configured via a Configuration Wizard instead of hand coding. To open this file for editing:

  1. Go to Options For Target -> Debug tab -> right side Settings button -> Pack tab
  2. Check Enable
  3. Click Edit
  4. The dbgconf file appears in the editor.
  5. Click the Configuration Wizard tab at the bottom of the editor.

Here you can configure the Trace/SWO pins and debugger behavior via check boxes and drop downs. These dynamically change the appropriate registers for the desired configuration. You can see this in action by switching back to the Text Editor tab and observing the changes in register assignments (values below the lines preceded with "//").

Debug Initialization File

The debug initialization file is a plain text file that manually sets the associated register values as a function that's called on reset. An example of setting up the trace pins with this kind of file is:

 // LPC177x_8x_TP.ini

FUNC void DebugSetup (void) {
  _WDWORD(0x4002C108, 0x00000005);  // P2_2 TraceData3
  _WDWORD(0x4002C10C, 0x00000005);  // P2_3 TraceData2
  _WDWORD(0x4002C110, 0x00000005);  // P2_4 TraceData1
  _WDWORD(0x4002C114, 0x00000005);  // P2_5 TraceData0
  _WDWORD(0x4002C118, 0x00000005);  // P2_5 TraceCLK

FUNC void OnRestExec (void){


A debug initialization file may still be preferable to a dbgconf file in the case where the dbgconf file does not provide the options you require, such as On Stop After Reset and other user commands. This could be initializing external memory, a peripheral, or using debug commands. Also, debgconf may not be compatible with non-ulink devices, such as J-Link. You can also make these work with the Configuration Wizard by including 

 //*** <<< Use Configuration Wizard in Context Menu >>> ***

at the beginning of the file, and

 //*** <<< end of configuration section >>>    ***

at the end of the file.


Last Reviewed: Wednesday, May 29, 2019

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.