Table of Contents

Advertisement

Quick Links

AVR8 Debugger

Release 02.2022
MANUAL

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AVR8 and is the answer not in the manual?

Questions and answers

Summary of Contents for Lauterbach AVR8

  • Page 1: Avr8 Debugger

    AVR8 Debugger Release 02.2022 MANUAL...
  • Page 2: Table Of Contents

    TRACE32 Documents ........................ ICD In-Circuit Debugger ........................  Processor Architecture Manuals .................... AVR8 ............................AVR8 Debugger ........................History ..........................Warning ..........................Introduction ........................Brief Overview of Documents for New Users Demo and Start-up Scripts Configuration ........................System Overview Quick Start .........................
  • Page 3 Set on-chip trigger to default state Connectors ........................Debug Connector Mechanical Description of the 10-pin Debug Cable Converter 10-pin JTAG to 6-pin SPI for AVR8 Converter 10-pin JTAG to 6-pin UPDI for AVR8 Converter 10-pin JTAG to 8-pin UPDI for AVR8 1989-2022 ©...
  • Page 4: History

    AVR8 Debugger Version 09-Mar-2022 History 30-Sep-20 Added descriptions for the commands SYStem.LOCK SYStem.MemAccess StopAndGo. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 5: Warning

    Switch the target power ON. Configure your debugger e.g. via a start-up script. Power down: Switch off the target power. Disconnect the debug cable from the target. Close the TRACE32 software. Power OFF the TRACE32 hardware. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 6: Introduction

    (the document you are reading at the moment) is CPU specific, while all other parts of the online help are generic for all CPUs supported by Lauterbach. So if there are questions related to the CPU, the Processor Architecture Manual should be your first choice.
  • Page 7: Demo And Start-Up Scripts

    You can now search the demo folder and its subdirectories for PRACTICE start-up scripts (*.cmm) and other demo software: You can also inspect the demo folder manually in the system directory of TRACE32. The ~~/demo/avr8/ folder contains: compiler/ Hardware independent compiler examples.
  • Page 8: Configuration

    Configuration System Overview Example configuration for an AVR8 debugger. PC or Workstation Target Debug Cable POWER DEBUG USB INTERFACE / USB 3 Cable POWER DEBUG INTERFACE / USB 3 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 9: Quick Start

    CPU stops executing any instruction, and the user is able to download and test the code. After this command is executed, it is possible to access memory and registers. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 10 Load the program into the flash.. DO ~~/demo/avr8/flash/atmegaxxx.cmm A typical start sequence of the AVR8 is shown below. This sequence can be written to a PRACTICE script file (*.cmm, ASCII format) and executed with the command <file>. ; Select the ICD device prompt RESet ;...
  • Page 11: Troubleshooting

    Invalid memory access No special event Internal error, please consult your size: <size> bytes (@ Lauterbach representative. address <address>) Memory access timeout: No special event Corrupted JTAG connection. Check Reading from address JTAG hardware and settings. <address> 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 12: Faq

    • The core has no clock. • The core is kept in reset. • There is a watchdog which needs to be deactivated. Please refer to our Frequently Asked Questions page on the Lauterbach website. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 13: Avr Specific Implementations

    Optionally, you can modify the Fuse and Lock Bits with the PER.Set.simple command as given below: SYStem.RESet SYStem.Up ;Setting the LockBits PER.Set.simple EE:0x200000 %Byte <8_bit_lock_bit_setting> ;Setting the FuseBits PER.Set.simple EE:0x100000 %Long <24_bit_fuse_bit_setting> SYStem.Down 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 14: Memory Classes

    To access a memory class, write the class in front of the address. For example, use D to access the data memory: Data.dump D:0x00 The memory class EE is used to denote the EEprom memory. Data.dump EE:0x00 The following examples return different results, since the megaAVR architecture uses the Harvard Architecture. Data.dump D:0x100 Data.dump P:0x100 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 15: Programming The On-Chip Flash Of The Megaavr

    The PRACTICE script for programming of the on-chip FLASH of the megaAVR can be found in the TRACE32 demo folder ~~/demo/avr8/flash/atmegaxxx.cmm. Please be aware that this is just an example script. The scripts has to be adapted to your memory layout, specifically the flash and EEprom sector size must be checked.
  • Page 16: Cpu Specific System Settings

    Informs the debugger about the position of the Test Access Ports (TAP) in the JTAG chain which the debugger needs to talk to in order to access the debug and trace facilities on the chip. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 17: System.config

    TDI signal and the core of interest. This is the sum of the instruction register lengths of all TAPs between the TDI signal of the debugger and the core of interest. See also Daisy-Chain Example. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 18 This is the state of the TAP controller when the debugger switches to tristate mode. All states of the JTAG TAP controller are selectable. (default: 7 = Select-DR-Scan) TCKLevel [0 | 1] Level of TCK signal when all debuggers are tristated. (default: 0) 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 19 In many cases, the number of TAPs equals the number of cores. But in many other cases, additional TAPs have to be taken into account; for example, the TAP of an FPGA or the TAP for boundary scan. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 20: System.config.debugporttype Select Debug Port Type

    Capture-IR Test-Logic-Reset SYStem.CONFIG.DEBUGPORTTYPE Select debug port type Format: SYStem.CONFIG.DEBUGPORTTYPE [<type>] <type>: JTAG | SPI | UPDI Specifies the used debug port type “JTAG” or “SPI”. It assumes the selected type is supported by the target. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 21: System.cpu Select The Used Cpu

    SYStem.CPU Select the used CPU Format: SYStem.CPU <cpu> <cpu>: ATMEGA1284 | ATMEGA64 | ATMEGA32 | … Default: UC3XXX. Selects the processor type. All of the ATMEGA MCU cores with JTAG port are supported. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 22: System.jtagclock

    If the system is locked, no access to the debug port will be performed by the debugger. While locked, the debug connector of the debugger is tristated. The main intention of the SYStem.LOCK command is to give debug access to another tool. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 23: System.memaccess

    Temporarily halts the core(s) to perform the memory access. Each stop takes some time depending on the speed of the JTAG port, the number of the assigned cores, and the operations that should be performed. For more information, see below. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 24: System.mode

    In this mode the target behaves as if the debugger is not connected. Resets the target and starts execution. Resets the target and stops the CPU at the reset vector. Attach Not available for AVR8. StandBy SYStem.Option.IMASKASM Disable interrupts while single stepping Format: SYStem.Option.IMASKASM [ON | OFF]...
  • Page 25: System.option.imaskhll Disable Interrupts While Hll Single Stepping

    If enabled, the interrupt enable flag of the EFLAGS register will be cleared during HLL single-step operations. After the single step, the interrupt enable flag is restored to the value it had before the step. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 26: Cpu Specific Tronchip Commands

    ; sets breakpoint at range Break.Set 0x1001--0x17ff /Write ; 1000--17ff sets single breakpoint … ; at address 1001 TrOnchip.CONVert OFF ; sets breakpoint at range Break.Set 0x1000--0x17ff /Write ; 1000--17ff Break.Set 0x1001--0x17ff /Write ; gives an error message 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 27: Tronchip.varconvert

    This is the default setting. Otherwise an error message is generated. TrOnchip.RESet Set on-chip trigger to default state Format: TrOnchip.RESet Sets the TrOnchip settings and trigger module to the default settings. 1989-2022 © Lauterbach AVR8 Debugger...
  • Page 28: Connectors

    This connector is defined by Atmel, and we recommend this connector for all future designs. Signal Signal RST- Converter 10-pin JTAG to 6-pin SPI for AVR8 The converter supports the Serial Peripheral Interface (SPI) as used by Microchip AVR128 devices. Signal Signal...
  • Page 29: Converter 10-Pin Jtag To 6-Pin Updi For Avr8

    Converter 10-pin JTAG to 6-pin UPDI for AVR8 The converter supports the Unified Program and Debug Interface (UPDI) as used by Microchip AVR128 devices. Signal UPDI Order-Code Description LA-2733 Converter 10-pin JTAG to 6-pin UPDI for AVR8 Converter 10-pin JTAG to 8-pin UPDI for AVR8 The converter supports the Unified Program and Debug Interface (UPDI) as used by Microchip AVR128 devices.

Table of Contents