Commit 17525b52 authored by nguimfac's avatar nguimfac

add current working files...

parent 56655890
+++++++++++++ not complete +++++++++++++++
source [find interface/jlink.cfg] #mod enable the jlink debbug interface
#mod source [find interface/ftdi/olimex-arm-usb-ocd-h.cfg] #mod for olimex inteface
#mod interface ft2232
#mod ft2232_layout axm0432_jtag
#mod ft2232_vid_pid 0x0403 0x6010
# Change the default telnet port...
telnet_port 4444
# GDB connects here
gdb_port 3333
# GDB can also flash my flash!
#gdb_memory_map enable
#gdb_flash_program enable
source [find bitsbytes.tcl]
source [find cpu/arm/arm966.tcl] #mod ****
#mod source [find cpu/arm/arm7tdmi.tcl]
source [find memory.tcl]
source [find mmr_helpers.tcl]
set CHIP_MAKER mediatek # freescale #mod not sure about that
set CHIP_FAMILY mt2502a # mc1322x #mod not sure
set CHIP_NAME mt2502a # mc13224 #mod not sure
set N_RAM 1
set RAM(0,BASE) 0x00400000
set RAM(0,LEN) 0x18000
set RAM(0,HUMAN) "internal SRAM"
set RAM(0,TYPE) "ram"
set RAM(0,RWX) $RWX_RWX
set RAM(0,ACCESS_WIDTH) $ACCESS_WIDTH_ANY
# I AM LAZY... I create 1 region for all MMRs.
set N_MMREGS 1
set MMREGS(0,CHIPSELECT) -1
set MMREGS(0,BASE) 0x80000000
set MMREGS(0,LEN) 0x00030000
set MMREGS(0,HUMAN) "mm-regs"
set MMREGS(0,TYPE) "mmr"
set MMREGS(0,RWX) $RWX_RW
set MMREGS(0,ACCESS_WIDTH) $ACCESS_WIDTH_ANY
set N_XMEM 0
#
######################
# Target configuration
######################
#
set _CHIPNAME mt2502a
set _ENDIAN little
set _CPUTAPID 0x17700f0f #mod 0x1f1f001d
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f -expected-id $_CPUTAPID
#jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x03 -expected-id $_CPUTAPID # from my own file
# reset_config trst_and_srst separate # from my own file
reset_config srst_only
jtag_ntrst_delay 200
#jtag_rclk 0
#mod adapter_khz 2000
adapter_khz 2
set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME arm966 -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm966
#mod target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi
#$_TARGETNAME -variant arm7tdmi
#$_TARGETNAME configure -event reset-init {
# sleep 100
# soft_reset_halt
# mww 0x80000018 0x50000000
# mww 0x80000000 0x00000f00
# mww 0x80000008 0x00000e00
# mww 0x80005000 0x00006013
# # mww 0x80005018 0x017f270f
# # mww 0x80005008 0x55
# mww 0x80005018 0x07A9270F
# mww 0x80005008 0x55
# sleep 100
#}
# Internal sram memory
$_TARGETNAME configure -work-area-virt 0x00408000 -work-area-phys 0x00408000 -work-area-size 0x1000 -work-area-backup 1
proc run {file} {
puts "loading $file into location 0x00400000 and executing..."
soft_reset_halt
load_image $file 0x00400000
resume 0x00400000
}
#flash bank mc1322x 0 0 0 0 $_TARGETNAME
$_TARGETNAME configure -event gdb-attach my_attach_proc
$_TARGETNAME configure -event gdb-attach {
echo "gdb attaching..."
halt
#soft_reset_halt
}
source [find interface/jlink.cfg] #mod enable the jlink debbug interface
#mod source [find interface/ftdi/olimex-arm-usb-ocd-h.cfg] #mod for olimex inteface
#mod interface ft2232
#mod ft2232_layout axm0432_jtag
#mod ft2232_vid_pid 0x0403 0x6010
# Change the default telnet port...
telnet_port 4444
# GDB connects here
gdb_port 3333
# GDB can also flash my flash!
#gdb_memory_map enable
#gdb_flash_program enable
source [find bitsbytes.tcl]
source [find cpu/arm/arm966.tcl] #mod ****
#mod source [find cpu/arm/arm7tdmi.tcl]
source [find memory.tcl]
source [find mmr_helpers.tcl]
set CHIP_MAKER mediatek # freescale #mod not sure about that
set CHIP_FAMILY mt2502a # mc1322x #mod not sure
set CHIP_NAME mt2502a # mc13224 #mod not sure
set N_RAM 1
set RAM(0,BASE) 0x00400000
set RAM(0,LEN) 0x18000
set RAM(0,HUMAN) "internal SRAM"
set RAM(0,TYPE) "ram"
set RAM(0,RWX) $RWX_RWX
set RAM(0,ACCESS_WIDTH) $ACCESS_WIDTH_ANY
# I AM LAZY... I create 1 region for all MMRs.
set N_MMREGS 1
set MMREGS(0,CHIPSELECT) -1
set MMREGS(0,BASE) 0x80000000
set MMREGS(0,LEN) 0x00030000
set MMREGS(0,HUMAN) "mm-regs"
set MMREGS(0,TYPE) "mmr"
set MMREGS(0,RWX) $RWX_RW
set MMREGS(0,ACCESS_WIDTH) $ACCESS_WIDTH_ANY
set N_XMEM 0
#
######################
# Target configuration
######################
#
set _CHIPNAME mt2502a
set _ENDIAN little
set _CPUTAPID 0x17700f0f #mod 0x1f1f001d
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f -expected-id $_CPUTAPID
#jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x03 -expected-id $_CPUTAPID # from my own file
# reset_config trst_and_srst separate # from my own file
reset_config srst_only
jtag_ntrst_delay 200
#jtag_rclk 0
#mod adapter_khz 2000
adapter_khz 2
set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME arm966 -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm966
#mod target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi
#$_TARGETNAME -variant arm7tdmi
#$_TARGETNAME configure -event reset-init {
# sleep 100
# soft_reset_halt
# mww 0x80000018 0x50000000
# mww 0x80000000 0x00000f00
# mww 0x80000008 0x00000e00
# mww 0x80005000 0x00006013
# # mww 0x80005018 0x017f270f
# # mww 0x80005008 0x55
# mww 0x80005018 0x07A9270F
# mww 0x80005008 0x55
# sleep 100
#}
# Internal sram memory
$_TARGETNAME configure -work-area-virt 0x00408000 -work-area-phys 0x00408000 -work-area-size 0x1000 -work-area-backup 1
proc run {file} {
puts "loading $file into location 0x00400000 and executing..."
soft_reset_halt
load_image $file 0x00400000
resume 0x00400000
}
#flash bank mc1322x 0 0 0 0 $_TARGETNAME
$_TARGETNAME configure -event gdb-attach my_attach_proc
$_TARGETNAME configure -event gdb-attach {
echo "gdb attaching..."
halt
#soft_reset_halt
}
#!/bin/sh
# this file is a simple script to run avatar-pandora
# Set the paths the files on the system.
#PYTHONPATH=/home/william/avatar-pandora/avatar-python QEMU_S2E=/home/william/avatar-pandora/s2e-build/qemu-debug/arm-s2e-softmmu/qemu-system-arm QEMU_ARM=/home/william/avatar-pandora/s2e-build/qemu-release/arm-softmmu/qemu-system-arm UBOOT_BINARY=u-boot python3 test_system.py
export PYTHONPATH=/home/william/avatar-pandora/avatar-python
export QEMU_ARM=/home/william/avatar-pandora/s2e-build/qemu-debug/arm-s2e-softmmu/qemu-system-arm
export UBOOT_BINARY=u-boot
export QEMU_S2E=/home/william/avatar-pandora/s2e-build/qemu-debug/arm-s2e-softmmu/qemu-system-arm
python3 fernvale_avatar.py
#!/bin/sh
# this file is a simple script to run avatar-pandora
# Set the paths the files on the system.
#PYTHONPATH=/home/william/avatar-pandora/avatar-python QEMU_S2E=/home/william/avatar-pandora/s2e-build/qemu-debug/arm-s2e-softmmu/qemu-system-arm QEMU_ARM=/home/william/avatar-pandora/s2e-build/qemu-release/arm-softmmu/qemu-system-arm UBOOT_BINARY=u-boot python3 test_system.py
export PYTHONPATH=/home/william/avatar-pandora/avatar-python
export QEMU_ARM=/home/william/avatar-pandora/s2e-build/qemu-debug/arm-s2e-softmmu/qemu-system-arm
export UBOOT_BINARY=u-boot
export QEMU_S2E=/home/william/avatar-pandora/s2e-build/qemu-debug/arm-s2e-softmmu/qemu-system-arm
python3 qemu_integratorcp_uboot.py
This diff is collapsed.
### board_file.cfg ###
# Chip: MT6202A for fernvale, little endian
set CHIPNAME fernvale
set ENDIAN little
# source target file that does most of the config in init_targets
source [find target/mt2502a.cfg]
### board_file.cfg ###
# Chip: MT6202A for fernvale, little endian
set CHIPNAME fernvale
set ENDIAN little
# source target file that does most of the config in init_targets
source [find target/pxa270.cfg]
#
# Segger J-Link
#
# http://www.segger.com/jlink.html
#
interface jlink
# The serial number can be used to select a specific interface in case more than one
# is connected to the host.
#
# Segger software omits leading zeros in serial number displays,
# OpenOCD requires them.
#
# Example: Select J-Link with serial 123456789
#
# jlink serial 000123456789
#
# Olimex ARM-USB-OCD-H
#
# http://www.olimex.com/dev/arm-usb-ocd-h.html
#
interface ftdi
ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-OCD-H"
ftdi_vid_pid 0x15ba 0x002b
ftdi_layout_init 0x0908 0x0b1b
ftdi_layout_signal nSRST -oe 0x0200
ftdi_layout_signal nTRST -data 0x0100
ftdi_layout_signal LED -data 0x0800
#adapter_khz 1
#!/bin/sh
# Run openocd with jlink.cfg
sudo openocd -f /usr/local/share/openocd/scripts/interface/jlink.cfg -f /usr/local/share/openocd/scripts/board/fernvale.cfg -c "adapter_khz 1" -c "transport select jtag"
\ No newline at end of file
#!/bin/sh
# Run openocd with olimex using ftdi library
sudo openocd -f /usr/local/share/openocd/scripts/interface/ftdi/olimex-arm-usb-ocd-h.cfg -f /usr/local/schare/openocd/scripts/board/fernvale.cfg -c "adapter_khz 1" -c "transport select jtag"
# Boards may override chip names, perhaps based on role,
# but the default should match what the vendor uses
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME mt2502a
}
# ONLY use ENDIAN with targets that can change it.
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
# TAP identifiers may change as chips mature, for example with
# new revision fields (the "3" here). Pick a good default; you
# can pass several such identifiers to the "jtag newtap" command.
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x3f0f0f0f
}
#!/bin/sh
# Run openocd with olimex using ftdi library
sudo openocd -f /usr/local/share/openocd/scripts/interface/ftdi/olimex-arm-usb-ocd-h.cfg -f /usr/local/schare/openocd/scripts/board/linkIT.cfg -c "adapter_khz 1" -c "transport select jtag"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment