SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By andreas
#17494
Hi,

I have compiled openocd rev. 88 on Mac OS X and try to flash a AT91SAM7S256. I get a connection to the processor, but flash writing fails with "unknown error" and the result from "flash info 0" looks weird:
Code: Select all
> flash info 0 
#1: at91sam7 at 0x00000000, size 0x00000000, buswidth 0, chipwidth 0

at91sam7 information:
cidr: 0x40090d27, arch: 0x0000, eproc: [b]ARM946-E[/b], version:0x007,  flashsize: 0xffffffff
master clock(estimated): 32kHz 
securitybit: 0, nvmbits: 0x0
(if only it were a 946-E...)

My config:
Code: Select all
telnet_port 4444
gdb_port 3333
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x0003
jtag_speed 5
reset_config none
jtag_device 4 0x1 0xf 0xe
daemon_startup reset
target arm7tdmi little run_and_init 0 arm7tdmi
run_and_halt_time 0 30
working_area 0 0x40000000 0x4000 nobackup
flash bank at91sam7 0 0 0 0 0
Debug log of "flash info":
http://andreas-s.net/openocd.log.txt

Any ideas?
By Dominic
#17516
OpenOCD is still broken on big-endian hosts.

Thank you for your log file, this is going to help me identify problems with endianess.

Regards,

Dominic
By andreas
#17517
Please let me know if I can do anything else to help.
By Dominic
#18196
Hello Andreas,

SVN revision 92 should support big-endian hosts, at least I've fixed all the issues I saw while going through the code. Would be nice if you could give the current code a test, and reply back if you find any problems.

Regards,

Dominic
By andreas
#19002
Hi,

I tried rev. 98 today. Flashing kind of works, but is very slow and it often fails with this error message:

Debug: at91sam7.c:268 at91sam7_flash_command(): Flash command: 0x5a001601, pagenumber:
Debug: arm7_9_common.c:1649 arm7_9_read_memory(): address: 0xffffff68, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:156 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:156 embeddedice_read_reg_w_check(): 1
Debug: at91sam7.c:243 at91sam7_wait_status_busy(): status: 0x1
Debug: at91sam7.c:660 at91sam7_write(): Flash command: 0x28, pagenumber:
Debug: arm7_9_common.c:1795 arm7_9_write_memory(): address: 0x00100000, size: 0x00000004, count: 0x00000040
Debug: embeddedice.c:252 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:156 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:156 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:156 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:156 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:156 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:156 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:156 embeddedice_read_reg_w_check(): 1
Error: ft2232.c:364 ft2232_send_and_recv(): ft2232_expect_read (16) != ft2232_buffer_size (0) (0 retries)