Hello,

On Mon, Jan 28, 2019 at 08:51:32PM -0000, Andres Vahter wrote:
> I tried to flash atsame53j18 with openocd 0.10.0. I used following .cfg file:
...
> source [find target/atsamv.cfg]

Are you sure samv flash driver supports your target controller?

> # this disables Failed to read memory at 0x400e0944
> # if program is not following
> gdb_memory_map disable

This just makes gdb unaware of the flash region mapping so...

> (gdb) load some.elf

... this makes GDB use regular "write to memory" commands instead of
"write to flash".

Are you saying that in this case the target flash memory is actually
modified?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com


---

** [tickets:#224] samde53 openocd 0.10.0 Error: Failed to read memory at 
0x400e0944**

**Status:** new
**Milestone:** 0.9.0
**Created:** Mon Jan 28, 2019 08:51 PM UTC by Andres Vahter
**Last Updated:** Mon Jan 28, 2019 08:51 PM UTC
**Owner:** nobody


I tried to flash atsame53j18 with openocd 0.10.0. I used following .cfg file:
~~~
# Atmel-ICE JTAG/SWD in-circuit debugger.
source [find interface/cmsis-dap.cfg]

transport select swd

# Chip info
set CHIPNAME at91same53j18

source [find target/atsamv.cfg]

# this disables Failed to read memory at 0x400e0944
# if program is not following
gdb_memory_map disable

reset_config srst_only
~~~

There is whole command with following output.
~~~
openocd -f myopenocd.cfg -c "program build/$(PROJECT).elf verify reset exit"

Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
adapter speed: 4000 kHz
adapter_nsrst_delay: 100
adapter speed: 1800 kHz
cortex_m reset_config sysresetreq
Info : flash bank command
none separate
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: JTAG Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 01.27.0082
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1800 kHz
Info : SWD DPIDR 0x2ba01477
Info : at91same53j18.cpu: hardware has 6 breakpoints, 4 watchpoints
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000002d0 msp: 0x2001b2e8
** Programming Started **
auto erase enabled
Info : SWD DPIDR 0x2ba01477
Error: Failed to read memory at 0x400e0944
Error: auto_probe failed
** Programming Failed **
shutdown command invoked

make: *** [upload] Error 1
~~~

It is possible to load elf to the board if I do this and then attach arm gdb:
~~~
>>openocd -f myopenocd.cfg

>>arm-none-eabi-gdb some.elf
(gdb) load some.elf
(gdb) run
~~~

However as soon as flash info is requested it fails:
~~~
(gdb) monitor flash list
{name atsamv base 4194304 size 0 bus_width 0 chip_width 0}
(gdb) monitor flash info 0
SWD DPIDR 0x2ba01477
Failed to read memory at 0x400e0944
auto_probe failed
~~~

What might cause this behaviour?


---

Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to