X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=tcl%2Ftarget%2Flpc2378.cfg;h=21fdd1b4ade83f3ef24c6ec19b9f69e49814a567;hb=4bd2b30d5bae59b751f8eb30815cf330faae2a6f;hp=aa3fad26c4c3919b9f5f8013fb299ae94e5337ac;hpb=f86137066a6b42c46c457c9837a8015990bf71e6;p=fw%2Fopenocd diff --git a/tcl/target/lpc2378.cfg b/tcl/target/lpc2378.cfg index aa3fad26c..21fdd1b4a 100644 --- a/tcl/target/lpc2378.cfg +++ b/tcl/target/lpc2378.cfg @@ -6,12 +6,6 @@ if { [info exists CHIPNAME] } { set _CHIPNAME lpc2378 } -if { [info exists ENDIAN] } { - set _ENDIAN $ENDIAN -} else { - set _ENDIAN little -} - if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { @@ -19,16 +13,15 @@ if { [info exists CPUTAPID ] } { } #delays on reset lines -jtag_nsrst_delay 200 +adapter_nsrst_delay 200 jtag_ntrst_delay 200 -# LPC2000 -> SRST causes TRST -reset_config trst_and_srst srst_pulls_trst +reset_config trst_and_srst jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4 +target create $_TARGETNAME arm7tdmi -chain-position $_TARGETNAME # LPC2378 has 32kB of SRAM on its main system bus (so-called Local On-Chip SRAM) $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x8000 -work-area-backup 0 @@ -42,8 +35,9 @@ $_TARGETNAME configure -event reset-init { # LPC2378 has 512kB of FLASH, but upper 8kB are occupied by bootloader. # After reset the chip uses its internal 4MHz RC oscillator -#flash bank lpc2000 0 0 -flash bank lpc2000 0x0 0x0007D000 0 0 $_TARGETNAME lpc2000_v2 4000 calc_checksum +# flash bank lpc2000 0 0 [calc checksum] +set _FLASHNAME $_CHIPNAME.flash +flash bank $_FLASHNAME lpc2000 0x0 0x0007D000 0 0 $_TARGETNAME lpc2000_v2 4000 calc_checksum # 4MHz / 6 = 666kHz, so use 500 -jtag_khz 500 +adapter_khz 500