Command erase not found?

Hi!

I am working on a project which has ARM 926EJS as target platform. I am using Olimex ARM-USB-OCD for flash download/upload. The host platform is OPENSUSE LINUX 10.3.

Here are the scripts:

G2N 30-08-2007

daemon configuration

telnet_port 4444

gdb_port 3333

interface

interface ft2232

#ft2232_device_desc “Olimex OpenOCD JTAG”

ft2232_layout olimex-jtag

ft2232_vid_pid 0x15ba 0x0003

jtag nTRST and nSRST delay

#jtag_nsrst_delay 250

#jtag_ntrst_delay 250

use combined reset scheme

reset_config srst_only

JTAG speed (0 full speed)

jtag_speed 0

jtag scan chain

jtag_device 4 0x1 0x0 0xe

target configuration

daemon_startup reset

target

target arm926ejs little run_and_init 0 arm926ejs

script

target_script 0 reset “/home/SpidPts/jtag/basic_init.ocd”

Working area (SRAM)

working_area 0 0x0 0x1000 nobackup

run_and_halt_time 0 30

flash configuration

flash bank <chip_width> <bus_width> [driver_options …]

#flash bank cfi 0x0E000000 0x800000 2 2 0

flash bank cfi 0x0E000000 0x400000 2 2 0

The basic_init.ocd is:

OpenOCD script file

G2N 30-08-2007

stop processor

reset_halt

wait_halt

memory configuration

FLASH : 0x0E000000

RAM : 0x00000000

SDRAM : 0x70000000

SRAM/flash controler base @ : 0x14000000.

remap FLASH

mww 0x14000004 0x0F000002

mww 0x14000008 0x0F000002

mww 0x1400000C 0x0F000002

mww 0x14000010 0x0F000002

mww 0x14000014 0x0F000002

mww 0x14000018 0x0F000002

mww 0x1400001C 0x0E00FFFD

mww 0x14000000 0x00000002

SDRAM configuration

SDRAM controler base @ : 0x18000000.

mww 0x18000000 0x1 # MPMCControl

mww 0x18000008 0x0 # MPMCConfig

mww 0x18000020 0x3 # MPMCDynamicControl

mww 0x18000024 0x5D # MPMCDynamicRefresh

mww 0x18000028 0x1 # MPMCDynamicReadConfig

mww 0x18000030 0x1 # MPMCDynamictRP

mww 0x18000034 0x4 # MPMCDynamictRAS

mww 0x18000038 0x6 # MPMCDynamictSREX

mww 0x1800003C 0x6 # MPMCDynamictAPR

mww 0x18000040 0x4 # MPMCDynamictDAL

mww 0x18000044 0x1 # MPMCDynamictWR

mww 0x18000048 0x6 # MPMCDynamictRC

mww 0x1800004C 0x6 # MPMCDynamictRFC

mww 0x18000050 0x1F # MPMCDynamictXSR

mww 0x18000054 0x1 # MPMCDynamictRRD

mww 0x18000058 0xF # MPMCDynamictMRD

mww 0x18000080 0x0 # MPMCStaticExtendedWait

mww 0x18000100 0x84480 # MPMCDynamicConfig0

mww 0x18000104 0x203 # MPMCDynamicRasCas0

mww 0x18000120 0x84480 # MPMCDynamicConfig1

mww 0x18000124 0x203 # MPMCDynamicRasCas1

mww 0x18000140 0x84480 # MPMCDynamicConfig2

mww 0x18000144 0x203 # MPMCDynamicRasCas2

mww 0x18000160 0x84480 # MPMCDynamicConfig3

mww 0x18000164 0x203 # MPMCDynamicRasCas3

mww 0x18000200 0x0 # MPMCStaticConfig0

mww 0x18000204 0x0 # MPMCStaticWaitWen0

mww 0x18000208 0x0 # MPMCStaticWaitOen0

mww 0x1800020C 0x1F # MPMCStaticWaitRd0

mww 0x18000210 0x1F # MPMCStaticWaitPage0

mww 0x18000214 0x1F # MPMCStaticWaitWr0

mww 0x18000218 0xF # MPMCStaticWaitTurn0

mww 0x18000220 0x0 # MPMCStaticConfig1

mww 0x18000224 0x0 # MPMCStaticWaitWen1

mww 0x18000228 0x0 # MPMCStaticWaitOen1

mww 0x1800022C 0x1F # MPMCStaticWaitRd1

mww 0x18000230 0x1F # MPMCStaticWaitPage1

mww 0x18000234 0x1F # MPMCStaticWaitWr1

mww 0x18000238 0xF # MPMCStaticWaitTurn1

mww 0x18000240 0x0 # MPMCStaticConfig2

mww 0x18000244 0x0 # MPMCStaticWaitWen2

mww 0x18000248 0x0 # MPMCStaticWaitOen2

mww 0x1800024C 0x1F # MPMCStaticWaitRd2

mww 0x18000250 0x1F # MPMCStaticWaitPage2

mww 0x18000254 0x1F # MPMCStaticWaitWr2

mww 0x18000258 0xF # MPMCStaticWaitTurn2

mww 0x18000260 0x0 # MPMCStaticConfig3

mww 0x18000264 0x0 # MPMCStaticWaitWen3

mww 0x18000268 0x0 # MPMCStaticWaitOen3

mww 0x1800026C 0x1F # MPMCStaticWaitRd3

mww 0x18000270 0x1F # MPMCStaticWaitPage3

mww 0x18000274 0x1F # MPMCStaticWaitWr3

mww 0x18000278 0xF # MPMCStaticWaitTurn3

mww 0x18000F00 0x0 # MPMCITCR

mww 0x18000F20 0x0 # MPMCITIP

mww 0x18000F40 0x0 # MPMCITOP

disable interrupts

reg 47 0x00000000

reg 48 0x0000001f

reg 49 0x00000000

reg 50 0xffffffff

#reg 51 0x00000100

reg 52 0x000000f7

Flash probe

flash probe 0

After running these scripts I am getting:

Open On-Chip Debugger 1.0 (2008-03-13-09:30) svn:506

$URL: http://svn.berlios.de/svnroot/repos/ope … /openocd.c $

Info: jtag.c:1327 jtag_examine_chain(): JTAG device found: 0x0792606d (Manufacturer: 0x036, Part: 0x7926, Version: 0x0)

Info: target.c:239 target_init_handler(): executing reset script ‘/home/SpidPts/jtag/basic_init.ocd’

Info: options.c:50 configuration_output_handler(): Command reset_halt not found

Info: options.c:50 configuration_output_handler(): watch 1 addr value (/32): 0x00000000

Info: options.c:50 configuration_output_handler(): watch 1 addr mask (/32): 0x0000001f

Info: options.c:50 configuration_output_handler(): watch 1 data value (/32): 0x00000000

Info: options.c:50 configuration_output_handler(): watch 1 data mask (/32): 0xffffffff

Info: options.c:50 configuration_output_handler(): watch 1 control mask (/32): 0x000000f7

Info: options.c:50 configuration_output_handler(): flash ‘cfi’ found at 0x0e000000

After that, I am able to connect to the target by “telnet localhost 4444”, and the command:

flash info 0

Is recognised and it gives me the following result:

flash info 0

#0: cfi at 0x0e000000, size 0x00400000, buswidth 2, chipwidth 2

#0: 0x00000000 (0x10000 64kB) erase state unknown, protection state unknown

#1: 0x00010000 (0x10000 64kB) erase state unknown, protection state unknown

#2: 0x00020000 (0x10000 64kB) erase state unknown, protection state unknown

#3: 0x00030000 (0x10000 64kB) erase state unknown, protection state unknown

#4: 0x00040000 (0x10000 64kB) erase state unknown, protection state unknown

#5: 0x00050000 (0x10000 64kB) erase state unknown, protection state unknown

#6: 0x00060000 (0x10000 64kB) erase state unknown, protection state unknown

#7: 0x00070000 (0x10000 64kB) erase state unknown, protection state unknown

#8: 0x00080000 (0x10000 64kB) erase state unknown, protection state unknown

#9: 0x00090000 (0x10000 64kB) erase state unknown, protection state unknown

#10: 0x000a0000 (0x10000 64kB) erase state unknown, protection state unknown

#11: 0x000b0000 (0x10000 64kB) erase state unknown, protection state unknown

#12: 0x000c0000 (0x10000 64kB) erase state unknown, protection state unknown

#13: 0x000d0000 (0x10000 64kB) erase state unknown, protection state unknown

#14: 0x000e0000 (0x10000 64kB) erase state unknown, protection state unknown

#15: 0x000f0000 (0x10000 64kB) erase state unknown, protection state unknown

#16: 0x00100000 (0x10000 64kB) erase state unknown, protection state unknown

#17: 0x00110000 (0x10000 64kB) erase state unknown, protection state unknown

#18: 0x00120000 (0x10000 64kB) erase state unknown, protection state unknown

#19: 0x00130000 (0x10000 64kB) erase state unknown, protection state unknown

#20: 0x00140000 (0x10000 64kB) erase state unknown, protection state unknown

#21: 0x00150000 (0x10000 64kB) erase state unknown, protection state unknown

#22: 0x00160000 (0x10000 64kB) erase state unknown, protection state unknown

#23: 0x00170000 (0x10000 64kB) erase state unknown, protection state unknown

#24: 0x00180000 (0x10000 64kB) erase state unknown, protection state unknown

#25: 0x00190000 (0x10000 64kB) erase state unknown, protection state unknown

#26: 0x001a0000 (0x10000 64kB) erase state unknown, protection state unknown

#27: 0x001b0000 (0x10000 64kB) erase state unknown, protection state unknown

#28: 0x001c0000 (0x10000 64kB) erase state unknown, protection state unknown

#29: 0x001d0000 (0x10000 64kB) erase state unknown, protection state unknown

#30: 0x001e0000 (0x10000 64kB) erase state unknown, protection state unknown

#31: 0x001f0000 (0x10000 64kB) erase state unknown, protection state unknown

#32: 0x00200000 (0x10000 64kB) erase state unknown, protection state unknown

#33: 0x00210000 (0x10000 64kB) erase state unknown, protection state unknown

#34: 0x00220000 (0x10000 64kB) erase state unknown, protection state unknown

#35: 0x00230000 (0x10000 64kB) erase state unknown, protection state unknown

#36: 0x00240000 (0x10000 64kB) erase state unknown, protection state unknown

#37: 0x00250000 (0x10000 64kB) erase state unknown, protection state unknown

#38: 0x00260000 (0x10000 64kB) erase state unknown, protection state unknown

#39: 0x00270000 (0x10000 64kB) erase state unknown, protection state unknown

#40: 0x00280000 (0x10000 64kB) erase state unknown, protection state unknown

#41: 0x00290000 (0x10000 64kB) erase state unknown, protection state unknown

#42: 0x002a0000 (0x10000 64kB) erase state unknown, protection state unknown

#43: 0x002b0000 (0x10000 64kB) erase state unknown, protection state unknown

#44: 0x002c0000 (0x10000 64kB) erase state unknown, protection state unknown

#45: 0x002d0000 (0x10000 64kB) erase state unknown, protection state unknown

#46: 0x002e0000 (0x10000 64kB) erase state unknown, protection state unknown

#47: 0x002f0000 (0x10000 64kB) erase state unknown, protection state unknown

#48: 0x00300000 (0x10000 64kB) erase state unknown, protection state unknown

#49: 0x00310000 (0x10000 64kB) erase state unknown, protection state unknown

#50: 0x00320000 (0x10000 64kB) erase state unknown, protection state unknown

#51: 0x00330000 (0x10000 64kB) erase state unknown, protection state unknown

#52: 0x00340000 (0x10000 64kB) erase state unknown, protection state unknown

#53: 0x00350000 (0x10000 64kB) erase state unknown, protection state unknown

#54: 0x00360000 (0x10000 64kB) erase state unknown, protection state unknown

#55: 0x00370000 (0x10000 64kB) erase state unknown, protection state unknown

#56: 0x00380000 (0x10000 64kB) erase state unknown, protection state unknown

#57: 0x00390000 (0x10000 64kB) erase state unknown, protection state unknown

#58: 0x003a0000 (0x10000 64kB) erase state unknown, protection state unknown

#59: 0x003b0000 (0x10000 64kB) erase state unknown, protection state unknown

#60: 0x003c0000 (0x10000 64kB) erase state unknown, protection state unknown

#61: 0x003d0000 (0x10000 64kB) erase state unknown, protection state unknown

#62: 0x003e0000 (0x10000 64kB) erase state unknown, protection state unknown

#63: 0x003f0000 (0x2000 8kB) erase state unknown, protection state unknown

#64: 0x003f2000 (0x2000 8kB) erase state unknown, protection state unknown

#65: 0x003f4000 (0x2000 8kB) erase state unknown, protection state unknown

#66: 0x003f6000 (0x2000 8kB) erase state unknown, protection state unknown

#67: 0x003f8000 (0x2000 8kB) erase state unknown, protection state unknown

#68: 0x003fa000 (0x2000 8kB) erase state unknown, protection state unknown

#69: 0x003fc000 (0x2000 8kB) erase state unknown, protection state unknown

#70: 0x003fe000 (0x2000 8kB) erase state unknown, protection state unknown

cfi information:

mfr: 0x00c2, id:0x22a7

qry: ‘QRY’, pri_id: 0x0002, pri_addr: 0x0040, alt_id: 0x0000, alt_addr: 0x0000

Vcc min: 2.7, Vcc max: 3.6, Vpp min: 0.0, Vpp max: 0.0

typ. word write timeout: 16, typ. buf write timeout: 1, typ. block erase timeout: 1024, typ. chip erase timeout: 1

max. word write timeout: 512, max. buf write timeout: 1, max. block erase timeout: 16384, max. chip erase timeout: 1

size: 0x400000, interface desc: 2, max buffer write size: 0

Spansion primary algorithm extend information:

pri: ‘PRI’, version: 1.1

Silicon Rev.: 0x0, Address Sensitive unlock: 0x0

Erase Suspend: 0x2, Sector Protect: 0x4

VppMin: 11.5, VppMax: 12.5

But, command “flash erase 0 0 5” is not recognised for some reason.

Is there a problem with openocd compilation?

I configured the source with:

./configure --enable-ft2232-libftdi

But MAKE failed, when I was getting some errors during compilation process regarding USB related commands.

Then I reconfigured it with

./configure --enable-ft2232-libftdi --enable-usbprog

and the “make” was successful.

However, I am not able to use JTAG interface.

Can anybody help me?

pedjasns:
But, command “flash erase 0 0 5” is not recognised for some reason.

Is there a problem with openocd compilation?

?

The syntax has changed: viewtopic.php?t=9933&sid=ea3295f5752140 … 39696f7dbc