TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... Z80... Z80 Monitor... 1

Similar documents
TRACE32 Documents... TRACE32 Instruction Set Simulators... Simulator for Z TRACE32 Simulator License Quick Start of the Simulator...

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... NS NS32000 Monitor... 1

H8S and H8/300H Monitor

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... TriCore... TriCore Monitor... 1

Simulator for H8/300, H8/300H and H8S

Simulator for HC08/MSC08

x386 and x486 Monitor

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... MCS08... MCS08 Debugger... 1

ICE Emulator for 68000

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... Blackfin... Blackfin Debugger General Note...

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... XC XC800 Debugger... 1

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... H8S... H8S/23x9 Debugger General Note... 3

Simulator for TriCore

TRACE32 Documents... TRACE32 Instruction Set Simulators... Simulator for MIPS TRACE32 Simulator License Quick Start of the Simulator...

M32R Debugger and Trace

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals XC... R8051XC Debugger General Note...

ICE Emulator for 68HC05 and 68HC08

ICE Emulator for Hitachi H8/300 and H8/500

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... MMDSP... MMDSP Debugger General Note... 3

Simulator for 68K/ColdFire

Integration for CodeWright

TRACE32 Documents... TRACE32 Instruction Set Simulators... Simulator for ARC... 1

Simulator for PowerPC

ICE Emulator for 8051

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... M8051EW... M8051EW Debugger General Note...

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... C166 Family... C166 Family Trace... 1

EPROM/FLASH Simulator

RTOS Debugger for CMX

RTOS Debugger for OS-9

RTOS Debugger for RTX-ARM

OS Awareness Manual Sciopta

NEW CEIBO DEBUGGER. Menus and Commands

RTOS Debugger for RTX51 tiny

Chapter 3. Z80 Instructions & Assembly Language. Von Neumann Architecture. Memory. instructions. program. data

ICE/FIRE Analyzer Programming Dialog

Simulator for HC12/MCS12

TRACE32 Debugger Getting Started... ICD Tutorial About the Tutorial... 2

RTOS Debugger for ChibiOS/RT

TRACE32 Getting Started... ICD In-Circuit Debugger Getting Started... ICD Introduction... 1

USER MANUAL NATHANIEL THWAITES-MCGOWAN

E3940 Microprocessor Systems Laboratory. Introduction to the Z80

Training Simulator and Demo Software

RTOS Debugger for FreeRTOS

RTOS Debugger for Linux - Run Mode

RTOS Debugger for MicroC/OS-III

RTOS Debugger for ThreadX

Small Computer Monitor User Guide

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... MCS12... MCS12 Debugger... 1

Small Computer Monitor User Guide

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... ZSP... ZSP Debugger... 1

Native Process Debugger

Experiment N o 1. 1 Introduction to Assembly Language Programming

FIRE Emulator for H8S and H8/300H

OS Awareness Manual OSEK/ORTI

OS Awareness Manual OSE Epsilon

_ V Intel 8085 Family In-Circuit Emulation. Contents. Technical Notes

RTOS Debugger for MicroC/OS-II

Application Note 112 version 1.1 Installing a User program in EPROM on the Intel 8x930 4 Port USB Evaluation Board

CROSSWARE 7 V8051NT Virtual Workshop for Windows. q Significantly reduces software development timescales

Hypervisor Awareness for Wind River Hypervisor

NEC 78K0- Family On-Chip Emulation

1 Do not confuse the MPU with the Nios II memory management unit (MMU). The MPU does not provide memory mapping or management.

RTOS Debugger for QNX - Run Mode

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

Application Note Debug Cable XC800

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

H8 C-SPY. User Guide WINDOWS WORKBENCH VERSION

SKP16C26 Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

6 THE ETRAX Introduction. Special registers. 6 The ETRAX 4

RTOS Debugger for MQX

Application Note Debug Cable C166

EXPERIMENT NUMBER 5 Creating a Single Chip Memory Space for the 8051

CP/M-86 Compatibility Guide For CP/M-80 Users

ARM-ETM Programming Dialog

CodeWarrior U-Boot Debugging

DoCD IP Core. DCD on Chip Debug System v. 6.02

CHAPTER 2 SETUP AND INSTALLATION

Changing the Embedded World TM. Module 3: Getting Started Debugging

History and Basic Processor Architecture

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013)

April 4, 2001: Debugging Your C24x DSP Design Using Code Composer Studio Real-Time Monitor

OS Awareness Manual OSE Delta

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

C86 80C88 DS-186

Run Mode Debugging Manual Symbian

ICE Emulator for 68HC11

IAR EWARM Quick Start for. Holtek s HT32 Series Microcontrollers

Lecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers.

Evaluation Board. For NXP - Philips LPC All rights reserved

HCS12 BDM Getting Started V4.3

Digital IP Cell 8-bit Microcontroller PE80

Note that FLIP is an Atmel program supplied by Crossware with Atmel s permission.

UMBC. contain new IP while 4th and 5th bytes contain CS. CALL BX and CALL [BX] versions also exist. contain displacement added to IP.

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

M16C R8C PC7501 Emulator Debugger V Release Notes

1. Attempt any three of the following: 15

M16C/62P QSK QSK62P Plus Tutorial 1. Software Development Process using HEW4

Megawin 8051 OCD ICE

DS-XA In-Circuit Emulator

Embedded Systems Programming

Transcription:

Z80 Monitor TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... Z80... Z80 Monitor... 1 Brief Overview of Documents for New Users... 3 Warning... 5 Quick Start of the Z80 ROM Monitor... 6 Troubleshooting... 8 FAQ... 8 Basics... 9 Monitor Features 9 Monitor Files 9 Address Layout 10 Configuration 11 Emulation Modes... 12 SYStem.CPU CPU type 12 SYStem.Mode Establish the communication with the CPU 12 General SYStem Settings and Restrictions... 13 General Restrictions 13 SYStem.Option BrkVector Breakpoint trap 13 SYStem.Option BASE Base address of internal registers 13 Using the MMU for Z180... 14 Memory Classes... 16 Support... 17 Available Tools 17 Compilers 17 Realtime Operation System 18 3rd Party Tool Integrations 19 Products... 20 Z80 Monitor 1

Product Information 20 Order Information 20 Z80 Monitor 2

Z80 Monitor Version 06-Nov-2017 P:000D75 \\IARZ80\iarz80\sieve+97... MIX AI E::w.d.l addr/line code label mnemonic comment P:000D70 AF xor a P:000D71 ED42 sbc hl,bc P:000D73 381E jr c,0d93 ; c,?0176 { 491 flags[ k ] = FALSE; P:000D75 0E00?0178: ld c,0 ; c,0 P:000D77 2111C2 ld hl,0c211 ; hl,flags P:000D7A DD5EFC ld e,(ix-4) ; e,(ix-4) E::w.v.f /l /c E::w.r j = 15 CY _ A 0 BC 800F SP >0000 { N N F 2 DE 0C40C -06 0003 sieve(); P/V _ B 80 HL 3-04 000F -000 sieve() Hc _ C 0F IX 0C40F -02 0000 i = 0 Zr _ D 0C4 IY 2D8 FP >C41F primz = 3 Sig _ E 0C SP 0C407 +02 0CDC k = 15 IFF _ I 0 PC 0D75 +04 000F anzahl = 0 Tsk AF' 0 +06 0000 Brief Overview of Documents for New Users Architecture-independent information: Debugger Basics - Training (training_debugger.pdf): Get familiar with the basic features of a TRACE32 debugger. T32Start (app_t32start.pdf): T32Start assists you in starting TRACE32 PowerView instances for different configurations of the debugger. T32Start is only available for Windows. General Commands (general_ref_<x>.pdf): Alphabetic list of debug commands. Architecture-specific information: Processor Architecture Manuals : These manuals describe commands that are specific for the processor architecture supported by your debug cable. To access the manual for your processor architecture, proceed as follows: - Choose Help menu > Processor Architecture Manual. RTOS Debuggers (rtos_<x>.pdf): TRACE32 PowerView can be extended for operating systemaware debugging. The appropriate RTOS manual informs you how to enable the OS-aware debugging. Z80 Monitor 3

Z80 Monitor 4

Warning NOTE: Do not connect or remove probe from target while target power is ON. Power up: Switch on emulator first, then target Power down: Switch off target first, then emulator Z80 Monitor 5

Quick Start of the Z80 ROM Monitor Starting up the ROM Monitor is done as follows: 1. Select the device B: for the ROM Monitor. b: 2. Power the system down (optional). sys.d This instruction is necessary when the system is restarted. When the system is active while you try to reinitialize it, you get an error message. 3. Set the CPU type in the ROM Monitor program to load the CPU specific sys.cpu z80 4. Map the EPROM simulator. The mapping of the EPROM simulator is described in the section Mapping the EPROM simulator. 5. Load the monitor program. Usually the monitor program runs at address 0 in the ROM area. d.load.b romz80.bin /ny 6. Configure the Monitor program. The processor type is required for startup. Other parameters are optional. d.s 0x400 0x0 ; for Z80 processor 7. Load the program. d.load.u iarz80.dbg The format of the Data.LOAD command depends on the file format generated by the compiler. The corresponding options for all available compilers are listed in the compiler list. A detailed description of the Data.LOAD command is given in the Emulator Reference Manual. Z80 Monitor 6

8. Set the polarity of the Reset and NMI signal according to your target. The NMI signal is optional, it can be used to interrupt the program. x.respol - x.nmipol - x.nmibreak on 9. Start the ROM Monitor. If the RESET output of the ESI is not connected you must press the RESET button on your target after entering this command. sys.up A typical start sequence is shown below: ; the EPROM is in the addressrange 0x0--0x7fff ; the RAM is in the addressrange 0x8000--0x0ffff b: sys.d winclear map.res map.rom 0x0--0x7fff d.load.u iarz80.dbg d.load.b romz80.bin /ny x.respol - x.nmipol - x.nmibreak on sys.up ; select the Debugger device ; switch the system dow ; clear all windows ; map the EPROM simulator ; part of EPROM after internal registers ; load the application ; overload is with the monitor ; adapt the polarity of RES and NMI ; enables the connection of the NMI signal ; power the system up The start up can be automated using the programming language PRACTICE. Z80 Monitor 7

Troubleshooting No information available. FAQ EPROM Simulator Error on Data Modification Ref: 0056 Step or Breakpoint Fails Ref: 0061 Stepping Fails when Executing MOV SP,xxx Ref: 0062 Why crashes ROM monitor after modification of EPROM? Check that there is enough space left on the stack. See also "Restrictions for Stack Requirements". Why does single step or breakpoint not work? Check that there is enough space left on the stack before and after the execution of the instruction. See "Restrictions for Stack Requirements". Make sure that the single step and INT3 vector (1 + 3) are valid and point to the correct monitor entry. Why does stepping fail, when executing a MOV SP,xxx instruction? Check that there is enough space left on the stack before and after the execution of the instruction. See "Restrictions for Stack Requirements". Check that the value for the CP is within limits for the CPU and that the register space ist not beeing overwritten by the stack. See "Restrictions for Stack Requirements". No information available Z80 Monitor 8

Basics Monitor Features The monitor requires no stack during startup and memory operations. A valid stack is only required for modifications in the EPROM while the monitor is running (Hot Patch) and for single step and go commands. This allows to use the monitor even when the stack is not valid. External RAM memory is not required during startup and for memory operations. This allows to use the monitor also on not fully functional hardware. The NMI pin of the EPROM Simulator can be used to manually stop the target program. The monitor fully supports bank switching (breakpoints, memory access, symbols). The monitor can operate also when the EPROM is not always visible, i.e. is one of the banks. Monitor Files The 'romz80' monitor is for Eprom Simulator solutions, while the 'romz80e' monitor is used as foreground monitor for Emulators. By using a foreground monitor the target program can be single stepped without stopping the target processors interrupts or DMA transfers. Both monitors have the same source file 'romz80.asm'. This source file should not be modified, it is only included for reference purposes. There are to possibilities to include the monitor in the application: loading the '.bin' by the Eprom Simulator or linking the '.src' file together with the application. The '.src' files contain only the monitor code, a corresponding configuration table must be included in the target program. Z80 Monitor 9

Address Layout The Rom Monitor is freely relocatable in the whole address space by reassembling the source. The communication area for the Eprom Simulator is located at the fixed address 1000 to 1FFF. The monitor program consists of three parts: Vector Table Configuration Table Monitor Program Code The '.bin' and '.asm' files contain all three parts of the monitor. The address layout of the default monitor is as follows: 0x0000--0x03FF 0x0400--0x041F 0x0420--0x0FFF ; Vector Table ; Configuration Table ; Monitor Code For the first tests of a software, the '.bin' files can be loaded with vector and configuration table. When the vector table becomes part of the application, it is not loaded with the monitor. Instead the table is setup according to the application (the table may also reside in RAM). Some vectors must be setup to point into the monitor program code. The entry points are located at the beginning of the monitor. vec offs ent usage 00 000 +20 Reset (optional, can also go to application) 38 038 +30 Breakpoint Trap, (used for breakpoints, can be changed) 66 XXX +30 Manual Break (optional)..... +40 Any unused vector may be handled by the monitor The breakpoint trap vector can be configured by the SYStem.Option BrkVector command. The default is vector 38. Z80 Monitor 10

Configuration The configuration table of the monitor must always be located directly before the monitor code. The default location used in the binary files is 400 (hex). Processor core type (byte at offset 00H): 00 = Z80 (default) 01 = Z180 (NOTE: Requires also SYStem.CPU Z180 and MMU.ON commands) Z180 MMU address (byte at offset 01H): 38 or 78 or 0b8 or 0f8 Monitor Interrupt Level (byte at offset 04H) 00 = all interrupts enabled in monitor 01 = all interrupts locked in monitor Set target bank (four jumps at offset 0cH,10H,14H,18H) Get target bank (jump at offset 1cH) Z80 Monitor 11

Emulation Modes SYStem.CPU CPU type Format: SYStem.CPU <mode> <mode>: Z80 Z180 Z181 Z182 Selects the processor type. The ROM debugger requires also a modification in the debug monitor for different processor types. SYStem.Mode Establish the communication with the CPU Format: SYStem.Mode <mode> <mode>: Down NoDebug Go Up Default: Down. Selects the target operating mode. Down NoDebug Go Up The CPU is in reset. Debug mode is not active. Default state and state after fatal errors. The CPU is running. Debug mode is not active. Debug port is tristate. In this mode the target should behave as if the debugger is not connected. The CPU is running. Debug mode is active. After this command the CPU can be stopped with the break command or if any break condition occurs. The CPU is not in reset but halted. Debug mode is active. In this mode the CPU can be started and stopped. This is the most typical way to activate debugging. If the mode Go is selected, this mode will be entered, but the control button in the SYStem window jumps to the mode UP. Z80 Monitor 12

General SYStem Settings and Restrictions General Restrictions Stack Memory CBAR/CBR/BBR Access (Z180) CBAR value (Z180) The ROM debugger needs 32 bytes of memory on the current stack. The stack is not required for starting the Monitor and memory read or modify commands. Modification of the EPROM while the monitor is running (Hot Patch) requires 40 bytes on the stack. These registers should NOT be accessed by Data.SET commands. The address between 0000 and 1FFF must be COMMON0 area. SYStem.Option BrkVector Breakpoint trap Format: SYStem.Option BrkVector <trap> Defines the rst number used for breakpoints and single stepping. The default is RST 38. SYStem.Option BASE Base address of internal registers Format: SYStem.Option BASE <address> The SYStem Option BASE defines the base address of the internal registers. Z80 Monitor 13

Using the MMU for Z180 This command and the commands MMU support the built-in MMU of the Z180 processors. The analyzer and all memory systems and breakpoints are based on the physical address. The display in the analyzer can be both physical or logical addresses. A logical address can have two formats: smaller than 64K or larger. Smaller addresses are assumed to be an logical address as seen by the CPU in the current MMU configuration. If an address is larger than 64 K, the address bits A16 to A23 define the bank base address used for the BBR or CBR register. Logical above 64 K addresses should only be used, if the MMU registers were already setup. The following schematic shows these relations for some examples: preset: CBAR=84, BBR=10, CBR=20 logical address: 5 0 4 5 6 7 (Hex) 16 bit CBR/BBR = 50 logical CPU address --> physical address: 54567 logical address: 0 0 1 5 6 7 (Hex) 16 bit current-mmu logical CPU address --> physical address: 1567 logical address: 0 0 4 5 6 7 (Hex) 16 bit current-mmu logical CPU address --> MMU Bank Area --> physical address: 04567 +BBR 10--- =14567 logical address: 0 0 c d e f (Hex) 16 bit current-mmu logical CPU address --> COMMON1 Area --> physical address: 0cdef +CBR +20--- =2cdef To activate the correct address translation for breakpoints, the MMU command must be activated. The following example loads a banked application: Z80 Monitor 14

mmu.off map.rom 0x0--0x7ffff... mmu.on d.load.u iarz180.dbg The next example loads a banked application in two logical units: CBAR=84, CBR=0, BBR=10 or 20 mmu.reset symbol.reset map.rom 0x--0x7ffff mmu.create 0x104000--0x107fff mmu.create 0x204000--0x207fff mmu.on d.load.b bank1.cod 0x104000 /nosymbol d.load.b bank2.cod 0x204000 /nosymbol d.load.b common.cod 0x2000 /nosymbol d.load.sym bank1.sym /noclear symbol.reloc p:100000 0x4000--0x4fff d.load.sym bank2.sym /noclear symbol.reloc p:200000 0x4000--0x4fff d.load.sym common.sym /noclear Z80 Monitor 15

Memory Classes Memory Class D P Description Data Program C E A Memory access by CPU Emulation memory access Absolute (physical) memory access Z80 Monitor 16

Support Available Tools CPU ICE FIRE ICD DEBUG ICD MONITOR HD64180R1 YES YES HD64180Z YES YES TMPZ84C00 YES YES TMPZ84C013 YES YES TMPZ84C015 YES YES Z80180 YES YES Z80181 YES YES Z80182 YES YES Z8400 YES YES Z84013 YES YES Z84015 YES YES Z84C00 YES YES Z84C01 YES YES Z84C13 YES YES Z84C15 YES YES Z84C50 YES YES Z8S180 YES YES ICD TRACE POWER INTEGRATOR INSTRUCTION SIMULATOR Compilers Language Compiler Company Option Comment ASM HP-64000-ASM HP Source level debugging ASM MI-C SYM Source level debugging ASM AS SDSI SDS C MI-C SYM/LOC No type information C ICCZ80 IAR Systems AB UBROF Z180 and banking sup. Z80 Monitor 17

Language Compiler Company Option Comment C MCCZ80 Mentor Graphics IEEE no banking support Corporation C HT-Z80 Microchip Technology HITECH Inc. C UNIWARE-C SDSI SDS C CC Softools Inc. UBROF PLM ISIS-PL/M Intel Corporation SYM/LOC no type/local info Realtime Operation System Company Product Comment CMX Systems Inc. Mentor Graphics Corporation CMX-RTX VRTX80 Z80 Monitor 18

3rd Party Tool Integrations CPU Tool Company Host WINDOWS CE PLATF. - Windows BUILDER CODE::BLOCKS - - C++TEST - Windows ADENEO - X-TOOLS / X32 blue river software GmbH Windows CODEWRIGHT Borland Software Windows Corporation CODE CONFIDENCE Code Confidence Ltd Windows TOOLS CODE CONFIDENCE Code Confidence Ltd Linux TOOLS EASYCODE EASYCODE GmbH Windows ECLIPSE Eclipse Foundation, Inc Windows CHRONVIEW Inchron GmbH Windows LDRA TOOL SUITE LDRA Technology, Inc. Windows UML DEBUGGER LieberLieber Software Windows GmbH SIMULINK The MathWorks Inc. Windows ATTOL TOOLS MicroMax Inc. Windows VISUAL BASIC Microsoft Corporation Windows INTERFACE LABVIEW NATIONAL Windows INSTRUMENTS Corporation RAPITIME Rapita Systems Ltd. Windows RHAPSODY IN MICROC IBM Corp. Windows RHAPSODY IN C++ IBM Corp. Windows DA-C RistanCASE Windows TRACEANALYZER Symtavision GmbH Windows TA INSPECTOR Timing Architects GmbH Windows UNDODB Undo Software Linux VECTORCAST UNIT Vector Software Windows TESTING VECTORCAST CODE COVERAGE Vector Software Windows Z80 Monitor 19

Products Product Information OrderNo Code LA-7518 MON-Z80 LA-7528D MON-H8-SER-UD LA-7528 MON-H8 Text ROM Monitor for Z80 on ESI support Z80 family, includes HLL debugger, operation system, includes software for Windows ROM Monitor for H8/300H or H8S Serial Acc. UD supports H8S includes HLL debugger, operation system, licensed for one host system via USB dongle for Windows32, Windows64, Linux32, Linux64 and MAC OS X ROM Monitor for H8/300H and H8S family on ESI supports H8/300H and H8S includes HLL debugger, operation system, includes software for Windows Order Information Order No. Code Text LA-7518 MON-Z80 ROM Monitor for Z80 on ESI LA-7528D MON-H8-SER-UD ROM Monitor for H8/300H or H8S Serial Acc. UD LA-7528 MON-H8 ROM Monitor for H8/300H and H8S family on ESI Z80 Monitor 20