Loading and Debugging into SRAM works, FLASH does not

Hi there,

i have following toolchain on ubuntu 8.04 LTS:

  1. binutils 2.17

2-4) gcc 4.1.1

  1. newlib 1.14

  2. gdb 6.8

  3. eclipse cdt - 3.4.0 (genymade)

  4. zylin embedded cdt plugin

  5. openocd SVN977

JTAG: openOCD-USB from embedded-projects.net

Eval-Kit AT91SAM7A3-EK from Atmel.

gdb-init commands:

target remote localhost:3333
monitor reset
monitor sleep 500
monitor poll
monitor soft_reset_halt

# deprecated commands for ram/flash
# monitor arm7_9 sw_bkpts enable
# monitor arm7_9 force_hw_bkpts enable

# WDT_MR, disable watchdog 
monitor mww 0xFFFFFD44 0x00008000

# RSTC_MR, enable user reset
monitor mww 0xfffffd08 0xa5000001

# CKGR_MOR
monitor mww 0xFFFFFC20 0x00000601
monitor sleep 10

# CKGR_PLLR
monitor mww 0xFFFFFC2C 0x00481c0e
monitor sleep 10

# PMC_MCKR
monitor mww 0xFFFFFC30 0x00000007
monitor sleep 10

# PMC_IER
monitor mww 0xFFFFFF60 0x00480100
monitor sleep 100

# needed for gdb 6.8 and higher
set mem inaccessible-by-default off

load
break main
continue

All went fine until i reinstalled the whole ubuntu system and the toolchain.

Now:

Loading the binary into the SRAM works fine, and also debugging works fine again. All done with arm-elf-gdb and openOCD in eclipse.

But Loading the binary into the FLASH doesn’t work at all. The old program, which is already on the flash, doesn’t even get erased.

I always get the message:

```
Unable to set 32 bit software breakpoint at address 001000b0 - check that memory is read/writable


Here is the whole output in eclipse:

target remote localhost:3333
warning: Can not parse XML memory map; XML support was disabled at compile time
0x00100070 in resetHandler ()
monitor reset
JTAG device found: 0x3f0f0f0f (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x3)
monitor sleep 500
monitor poll
target state: running
monitor soft_reset_halt
requesting target halt and executing a soft reset
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x00000000
monitor mww 0xFFFFFD44 0x00008000
monitor mww 0xfffffd08 0xa5000001
monitor mww 0xFFFFFC20 0x00000601
monitor sleep 10
monitor mww 0xFFFFFC2C 0x00481c0e
monitor sleep 10
monitor mww 0xFFFFFC30 0x00000007
monitor sleep 10
monitor mww 0xFFFFFF60 0x00480100
monitor sleep 100
set mem inaccessible-by-default off
load
Loading section .fixed, size 0x6894 lma 0x100000
Loading section .relocate, size 0x618 lma 0x106894
Start address 0x100000, load size 28332
Transfer rate: 26 KB/sec, 9444 bytes/write.
break main
Breakpoint 1 at 0x1000b0: file main.c, line 37.
continue
Unable to set 32 bit software breakpoint at address 001000b0 - check that memory is read/writable


I tried following things without success:

- an other uC-board.

- different projects

- old workspace-backup, which contains the whole code needed by the application - even the Atmel Lib. 

When i was reinstalling the whole system, i used for each tool the same version even the openOCD is the same SVN-release (SVN977). 

Has anyone an idea what is wrong there?

Thanks for all hints!

greetz, griffin27

does really nobody have any idea for me.

i still have the problem.

which part of the tool chain fails?

is it openocd or gdb?

EDIT: what’s about the

warning: Can not parse XML memory map; XML support was disabled at compile time

(output of gdb in the eclipse-console)