Debug Object File in Atmel Studio

Introduction

Debug session requires you to load an object file which is supported by Atmel Studio. The debug file contains symbolic information for debugging.

Atmel Studio Supported Debug Formats

Table 1. Object File Formats Supported by Atmel Studio

Object File Format

Extension

Description

UBROF

.d90

UBROF is an IAR proprietary format. The debug output file contains a complete set of debug information and symbols to support all types of watches. UBROF8 and earlier versions are supported. This is the default output format of IAR EW 2.29 and earlier versions. See below how to force IAR EW 3.10 and later versions to generate UBROF8.

ELF/DWARF

.elf

ELF/DWARF debug information is an open standard. The debug format supports a complete set of debug information and symbols to support all types of watches. The version of the format read by Atmel Studio is DWARF2. AVR-GCC versions configured for DWARF2 output can generate this format.

AVRCOFF

.cof

COFF is an open standard intended for 3rd party vendors creating extensions or tools supported by the Atmel Studio.

AVR Assembler format

.obj

The AVR assembler output file format contains source file info for source stepping. It is a Microchip internal format only. The .map file is automatically parsed to get some watch information.

Before debugging, make sure you have set up your compiler/assembler to generate a debug file like one of the formats above. 3rd party compiler vendors should output the ELF/DWARF object file format.

Opening Object File for Debugging

Steps to create an Object Project

  • On the File menu, click Open, and then click Open Object File For Debugging.

    Open Object File For Debugging wizard will appear.



    • In the Select the object file to debug, select your object file to debug. The object file must be supported by Atmel Studio.

    • In the Project Name, type a name for the project. Atmel Studio will suggest a name, which you can override if wanted.

    • In the Location, select a save location. Atmel Studio will suggest a name, which you can override if wanted.

    • Maintain Folder Hierarchy for Source Files option is selected by default which would create a similar folder structure in the Solution Explorer as that of the source project i.e. the project used to create the object file. Otherwise, all the files are added to the root folder of the project file i.e. the user would not see any folder in the Solution Explorer.

    • Add File As Link option is selected by default in which the object project shall refer the files from its original location without a local copy into the project directory. If the option is not selected, Atmel Studio would copy the files into the object project directory.



  • Click Next. The Device Selection dialog will appear.

    • Choose the appropriate target device. The target device should be the same, which was originally chosen to create the object file.



  • Click Finish. The object project files re-mapper appears (see screen-shot below). This dialog enables you to remap the location of the project files.

    If the user resolves the parent folder for any original file, all other files in the subsequent directory will be remapped recursively. So, it is useful for the user to remap the number of files by just remapping only one.



  • Now the Object Project is Created. The files that are not remapped properly are shown in solution explorer like 'libgcc.S', with a warning sign. Press F5 to debug this Project.