NS32000 Monitor TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... NS32000... NS32000 Monitor... 1 Brief Overview of Documents for New Users... 2 WARNING... 4 Quick Start of the 32000 ROM Monitor... 5 Troubleshooting... 7 Faq 7 Basics... 8 Monitor Features 8 Monitor Files 8 Address Layout 8 Vector Table 9 Configuration 9 General SYStem Settings and Restrictions... 10 General Restrictions 10 Memory Classes... 11 Support... 12 Available Tools 12 Compilers 12 Realtime Operation System 12 Debuggers 13 Products... 13 Product Information 13 Order Information 14 NS32000 Monitor 1
NS32000 Monitor Version 02-Apr-2014 E::w.d.l addr/line code label mnemonic comment { 514 if ( flags[ i ] ) SP:00096F 1C78C0000C80 cmpqb #0,0C80(r7) ; #0,3200(r7) SP:000975 0AC000002D beq 9A2 { 516 primz = i + i + 3; SP:00097A A7E17F03 addr 3(r7)[r7:b],r6 ; 3(r7)[r7:b], 517 k = i + primz; SP:00097E 67E13E addr r7[r6:b],r5 ; i[r6:b],k 518 while ( k <= SIZE ) E::w.v.f /l /c E::w.v.l %m %r %t while ( TRUE ) sieve() { (register int) i = 0 sieve(); (register int) primz = 0-000 sieve() (register int) k = 0 i = 0 (auto int) anzahl = 0 primz = 0 k = 0 anzahl = 0 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. NS32000 Monitor 2 Brief Overview of Documents for New Users
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 Debugger (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. NS32000 Monitor 3 Brief Overview of Documents for New Users
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 NS32000 Monitor 4 WARNING
Quick Start of the 32000 ROM Monitor 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 Staringup 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. Map the EPROM simulator. The mapping of the EPROM simulator is described in the section Mapping the EPROM simulator. 4. Load the monitor program. Usally the monitor program runs at address 0 in the ROM area. d.load.b rom32.bin /ny 5. Configure the Monitor program. d.s 0x402 0x1 ; 16bit EPROMs 6. Load the program. d.load.coff coff.x 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. NS32000 Monitor 5 Quick Start of the 32000 ROM Monitor
7. 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 8. 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: ; for this example the 32016 is used ; the EPROM is in the addressrange 0x0--0x1ffff ; the RAM is in the addressrange 0x40000--0x5ffff b: sys.d winclear map.res map.rom 0x0--0x1ffff d.load.b rom32.bin /ny ; select the Debugger device ; switch the system down ; clear all windows ; map the EPROM simulator ; load the monitor program ; initialize the monitor configuration table d.s sp:0x402 %byte 1 d.load.coff test.x x.respol - x.nmipol - x.nmibreak on sys.up r.s pc main r.s sp 0x48000 ; set the EPROM bus width ; load the application program ; adapt the polarity of RES and NMI ; enables the connection of the NMI signal ; power the system up ; set the program counter The start up can be automated using the programming language PRACTICE. NS32000 Monitor 6 Quick Start of the 32000 ROM Monitor
Troubleshooting Faq EPROM Simulator Error on Data Modification Step or Breakpoint Fails Stepping Fails when Executing MOV SP,xxx 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 NS32000 Monitor 7 Troubleshooting
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 for testing not fully functional hardware, as only the EPROM access must work correctly to operate the monitor. The position independend code of the monitor allows to relocate the monitor during debugging. The NMI pin of the Eprom Simulator can be used to manually stop the target program. Monitor Files The 'rom32' monitor is for Eprom Simulator solutions, while the 'rom32e' 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 'rom68.asm'. This sourcefile 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. Address Layout The Rom Monitor is freely relocatable in the whole address space. The communication area for the Eprom Simulator is located at the fixed address 1000 to 1FFF of the first EPROM. The CPU address depends on the bus width of the EPROMs. The following table shows the address ranges occupied by the communication port: bus width start address end address 8 bit EPROM_BASE+1000 EPROM_BASE+1FFF 16 bit EPROM_BASE+2000 EPROM_BASE+3FFF 32 bit EPROM_BASE+4000 EPROM_BASE+7FFF The monitor program consists of three parts: Vector Table Configuration Table Monitor Program Code NS32000 Monitor 8 Basics
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 Configurati on Table Monitor Code Vector Table 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. 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): 0 = default EPROM Bus Width (byte at offset 02H): 0 = 8 bit (default) 1 = 16 bit 2 = 32 bit Monitor Interrupt Level (byte at offset 04H) 0 = default NS32000 Monitor 9 Basics
General SYStem Settings and Restrictions tbd. General Restrictions Stack Memory All 32000-type ROM debuggers need memory in the supervisor stack area (SP1) to break correctly. If you get an invalid PC value after stopping the program, the SP1 register may be outside the memory area. This must be considered especially when debugging the startup code of an application. The ROM Monitor needs up to 48 bytes space on the stack for step, go and up to 256 bytes for EPROM modification (Hot Patch). The stack is not required for starting the Monitor and memory read or modify commands. NS32000 Monitor 10 General SYStem Settings and Restrictions
Memory Classes Memory Class Description UD UP SD SP USER-DATA USER-PROGRAM SUPERVISOR-DATA SUPERVISOR-PROGRAM U S D P User Supervisor Data Program C E Memory access by CPU Emulation memory access NS32000 Monitor 11 Memory Classes
Support Available Tools CPU ICE FIRE ICD DEBUG ICD MONITOR NS32CG16 YES YES NS32CG160 YES YES NS32FX16 YES YES ICD TRACE POWER INTEGRATOR INSTRUCTION SIMULATOR Compilers Language Compiler Company Option Comment C ICC32000 Introl Corporation ICOFF C GNX-C National Semiconductor Corporation COFF Realtime Operation System No RTOS supported. NS32000 Monitor 12 Support
Debuggers CPU Debugger Company Host ALL X-TOOLS / X32 blue river software GmbH Windows ALL CODEWRIGHT Borland Software Windows Corporation ALL CODE CONFIDENCE Code Confidence Ltd Windows TOOLS ALL CODE CONFIDENCE Code Confidence Ltd Linux TOOLS ALL EASYCODE EASYCODE GmbH Windows ALL ECLIPSE Eclipse Foundation, Inc Windows ALL RHAPSODY IN MICROC IBM Corp. Windows ALL RHAPSODY IN C++ IBM Corp. Windows ALL LDRA TOOL SUITE LDRA Technology, Inc. Windows ALL ATTOL TOOLS MicroMax Inc. Windows ALL VISUAL BASIC Microsoft Corporation Windows INTERFACE ALL LABVIEW NATIONAL Windows INSTRUMENTS Corporation ALL CODE::BLOCKS Open Source - ALL C++TEST Parasoft Windows ALL RAPITIME Rapita Systems Ltd. Windows ALL DA-C RistanCASE Windows ALL SIMULINK The MathWorks Inc. Windows ALL VECTORCAST/RSP Vector Software Windows ALL WINDOWS CE PLATF. BUILDER Windows Windows Products Product Information OrderNo Code LA-7522 MON-NS32000 Text ROM Monitor for NS32000 on ESI support NS32000 family includes HLL debugger, operation system, includes driver for WINDOWS NS32000 Monitor 13 Products
Order Information Order No. Code Text LA-7522 MON-NS32000 ROM Monitor for NS32000 on ESI NS32000 Monitor 14 Products