From: Uwe H. <uw...@he...> - 2012-04-30 15:10:35
|
Hi, I've opened a Linksys BEFVP41 router recently and attached a JTAG interface to the Samsung S3C2510A01 in the device. http://www.randomprojects.org/wiki/Linksys_BEFVP41 I'm not so sure how far the OpenOCD support for ARM940T and S3C2510A01 specifically is, though. Can this work reliably? Which parts would work, and what would not work? I made a test .cfg file for now using arm920t or arm9tdmi, but that's not really technically correct. Using "-variant arm940t" is also useless, as far as I can see unknown variants are ignored, i.e. I could also write "-variant foo" with the same effect, right? if { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME } else { set _CHIPNAME s3c2510a } if { [info exists ENDIAN] } { set _ENDIAN $ENDIAN } else { set _ENDIAN little } if { [info exists CPUTAPID] } { set _CPUTAPID $CPUTAPID } else { set _CPUTAPID 0x1094009d } jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID set _TARGETNAME $_CHIPNAME.cpu # TODO: It's an ARM940T really. # target create $_TARGETNAME arm920t -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm940t target create $_TARGETNAME arm9tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm940t # $_TARGETNAME configure -work-area-phys 0x200000 -work-area-size 0x4000 -work-area-backup 1 $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 1 reset_config trst_and_srst combined # External Macronix MX29LV800BBTC-90 (NOR flash) chip. flash bank $_CHIPNAME.extnorflash cfi 0x00000000 0x100000 2 2 $_TARGETNAME init reset halt # flash probe 0 I'm able to get some good-looking output with the above config: > scan_chain TapName Enabled IdCode Expected IrLen IrCap IrMask -- ------------------- -------- ---------- ---------- ----- ----- ------ 0 s3c2510a.cpu Y 0x1094009d 0x1094009d 4 0x01 0x0f > targets TargetName Type Endian TapName State -- ------------------ ---------- ------ ------------------ ------------ 0* s3c2510a.cpu arm920t little s3c2510a.cpu halted > flash probe 0 Flash Manufacturer/Device: 0x00c2 0x225b flash 'cfi' found at 0x00000000 > dump_image linksys_befvp41_nor.dd 0x00000000 0x100000 dumped 1048576 bytes in 46.292549s (22.120 KiB/s) The dumped NOR contents _seem_ to be non-garbage too, but how can I be sure that everything really works as expected for ARM940T / S3C2510A01? I'm a bit reluctant to submit a .cfg file which is potentially broken in subtle ways I cannot see right now. Does anyone have some insights as to how far the OpenOCD internals would work for ARM940T, and/or which parts would need fixing? Thanks, Uwe. -- http://hermann-uwe.de | http://sigrok.org http://randomprojects.org | http://unmaintained-free-software.org |