yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame] | 1 | ;/*it is used for attaching while zx297510evb running*/
|
| 2 |
|
| 3 | ;do ./boot_attach_CortexA9.cmm
|
| 4 |
|
| 5 | GLOBAL &VMLINUX_PATH
|
| 6 | GLOBAL &SOURCE_PATH
|
| 7 | GLOBAL &DDR_BASE
|
| 8 |
|
| 9 | &SOURCE_PATH="..\..\linux_plat\base\linux\kernels\linux-3.4.5"
|
| 10 | &VMLINUX_PATH="..\..\linux_plat\base\linux\kernels\linux-3.4.5\vmlinux"
|
| 11 |
|
| 12 | &DDR_BASE=0x20440000
|
| 13 |
|
| 14 | area.reset
|
| 15 | sYmbol.RESet
|
| 16 | MMU.RESet
|
| 17 |
|
| 18 | ; setup of ICD
|
| 19 |
|
| 20 | print "initializing..."
|
| 21 | SYStem.CPU CortexA53 ; ;ZX297520v3 CortexA53 core
|
| 22 | SYStem.Option MMUSPACES ON ; enable space ids to virtual addresses
|
| 23 | SYStem.JtagClock 3.0MHz ; use adaptive clocking for most speed
|
| 24 |
|
| 25 | system.option resbreak off
|
| 26 | system.option enreset off
|
| 27 |
|
| 28 | Sys.Config.COREBASE 0x80410000 ;
|
| 29 | Sys.Config.CTIBASE 0x80420000
|
| 30 | Sys.Config.debugaccessport 0
|
| 31 | Sys.Mode PREPARE
|
| 32 |
|
| 33 |
|
| 34 | wait 0.1s
|
| 35 |
|
| 36 | sys.mode attach
|
| 37 | SETUP.IMASKASM ON ; lock interrupts while single stepping
|
| 38 |
|
| 39 | ; Load the Linux kernel symbols into the debugger
|
| 40 |
|
| 41 | print "loading Linux kernel symbols..."
|
| 42 |
|
| 43 | ;Data.LOAD.Elf &VMLINUX_PATH /gnu /nocode /SourcePATH ..\..\..\..\
|
| 44 |
|
| 45 | Data.LOAD.Elf &VMLINUX_PATH /gnu /nocode /strippart "linux-3.4.5" /SourcePATH ..\linux-3.4.5
|
| 46 |
|
| 47 | ; Map the virtual kernel symbols to physical addresses
|
| 48 | ; to give the debugger access to it before CPU MMU is
|
| 49 | ; initialized
|
| 50 | MMU.FORMAT LINUX swapper_pg_dir 0xc0040000--0xc30fffff &DDR_BASE
|
| 51 | TRANSlation.COMMON 0xbf000000--0xffffffff ; common area for kernel and processes
|
| 52 | TRANSlation.TableWalk ON ;debugger uses table walk to decode virtual address
|
| 53 | TRANSlation.ON ;switch on debugger address translation
|
| 54 |
|
| 55 | ; set source path
|
| 56 | print "set source path ..."
|
| 57 | sYmbol.SourcePATH.RESet
|
| 58 | sYmbol.SourcePATH.SetBaseDir &SOURCE_PATH
|
| 59 | sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\arch\arm
|
| 60 | sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\arch\arm\mach-zx297520v3
|
| 61 | sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\init
|
| 62 | sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\kernel
|
| 63 | ;sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\drivers\base
|
| 64 | ;sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\drivers\tty
|
| 65 | ;sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\drivers\gpio
|
| 66 | ;sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\drivers\i2c
|
| 67 | ;sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\drivers\usb
|
| 68 | ;sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\drivers\mmc
|
| 69 | ;sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\mm
|
| 70 | sYmbol.SourcePATH.SetRecurseDir &SOURCE_PATH\drivers
|
| 71 |
|
| 72 | ; Initialize Linux Awareness
|
| 73 |
|
| 74 | ; Note that the Linux awareness needs the kernel symbols to work
|
| 75 | print "initializing multitask support..."
|
| 76 | TASK.CONFIG .\linux ; loads Linux awareness (linux.t32)
|
| 77 | MENU.ReProgram .\linux ; loads Linux menu (linux.men)
|
| 78 | HELP.FILTER.Add rtoslinux ; add linux awareness manual to help filter
|
| 79 | MENU.ReProgram .\sys\board ; add board tools
|
| 80 |
|
| 81 | ; Group kernel area to be displayed with red bar
|
| 82 |
|
| 83 | GROUP.Create "kernel" 0xc0000000--0xffffffff /RED
|
| 84 | GROUP.Create "module" 0xbf000000--0xbfffffff /blue
|
| 85 | ; Ok, we're done, let's start Linux
|
| 86 |
|
| 87 | break
|
| 88 |
|
| 89 | enddo
|
| 90 |
|
| 91 |
|
| 92 |
|