lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | ;--------------------------------------------------------------------------
|
| 2 | ;
|
| 3 | ; Linux Demo for TRACE32 multitask debugger
|
| 4 | ;
|
| 5 | ; This batchfile demonstrates the use of
|
| 6 | ; the Multitask-Debugger for Linux
|
| 7 | ;
|
| 8 | ; The example is generated for the evb297520v2fpga board using an ICD.
|
| 9 | ; It will NOT run on any other board, but may be used as a template for
|
| 10 | ; others.
|
| 11 | ; Linux is downloaded to the board via ICD.
|
| 12 | ;
|
| 13 | ; modified by ZTE-TSP at 2015.08.07
|
| 14 | ;
|
| 15 | ; NOTICE:
|
| 16 | ; this script can only be used on NO jtag chain mode
|
| 17 | ;--------------------------------------------------------------------------
|
| 18 |
|
| 19 | ;do ./7520V2_DDR_1Gb_312.cmm
|
| 20 |
|
| 21 |
|
| 22 | GLOBAL &VMLINUX_PATH
|
| 23 | GLOBAL &INITRD_PATH
|
| 24 | GLOBAL &SOURCE_PATH
|
| 25 | GLOBAL &DDR_BASE
|
| 26 | GLOBAL &INITRD_LOAD_ADDR
|
| 27 | GLOBAL &IMAGE_LOAD_ADDR
|
| 28 |
|
| 29 | &VMLINUX_PATH= "..\..\linux_plat\base\linux\kernels\linux-3.4.5\vmlinux"
|
| 30 | &IMAGE_PATH="..\..\linux_plat\base\linux\kernels\linux-3.4.5\zImage"
|
| 31 | &INITRD_PATH= ".\cpio_ramdisk.gz"
|
| 32 | &SOURCE_PATH="..\..\linux_plat\base\linux\kernels\linux-3.4.5"
|
| 33 | &DDR_BASE=0x22000000
|
| 34 | &INITRD_LOAD_ADDR=&DDR_BASE+0x600000
|
| 35 | &IMAGE_LOAD_ADDR=&DDR_BASE+0x2000000
|
| 36 |
|
| 37 | area.reset
|
| 38 | print "resetting..."
|
| 39 | TASK.RESet
|
| 40 | sYmbol.RESet
|
| 41 | MMU.RESet
|
| 42 |
|
| 43 | ;do ./boot.cmm
|
| 44 |
|
| 45 | ; setup of ICD
|
| 46 |
|
| 47 | print "initializing..."
|
| 48 | SYStem.CPU cortexa9mpcore ;ZX297520v2 cortexa9 core
|
| 49 | SYStem.Option DACR ON ; give Debugger global write permissions
|
| 50 | TrOnchip.Set DABORT OFF ; used by Linux for page miss!
|
| 51 | TrOnchip.Set PABORT OFF ; used by Linux for page miss!
|
| 52 | TrOnchip.Set UNDEF OFF ; my be used by Linux for FPU detection
|
| 53 | SYStem.Option MMUSPACES ON ; enable space ids to virtual addresses
|
| 54 | SYStem.JtagClock 3.0MHz ; use adaptive clocking for most speed
|
| 55 |
|
| 56 | system.option resbreak off
|
| 57 | system.option enreset off
|
| 58 |
|
| 59 | sys.config.corebase 0x80110000
|
| 60 | Sys.Config.debugaccessport 0x0
|
| 61 | Sys.Mode PREPARE
|
| 62 | Wait 0.1s
|
| 63 |
|
| 64 | sys.up
|
| 65 | SETUP.IMASKASM ON ; lock interrupts while single steppingle stepping
|
| 66 | ;l2 divison -- no need
|
| 67 | ; data.set 0x00803004 %LE %LONG 0x33111;
|
| 68 |
|
| 69 | ; a9 clk sel, 0:pll_624, 1:main_clk, 2:pll_clk_491, 3:pll_clk_312 4:pll_clk_208
|
| 70 | ; data.set 0x0010d044 %LE %LONG 0;
|
| 71 | data.set 0x01306040 %LE %LONG 0x10;
|
| 72 |
|
| 73 | data.set 0x103004 %long 0x11111111 ;nand
|
| 74 | //data.set 0x103004 %long 0x22222222 ;spifc
|
| 75 |
|
| 76 |
|
| 77 | data.load.elf ..\u-boot
|
| 78 |
|
| 79 |
|
| 80 | B::B::Data.List
|
| 81 | symbol.sourcepath.reset ; reset all source path informations
|
| 82 | sYmbol.SourcePATH.Set ..\
|
| 83 | sYmbol.SourcePATH.SetRecurseDir ..\board\zte\zx297520v2
|
| 84 | sYmbol.SourcePATH.SetRecurseDir ..\arch\arm\cpu\armv7
|
| 85 | sYmbol.SourcePATH.SetRecurseDir ..\arch\arm\cpu\armv7\zx297520v2
|
| 86 | sYmbol.SourcePATH.SetRecurseDir ..\arch\arm\lib
|
| 87 | sYmbol.SourcePATH.SetRecurseDir ..\api
|
| 88 | sYmbol.SourcePATH.SetRecurseDir ..\common
|
| 89 | sYmbol.SourcePATH.SetRecurseDir ..\tools
|
| 90 | sYmbol.SourcePATH.SetRecurseDir ..\tools\gdb
|
| 91 | sYmbol.SourcePATH.SetRecurseDir ..\tools\updater
|
| 92 | sYmbol.SourcePATH.SetRecurseDir ..\net
|
| 93 | sYmbol.SourcePATH.SetRecurseDir ..\include
|
| 94 | sYmbol.SourcePATH.SetRecurseDir ..\include\asm-arm
|
| 95 | sYmbol.SourcePATH.SetRecurseDir ..\include\asm-arm\arch-zx297520
|
| 96 | sYmbol.SourcePATH.SetRecurseDir ..\post
|
| 97 | sYmbol.SourcePATH.SetRecurseDir ..\lib_generic
|
| 98 | sYmbol.SourcePATH.SetRecurseDir ..\disk
|
| 99 | sYmbol.SourcePATH.SetRecurseDir ..\rtc
|
| 100 | sYmbol.SourcePATH.SetRecurseDir ..\dtt
|
| 101 | sYmbol.SourcePATH.SetRecurseDir ..\drivers
|
| 102 | sYmbol.SourcePATH.SetRecurseDir ..\downloader
|
| 103 | sYmbol.SourcePATH.SetRecurseDir ..\test
|
| 104 | register.set PC _start
|
| 105 |
|
| 106 |
|
| 107 | enddo
|
| 108 |
|