Re: [Openocd-development] [PATCH] fix instruction refilling bug when using software breakpoints on a big-endian arm926ej-s system

2010-05-12 Thread Øyvind Harboe
Tested on an arm7 little endian target.

Merged.



-- 
Øyvind Harboe
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Reset halt issues with EK-LM3S9B92

2010-05-12 Thread Tobias Ringström
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 05/11/2010 09:53 PM, Spencer Oliver wrote:
 On 11/05/2010 18:22, Øyvind Harboe wrote:
 So should we just apply this patch you think?

Possibly limiting the revision to = B1.  I don't have access to a later
revision chip, and I will most likely never get that since we've decided
to switch to the STM32 because of the inferior ethernet peripheral in
the LM3S.  The STM32 has other shortcomings, of course.  Let me know if
you want me to provide another patch.

 Do not have any tempest silicon to test, but it sounds as if they forgot
 to fix this old bug.
 
 Tobias,
 Can you confirm that the srst pin is actually getting asserted/released?

Yes.  Verified using oscilloscope.

 Another test is to hold the reset button down then run openocd, after a
 couple of seconds release the reset button.

I don't understand what I should look for.  If I press reset before
starting openocd and release it 2 seconds after openocd is started,
openocd start up normally.  If I release it 3 seconds after starting
openocd, I get this:

srst_only separate srst_gates_jtag srst_open_drain
Info : clock speed 500 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.

/Tobias
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkvqlwAACgkQoVlA9AKQ7+xt6wCfa0w5tjSzhUW1X43TlfaUQaDM
xDcAn1k4BPVYp+FnISSaj3TGIAdruYnQ
=doNd
-END PGP SIGNATURE-
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


[Openocd-development] [PATCH 2/3] flash: require unique flash bank name

2010-05-12 Thread Spencer Oliver
 From 57d2e47a1e3ce9b5735e88248c98239794b27bff Mon Sep 17 00:00:00 2001
From: Spencer Oliver ntfr...@users.sourceforge.net
Date: Wed, 12 May 2010 22:42:26 +0100
Subject: [PATCH 2/3] flash: require unique flash bank name

Make sure the flash bank name is unique

Signed-off-by: Spencer Oliver ntfr...@users.sourceforge.net
---
 src/flash/nor/tcl.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c
index a3efd80..a6e942e 100644
--- a/src/flash/nor/tcl.c
+++ b/src/flash/nor/tcl.c
@@ -795,6 +795,14 @@ COMMAND_HANDLER(handle_flash_bank_command)
return ERROR_FAIL;
}
 
+   /* check the flash bank name is unique */
+   if (get_flash_bank_by_name(bank_name) != NULL)
+   {
+   /* flash bank name already exists  */
+   LOG_ERROR(flash bank name '%s' already exists, bank_name);
+   return ERROR_FAIL;
+   }
+
/* register flash specific commands */
if (NULL != driver-commands)
{
-- 
1.6.6.1

___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


[Openocd-development] [PATCH 3/3] scripts: update flash bank names

2010-05-12 Thread Spencer Oliver
 From 06ff0648dcf2a5ffba7cacfdabc7b1f2177c7de9 Mon Sep 17 00:00:00 2001
From: Spencer Oliver ntfr...@users.sourceforge.net
Date: Wed, 12 May 2010 23:04:57 +0100
Subject: [PATCH 3/3] scripts: update flash bank names

As the flash bank name is now unique update the scripts to suit.

Signed-off-by: Spencer Oliver ntfr...@users.sourceforge.net
---
 tcl/board/hitex_str9-comstick.cfg |4 ++--
 tcl/board/lubbock.cfg |4 ++--
 tcl/board/str910-eval.cfg |4 ++--
 tcl/target/at91sam3u4c.cfg|4 ++--
 tcl/target/at91sam3u4e.cfg|4 ++--
 tcl/target/pic32mx.cfg|4 ++--
 tcl/target/str710.cfg |4 ++--
 tcl/target/str750.cfg |4 ++--
 tcl/target/str912.cfg |4 ++--
 9 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/tcl/board/hitex_str9-comstick.cfg 
b/tcl/board/hitex_str9-comstick.cfg
index 4d1bb2e..c85681b 100644
--- a/tcl/board/hitex_str9-comstick.cfg
+++ b/tcl/board/hitex_str9-comstick.cfg
@@ -73,7 +73,7 @@ $_TARGETNAME configure -event reset-init {
 $_TARGETNAME configure -work-area-phys 0x5000 -work-area-size 16384 
-work-area-backup 0
 
 #flash bank driver base size chip_width bus_width
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash0
 flash bank $_FLASHNAME str9x 0x 0x0008 0 0 0
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash1
 flash bank $_FLASHNAME str9x 0x0008 0x8000 0 0 0
diff --git a/tcl/board/lubbock.cfg b/tcl/board/lubbock.cfg
index 095c60a..b58ad5a 100644
--- a/tcl/board/lubbock.cfg
+++ b/tcl/board/lubbock.cfg
@@ -12,9 +12,9 @@ jtag_ntrst_delay 250
 
 # CS0, CS1 -- two banks of CFI flash, 32 MBytes each
 # each bank is 32-bits wide, two 16-bit chips in parallel
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash0
 flash bank $_FLASHNAME cfi 0x 0x0200 2 4 $_TARGETNAME
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash1
 flash bank $_FLASHNAME cfi 0x0400 0x0200 2 4 $_TARGETNAME
 
 # CS2 low -- FPGA registers
diff --git a/tcl/board/str910-eval.cfg b/tcl/board/str910-eval.cfg
index a2772a8..9e3f881 100644
--- a/tcl/board/str910-eval.cfg
+++ b/tcl/board/str910-eval.cfg
@@ -58,9 +58,9 @@ $_TARGETNAME configure -event reset-init {
 }
 
 #flash bank str9x base size 0 0 target# variant
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash0
 flash bank $_FLASHNAME str9x 0x 0x0008 0 0 0
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash1
 flash bank $_FLASHNAME str9x 0x0008 0x8000 0 0 0
 
 # For more information about the configuration files, take a look at:
diff --git a/tcl/target/at91sam3u4c.cfg b/tcl/target/at91sam3u4c.cfg
index e281287..5cacbcb 100644
--- a/tcl/target/at91sam3u4c.cfg
+++ b/tcl/target/at91sam3u4c.cfg
@@ -2,10 +2,10 @@
 source [find target/at91sam3uxx.cfg]
 
 # size is automatically calculated by probing
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash0
 flash bank $_FLASHNAME at91sam3 0x8 0 1 1 $_TARGETNAME
 # This is a 256K chip, it has the 2nd bank
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash1
 flash bank $_FLASHNAME at91sam3 0x00010 0 1 1 $_TARGETNAME
 
 
diff --git a/tcl/target/at91sam3u4e.cfg b/tcl/target/at91sam3u4e.cfg
index e549185..6f6e0d8 100644
--- a/tcl/target/at91sam3u4e.cfg
+++ b/tcl/target/at91sam3u4e.cfg
@@ -2,10 +2,10 @@
 source [find target/at91sam3uXX.cfg]
 
 # size is automatically calculated by probing
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash0
 flash bank $_FLASHNAME at91sam3 0x8 0 1 1 $_TARGETNAME
 # This is a 256K chip - it has the 2nd bank
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash1
 flash bank $_FLASHNAME at91sam3 0x00010 0 1 1 $_TARGETNAME
 
 
diff --git a/tcl/target/pic32mx.cfg b/tcl/target/pic32mx.cfg
index 673d254..0b99cdb 100644
--- a/tcl/target/pic32mx.cfg
+++ b/tcl/target/pic32mx.cfg
@@ -67,9 +67,9 @@ $_TARGETNAME configure -event reset-init {
mww 0xbf882030 $_PIC32MX_PROGSIZE
 }
 
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash0
 flash bank $_FLASHNAME pic32mx 0x1fc0 0 0 0 $_TARGETNAME
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash1
 flash bank $_FLASHNAME pic32mx 0x1d00 0 0 0 $_TARGETNAME
 
 # For more information about the configuration files, take a look at:
diff --git a/tcl/target/str710.cfg b/tcl/target/str710.cfg
index 4d68586..a5955b6 100644
--- a/tcl/target/str710.cfg
+++ b/tcl/target/str710.cfg
@@ -47,9 +47,9 @@ $_TARGETNAME configure -event gdb-flash-erase-start {
 $_TARGETNAME configure -work-area-phys 0x2000C000 -work-area-size 0x4000 
-work-area-backup 0
 
 #flash bank str7x base size 0 0 target# variant
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash0
 flash bank $_FLASHNAME str7x 0x4000 0x0004 0 0 $_TARGETNAME STR71x
-set _FLASHNAME $_CHIPNAME.flash
+set _FLASHNAME $_CHIPNAME.flash1
 

[Openocd-development] [PATCH v2] Change kb/s to KiB/s in messages about kibibytes

2010-05-12 Thread Jon Povey
Change download rate messages about kibibytes from kb/s to KiB/s units.
See: http://en.wikipedia.org/wiki/Data_rate_units

Signed-off-by: Jon Povey jon.po...@racelogic.co.uk
---
This was discussed a bit on the list but no clear resolution.

According to wikipedia KiB/s is correct, I think with the mixed case it should
be clear enough now without having to write some made-up verbose thing like
KiByte/s or kibibyte/s.

Also rebased against master since last patch.

 src/flash/nand/tcl.c |6 +++---
 src/flash/nor/tcl.c  |8 
 src/target/target.c  |8 
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c
index 86dbd67..1272bf6 100644
--- a/src/flash/nand/tcl.c
+++ b/src/flash/nand/tcl.c
@@ -309,7 +309,7 @@ COMMAND_HANDLER(handle_nand_write_command)
if (nand_fileio_finish(s))
{
command_print(CMD_CTX, wrote file %s to NAND flash %s up to 
-   offset 0x%8.8 PRIx32  in %fs (%0.3f kb/s),
+   offset 0x%8.8 PRIx32  in %fs (%0.3f KiB/s),
CMD_ARGV[1], CMD_ARGV[0], s.address, 
duration_elapsed(s.bench),
duration_kbps(s.bench, total_bytes));
}
@@ -369,7 +369,7 @@ COMMAND_HANDLER(handle_nand_verify_command)
if (nand_fileio_finish(file) == ERROR_OK)
{
command_print(CMD_CTX, verified file %s in NAND flash %s 
-   up to offset 0x%8.8 PRIx32  in %fs (%0.3f 
kb/s),
+   up to offset 0x%8.8 PRIx32  in %fs (%0.3f 
KiB/s),
CMD_ARGV[1], CMD_ARGV[0], dev.address, 
duration_elapsed(file.bench),
duration_kbps(file.bench, dev.size));
}
@@ -409,7 +409,7 @@ COMMAND_HANDLER(handle_nand_dump_command)
 
if (nand_fileio_finish(s) == ERROR_OK)
{
-   command_print(CMD_CTX, dumped %ld bytes in %fs (%0.3f kb/s), 
+   command_print(CMD_CTX, dumped %ld bytes in %fs (%0.3f KiB/s),
(long)s.fileio.size, duration_elapsed(s.bench),
duration_kbps(s.bench, s.fileio.size));
}
diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c
index 17c6e91..3a72c78 100644
--- a/src/flash/nor/tcl.c
+++ b/src/flash/nor/tcl.c
@@ -264,7 +264,7 @@ COMMAND_HANDLER(handle_flash_erase_address_command)
if ((ERROR_OK == retval)  (duration_measure(bench) == ERROR_OK))
{
command_print(CMD_CTX, erased address 0x%8.8x (length %i)
-in %fs (%0.3f kb/s), address, length,
+in %fs (%0.3f KiB/s), address, length,
duration_elapsed(bench), duration_kbps(bench, 
length));
}
 
@@ -451,7 +451,7 @@ COMMAND_HANDLER(handle_flash_write_image_command)
if ((ERROR_OK == retval)  (duration_measure(bench) == ERROR_OK))
{
command_print(CMD_CTX, wrote % PRIu32  bytes from file %s 
-   in %fs (%0.3f kb/s), written, CMD_ARGV[0],
+   in %fs (%0.3f KiB/s), written, CMD_ARGV[0],
duration_elapsed(bench), duration_kbps(bench, 
written));
}
 
@@ -585,7 +585,7 @@ COMMAND_HANDLER(handle_flash_fill_command)
if (duration_measure(bench) == ERROR_OK)
{
command_print(CMD_CTX, wrote % PRIu32  bytes to 0x%8.8 
PRIx32
-in %fs (%0.3f kb/s), wrote, address,
+in %fs (%0.3f KiB/s), wrote, address,
duration_elapsed(bench), duration_kbps(bench, 
wrote));
}
 
@@ -637,7 +637,7 @@ COMMAND_HANDLER(handle_flash_write_bank_command)
if ((ERROR_OK == retval)  (duration_measure(bench) == ERROR_OK))
{
command_print(CMD_CTX, wrote %ld bytes from file %s to flash 
bank %u
-at offset 0x%8.8 PRIx32  in %fs (%0.3f 
kb/s),
+at offset 0x%8.8 PRIx32  in %fs (%0.3f 
KiB/s),
(long)fileio.size, CMD_ARGV[1], p-bank_number, 
offset,
duration_elapsed(bench), duration_kbps(bench, 
fileio.size));
}
diff --git a/src/target/target.c b/src/target/target.c
index 37e515a..c8c1012 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2560,7 +2560,7 @@ COMMAND_HANDLER(handle_load_image_command)
if ((ERROR_OK == retval)  (duration_measure(bench) == ERROR_OK))
{
command_print(CMD_CTX, downloaded % PRIu32  bytes 
-   in %fs (%0.3f kb/s), image_size,
+   in %fs (%0.3f KiB/s), image_size,
duration_elapsed(bench), duration_kbps(bench, 
image_size));
}
 
@@ -2626,7