I updated to svn 383 today and I’m now having problems
with flash erase and write_image. The first problem was
a segmentation fault in log_printfv in log.c. I traced this
to the callback being removed from gdb_put_packet_inner.
So, I applied the following fix for the segv:
Index: log.c
===================================================================
— log.c (revision 383)
+++ log.c (working copy)
@@ -84,8 +84,12 @@
/* Never forward LOG_DEBUG, too verbose and they can be found in the log if need be */
if (level <= LOG_INFO)
{
- for (cb = log_callbacks; cb; cb = cb->next)
-
log_callback_t *next;
-
for (cb = log_callbacks; cb; cb = next)
{
-
/* Save next as the callback may be removed. */
-
next = cb->next;
cb->fn(cb->priv, file, line, function, format, args);
}
}
This seems to have resolved the erase problems but there
are still write issues:
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “–host=i686-pc-cygwin --target=arm-elf”.
Setting up for the OM1004 Board.
0x00000000 in ?? ()
force hardware breakpoints enabled
software breakpoints disabled
#0: str9x at 0x00000000, size 0x00080000, buswidth 0, chipwidth 0
#1: str9x at 0x00080000, size 0x00008000, buswidth 0, chipwidth 0
cleared protection for sectors 0 through 7 on flash bank 0
Erasing flash…
erased sectors 0 through 3 on flash bank 0 in 4.750000s
erased sectors 0 through 3 on flash bank 0 in 4.750000s
erased sectors 0 through 3 on flash bank 0 in 4.750000s
Done flash erase
successfully checked erase state
memory read caused data abort (address: 0x00080010, size: 0x2, count: 0x1)
successfully checked protect state
#0: str9x at 0x00000000, size 0x00080000, buswidth 0, chipwidth 0
#0: 0x00000000 (0x10000 64kB) erased, not protected
#1: 0x00010000 (0x10000 64kB) erased, not protected
#2: 0x00020000 (0x10000 64kB) erased, not protected
#3: 0x00030000 (0x10000 64kB) erased, not protected
#4: 0x00040000 (0x10000 64kB) erased, not protected
#5: 0x00050000 (0x10000 64kB) erased, not protected
#6: 0x00060000 (0x10000 64kB) erased, not protected
#7: 0x00070000 (0x10000 64kB) erased, not protected
str9x flash driver info
Writing flash…
Ignoring packet error, continuing…
/cygdrive/c/Documents and Settings/dave_e/My Documents/ECLIPSE/workspace/FreeRTOS lwIP OM1004/gdbinit:93: Error in sourced command file:
Reply contains invalid hex digit 116
The command that fails is:
monitor flash write_image Demo/ARM9_STR91X_Eclipse/OM1004.bin 0 bin
The openocd log seems to indicate that the flash write_image was
successful but after this there are three warnings:
Warning: gdb_server.c:307 gdb_put_packet_inner(): negative reply, retrying
Thoughts?