; -------------------------------------------------------------------------------- ; @Title: VxWorks Demo for TRACE32 OS Awareness on P3041DS Board ; @Description: ; ; This batchfile loads all necessary files to demonstrate ; the OS Awareness for VxWorks on the P3041DS board. ; ; @Keywords: Awareness, RTOS, VxWorks ; @Author: DIE ; @Chip: P3041 ; @Board: P3041DS ; @Copyright: (C) 1989-2015 Lauterbach GmbH, licensed for use with TRACE32(R) only ; -------------------------------------------------------------------------------- ; $Id: vxworks.cmm 13125 2018-09-11 14:03:01Z rdienstbeck $ ; set terminal connection &term="COM3" ; Open Area window WinPAGE.RESet WinPOS 0. 32. 80. 17. Area print print "=== VxWorks 7 Demo on P3041DS ===" ; Reset debugger print "reseting debugger..." RESet ; Open serial terminal window SCREEN.ALways PRINT "starting terminal on &term" TERM.METHOD COM &term 115200. TERM.SIZE 80. 1000. TERM.Mode VT100 TERM.SCROLL ON WinPOS 91. 0. 80. 25. TERM.view ; Configure debugger PRINT "initializing debugger..." SYStem.CPU P3041 SYStem.BdmClock 25.MHz ; try lower debug frequencies if problems occur SYStem.Option.FREEZE ON ; stop time base when in debug mode SYStem.Option.IMASKASM ON ; disable insterrupts for assembler single steps SYStem.Option MMUSPACES ON ; enable space ids for RTPs SYStem.MemAccess CPU ; allow non-intrusive run-time memory access SYStem.Up ; Initialize Target ; let bootloader initialize everything Go PRINT "booting target..." WAIT 5.s Break ; Prepare download Register.RESet PER.Set SPR:0x3F2 %Long %BE 0 ; disable L1 cache PER.Set SPR:0x3F9 %Long %BE 0 ; disable L2 cache ; Download VxWorks image print "downloading VxWorks image..." Data.LOAD.Elf C:\WindRiver\workspace\P3041SMPVIP\default\vxWorks ; Open List window -- we like to see something WinPOS 0. 0. 86. 26. List.auto ; Enable real-time trace IF Analyzer() ( ; external HSTP trace ;Analyzer.List ;Analyzer.state ) ELSE ( ; Onchip trace ;Set trace base address range Onchip.TBARange A:0x4000000--0x5000000 ; e.g. 16MB ;Onchip.List ;Onchip.state ) ; Initialize kernel Go usrRoot print "starting VxWorks..." WAIT !run() ; Load VxWorks Awareness print "loading VxWorks Awareness..." TASK.CONFIG ~~/demo/powerpc/kernel/vxworks/vxworks.t32 ; Open Task List window WinPOS 86. 28. 85. 23. TASK.TaskInfo ; Start application Go usrAppInit print "starting application..." WAIT !run() ; Declare MMU format to the debugger ; necessary to debug RTPs: ; - table format is "VXWORKS.E500" ; - table base address is TTB of kernel ; - kernel range is fixed (KERNEL_SYS_MEM_RGN_BASE/SIZE, adrSpaceArchLibP.h) ; - kernel physical address is zero ; MMU.FORMAT ; MMU will be initialized in usrRoot->usrMmuInit, ; so run until usrAppInit to have kernel MMU pages available PRINT "initializing debugger translation..." MMU.FORMAT VXWORKS.E500 task.rtp.ttb(0) 0x0--0x1fffffff 0x0 TRANSlation.COMMON 0x0--0x1fffffff ; kernel area is common for all RTPs TRANSlation.TableWalk ON TRANSlation.ON ; Start demo PRINT "starting demo..." Go usrDemo ; That's it print "done." ENDDO