mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
76 lines
1.4 KiB
INI
76 lines
1.4 KiB
INI
######
|
|
# parts taken from Martin Thomas
|
|
# http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/openocd_intro/index.html
|
|
#
|
|
|
|
set CPUTAPID 0x4f1f0f0f
|
|
jtag_speed 100
|
|
|
|
source [find cpu/lpc2387/tools/openocd-lpc2387.cfg]
|
|
|
|
fast disable
|
|
|
|
#
|
|
# scipts/macros/user commands - this is TCL (variant JIM):
|
|
#
|
|
proc mt_internal_rc {} {
|
|
jtag_khz 100
|
|
reset run
|
|
sleep 100
|
|
reset
|
|
halt
|
|
wait_halt 2
|
|
# PLL disconnect PLLCON
|
|
mww 0xE01FC080 0x01
|
|
mww 0xE01FC08C 0xAA
|
|
mww 0xE01FC08C 0x55
|
|
# PLL disable PLLCON
|
|
mww 0xE01FC080 0x00
|
|
mww 0xE01FC08C 0xAA
|
|
mww 0xE01FC08C 0x55
|
|
# no prescaler CCLKCFG
|
|
mww 0xE01FC104 0x00
|
|
# internal RC CLKSRCSEL
|
|
mww 0xE01FC10C 0x00
|
|
#### main oscil. CLKSRCSEL
|
|
#### mww 0xE01FC10C 0x01
|
|
# remap to internal flash
|
|
mww 0xE01FC040 0x01
|
|
sleep 100
|
|
jtag_khz 500
|
|
flash probe 0
|
|
}
|
|
|
|
proc mt_flash_bin {IMGFILE OFFSET} {
|
|
mt_internal_rc
|
|
flash write_image erase $IMGFILE $OFFSET
|
|
sleep 100
|
|
verify_image $IMGFILE $OFFSET
|
|
sleep 100
|
|
}
|
|
|
|
proc mt_flash_v {IMGFILE} {
|
|
mt_internal_rc
|
|
flash write_image erase $IMGFILE
|
|
sleep 100
|
|
verify_image $IMGFILE
|
|
sleep 100
|
|
}
|
|
|
|
proc mt_flash {IMGFILE} {
|
|
mt_internal_rc
|
|
flash write_image erase $IMGFILE
|
|
}
|
|
|
|
flash bank lpc2000 0x0 0x7d000 0 0 0 lpc2000_v2 4000 calc_checksum
|
|
|
|
arm7_9 dcc_downloads enable
|
|
|
|
gdb_flash_program enable
|
|
|
|
init
|
|
|
|
fast enable
|
|
jtag_khz 500
|
|
debug_level 1
|