From: Leon W. <leo...@gm...> - 2007-09-11 17:25:30
|
Hello, I am using a IXP420 processor with a 16-bit 28F128J3D75 Intel CFI Flash device, in 16-bit mode. The processor runs in big-endian mode. I use a BDI2000 under Linux, but am now setting up OpenOCD under Cygwin, for production purposes at first instance. Using OpenOCD from source, under CygWin under Windows XP (32-bit little-endian), with a Amontec JTAGkey I cannot get the CFI flash detection to work. I have tried the trunk (rev 206), xscale (rev 118) and xscale-ixp-be (rev 179) branches. Relevant piece of my config: --- jtag_device 7 0x01 0x7f 0x7e #target target xscale big reset_halt 0 ixp42x xscale debug_handler 0 0xfe000800 xscale cache_clean_address 0 0xfffe0000 #flash #flash bank <type> <base> <size> <chip-width> <bus-width> <target#> #chip and bus-width in byte flash bank cfi 0x50000000 0x01000000 2 2 0 --- I think OpenOCD does not cover all 8-bit / 16-bit cases correctly, for CFI querying, as described in Intel's Application Note 646 (Google for "Intel AP-646"). # enable write access to flash chip select mww 0xc4000000 0xbfff3c42 flash probe 0 probing failed for flash bank '#0' at 0x50000000 The log shows: Debug: xscale.c:1965 xscale_write_memory(): address: 0xc4000000, size: 0x00000004, count: 0x00000001 Debug: xscale.c:1965 xscale_write_memory(): address: 0x50000aaa, size: 0x00000002, count: 0x00000001 Debug: xscale.c:1965 xscale_write_memory(): address: 0x50000554, size: 0x00000002, count: 0x00000001 Debug: xscale.c:1965 xscale_write_memory(): address: 0x50000aaa, size: 0x00000002, count: 0x00000001 Debug: xscale.c:1895 xscale_read_memory(): address: 0x50000000, size: 0x00000002, count: 0x00000001 Debug: target.c:784 target_read_u16(): address: 0x50000000, value: 0x0018 Debug: xscale.c:1895 xscale_read_memory(): address: 0x50000002, size: 0x00000002, count: 0x00000001 Debug: target.c:784 target_read_u16(): address: 0x50000002, value: 0x0089 Debug: xscale.c:1965 xscale_write_memory(): address: 0x50000000, size: 0x00000002, count: 0x00000001 Debug: xscale.c:1965 xscale_write_memory(): address: 0x50000000, size: 0x00000002, count: 0x00000001 Debug: xscale.c:1965 xscale_write_memory(): address: 0x500000aa, size: 0x00000002, count: 0x00000001 Debug: xscale.c:1895 xscale_read_memory(): address: 0x50000020, size: 0x00000002, count: 0x00000001 Debug: xscale.c:1895 xscale_read_memory(): address: 0x50000022, size: 0x00000002, count: 0x00000001 Debug: xscale.c:1895 xscale_read_memory(): address: 0x50000024, size: 0x00000002, count: 0x00000001 Debug: cfi.c:1692 cfi_probe(): CFI qry returned: 0x52 0x51 0x01 Debug: xscale.c:1965 xscale_write_memory(): address: 0x50000000, size: 0x00000002, count: 0x00000001 Debug: xscale.c:1965 xscale_write_memory(): address: 0x50000000, size: 0x00000002, count: 0x00000001 I tried to manually probe the device as follows: # enable write access to flash chip select mww 0xc4000000 0xbfff3c42 # query mwh 0x500000aa 0x0098 # read QRY using half-words (half word = 16-bit) mdh 0x50000020 4 0052 0051 0001 0059 R Q 0x01 Y The above definitely seems wrong. # read QRY using words (32-bit = word) mdw 0x50000020 4 0051 0052 0059 0001 Q R Y 0x01 The half-word reads are re-ordered, the word reads are correctly ordered. Everything works fine under the BDI2000, as a reference: Core#0>mmh 0x500000aa 0x9898 Core#0>mdh 0x50000020 4 50000020 : 0x0051 81 .Q 50000022 : 0x0052 82 .R 50000024 : 0x0059 89 .Y 50000026 : 0x0001 1 .. Core#0>mmh 0x500000aa 0x9898 Core#0>md 0x50000020 4 50000020 : 0x00510052 5308498 .Q.R 50000024 : 0x00590001 5832705 .Y.. 50000028 : 0x00000031 49 ...1 5000002c : 0x00000000 0 .... First, what OpenOCD code base should I take for my setup, and what might go wrong here? When viewing the source code of target/xscale.c:xscale_write_memory() I see a relevant part of the code commented out. Please enlighten me :-) Regards, -- Leon |