Debug in Ram with Yagarto - help needed

Hi

I use yagarto with an Amonteg JTAGTiny jtag adapter.

I want to debug with an ADUC7020 MCU from Analog.

I have problems to set up OpenOCD.

I adapted the code from J. Lynchs turotial for an AT91SAM7S.

In this tutorial the following OpenOCD config and commands are used:

config:

#define our ports
telnet_port 4444
gdb_port 3333

#commands specific to the Amontec JTAGKey
interface ft2232
ft2232_device_desc "Amontec JTAGkey A"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0xcff8
jtag_speed 2
jtag_nsrst_delay 200
jtag_ntrst_delay 200

#reset_config <signals> [combination] [trst_type] [srst_type]
reset_config srst_only srst_pulls_trst

#jtag_device <IR length> <IR capture> <IR mask> <IDCODE instruction>
jtag_device 4 0x1 0xf 0xe

#daemon_startup <'attach'|'reset'>
daemon_startup reset

#target <type> <endianess> <reset_mode> <jtag#> [variant]
target arm7tdmi little run_and_halt 0 arm7tdmi

#run_and_halt_time <target#> <time_in_ms>
run_and_halt_time 0 30

I use the same configuration for the ADUC7020.

commands:

target  remote  localhost:3333
monitor  soft_reset_halt
monitor  mww  0xFFFF0220 0x01
monitor reg pc 0x00000000
monitor  arm7_9  sw_bkpts  enable
break  main
load
continue

I took a look at the ADUC7020 manual.

The SRam has to been mapped to address 0x00000000.

The AT91SAM7S uses the following command: monitor mww 0xFFFFFF00 0x01.

The ADUC manual tells Register REMAP has to be set to 1 to remap SRAM

to address 0x00000000. REMAP has address 0xFFFF0220. The correct command

for the ADUC7020 is than; monitor mww mww 0xFFFF0220 0x01.

Running OpenOCD with this setup will return the following messages:

Info:    openocd.c:93 main(): Open On-Chip Debugger (2007-12-15 15:00 CET) svn: 231
Info:    openocd.c:94 main(): $URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
Info:    jtag.c:1291 jtag_examine_chain(): JTAG device found: 0x3f0f0f0f (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x3)
Warning: arm7_9_common.c:742 arm7_9_assert_reset(): srst resets test logic, too
Warning: arm7_9_common.c:941 arm7_9_halt(): target was already halted
Info:    server.c:67 add_connection(): accepted 'gdb' connection from 0
Warning: arm7_9_common.c:2074 arm7_9_write_memory(): memory write caused data abort (address: 0xffff0220, size: 0x4, count: 0x1)
Warning: arm7_9_common.c:2074 arm7_9_write_memory(): memory write caused data abort (address: 0x00080000, size: 0x4, count: 0x5f)
Warning: arm7_9_common.c:2074 arm7_9_write_memory(): memory write caused data abort (address: 0x000808ac, size: 0x4, count: 0x1)

For any reason writing to adress 0xfff0220 fails. For that reason the SRam

is not mpped to adress 0x00000000. In default setup 0x00000000 is mapped

to flash, address 0x00080000.

Does anybody have an idea why writing to 0xffff0220 might fail and how I

can fix it?

Thank you for your help and merry chrismas,

Tilo