Q&A: How to converter RealView scripts to Lauterbach CMM scripts for mx53

Document created by Yixing Kong Employee on Sep 2, 2013
Version 1Show Document
  • View in full screen mode

Q:

Does anyone have the Lauterbach script files for connecting to the mx53?  Also,  does anyone know of a converter to convert RealView scripts to Lauterbach?

 

A:

Please see below attach.cmm and load_simbols.cmm for i.MX53.

attach.cmm

;

; Script to attach to a running system, halt the CPU,

; and display the ASM code

;

 

screen.on

 

; Debugger Reset

winpage.reset

area.reset

WINPOS 0. 26. 75. 8. 0. 0. W000

area

print "resetting ICD..."

System.Down

Break.Delete

MAP.RESet

TASK.RESet

sYmbol.RESet

Data.PROLOG.RESet

Data.EPILOG.RESet

sYmbol.AutoLoad.CHECK OFF      ; disable dynamic autoloader

sYmbol.AutoLoad.RESet          ; reset autoloader list

MMU.RESet

; setup of ICD JTAG

print "initializing JTAG..."

SYStem.CPU CORTEXA8

SYStem.MultiCore IRPOST 0x0

SYStem.MultiCore IRPRE 0x0

SYStem.MultiCore DRPOST 0x0

SYStem.MultiCore DRPRE 0x0

SYStem.MultiCore DAPIRPOST 0x09

SYStem.MultiCore DAPIRPRE 0x0

SYStem.MultiCore DAPDRPOST 0x02

SYStem.MultiCore DAPDRPRE 0x0

SYStem.MultiCore MEMORYACCESSPORT 0

SYStem.MultiCore DEBUGACCESSPORT 1

SYStem.MultiCore COREBASE APB:0xC0008000

SYStem.Option DACR ON          ; give Debugger global write permissions

TrOnchip.Set DABORT OFF        ; used by Linux OS for page miss!

TrOnchip.Set PABORT OFF        ; used by Linux OS for page miss!

TrOnchip.Set UNDEF OFF         ; let UNDEF be handled by Linux OS

SYStem.Option MMU ON           ; enable space ids to virtual addresses

SYStem.JtagClock 20.0MHz

SETUP.IMASKASM ON              ; lock interrupts while single stepping

 

; Use on-chip breakpoints

Break.SELect PROGRAM ONCHIP

Break.SELect READ ONCHIP

Break.SELect WRITE ONCHIP

Break.SELect ALPHA ONCHIP

Break.SELect BETA ONCHIP

Break.SELect CHARLY ONCHIP

Break.SELect DELTA ONCHIP

Break.SELect ECHO ONCHIP

SYStem.Option EnReset OFF

SYS.m attach

; wait until reset is complete

wait 2.s

if run()

    Break

; Open a Code Window -- we like to see something

 

WINPOS 0. 0. 75. 20.

Data.List

 

enddo

 

load.symbols.cmm

 

;

; Script to load the Linux kernel symbols into the debugger

;

 

print "loading Linux kernel symbols..."

&linuxpath="S:\git\kernel\linux-2.6-imx-0"

&kbuildpath="build"

 

sYmbol.SourcePATH.SET &linuxpath

Data.LOAD.Elf &linuxpath\&kbuildpath\imx5\vmlinux /StripPART 3 /gnu /nocode

 

; Map the virtual kernel symbols to physical addresses

; to give the debugger access to it before CPU MMU is

; initialized

 

print "setting system MMU..."

 

MMU.FORMAT Linux swapper_pg_dir 0xc0000000--0xc1ffffff 0x70000000

MMU.Create 0xc0000000--0xc1ffffff 0x70000000 ; map kernel pages at RAM start

MMU.COMMON 0xc0000000--0xffffffff            ; common area for kernel and processes

;MMU.TableWalk OFF   ; debugger uses a table walk to decode virtual addresses

MMU.ON             ; switch on debugger(!) address translation

 

; Initialize Mutitasking Support

 

print "initializing multitask support..."

 

TASK.CONFIG ../linux       ; loads Linux awareness (linux.t32)

MENU.ReProgram ../linux    ; loads Linux menu (linux.men)

HELP.FILTER.Add rtoslinux  ; add linux awareness manual to help filter

 

enddo

 

This document was generated from the following discussion: Lauterbach CMM scripts for mx53

Attachments

    Outcomes