[OpenOCD-devel] [PATCH]: 3780054 configure.ac: add libutil to the dependency list

2020-11-05 Thread gerrit
This is an automated email from Gerrit.

Antonio Borneo (borneo.anto...@gmail.com) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/5922

-- gerrit

commit 3780054dc5a0c181f38f4c83542f6561a45e54e5
Author: Antonio Borneo 
Date:   Thu Nov 5 09:54:11 2020 +0100

configure.ac: add libutil to the dependency list

Jimtcl 0.80 (2020-10-29) adds dependency to libutil, which is part
of the GNU libc.
The library is searched and used by jimtcl build, but still has to
be linked in by OpenOCD as indirect dependency.

While OpenOCD is still using jimtcl 0.79, let's prepare to switch
to the next version.
Add libutil search in configure.ac.

Change-Id: I5a8952161b0e5b93fc00d23be256b5274d31e08c
Signed-off-by: Antonio Borneo 

diff --git a/configure.ac b/configure.ac
index 055833a..3e49213 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,6 +44,7 @@ AC_TYPE_LONG_LONG_INT
 
 AC_SEARCH_LIBS([ioperm], [ioperm])
 AC_SEARCH_LIBS([dlopen], [dl])
+AC_SEARCH_LIBS([openpty], [util])
 
 AC_CHECK_HEADERS([sys/socket.h])
 AC_CHECK_HEADERS([elf.h])

-- 


___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


[OpenOCD-devel] [PATCH]: de9ee9f semihosting: print the semihosting operation id

2020-11-05 Thread gerrit
This is an automated email from Gerrit.

Adrian M Negreanu (adrian.negre...@nxp.com) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/5923

-- gerrit

commit de9ee9f0c668c3738ee3acfc6d7848e41cd93bfd
Author: Adrian Negreanu 
Date:   Thu Nov 5 11:56:16 2020 +0200

semihosting: print the semihosting operation id

Change-Id: If5c3568bd1c99a48ac492137f48da0d9764efe14
Signed-off-by: Adrian Negreanu 

diff --git a/src/target/arm_semihosting.c b/src/target/arm_semihosting.c
index 61f1e78..c2fd4de 100644
--- a/src/target/arm_semihosting.c
+++ b/src/target/arm_semihosting.c
@@ -315,7 +315,7 @@ int arm_semihosting(struct target *target, int *retval)
if (0 <= semihosting->op && semihosting->op <= 0x31) {
*retval = semihosting_common(target);
if (*retval != ERROR_OK) {
-   LOG_ERROR("Failed semihosting operation");
+   LOG_ERROR("Failed semihosting operation 
(0x%X)", semihosting->op);
return 0;
}
} else {
diff --git a/src/target/riscv/riscv_semihosting.c 
b/src/target/riscv/riscv_semihosting.c
index 99d6c77..73f9bf0 100644
--- a/src/target/riscv/riscv_semihosting.c
+++ b/src/target/riscv/riscv_semihosting.c
@@ -140,7 +140,7 @@ semihosting_result_t riscv_semihosting(struct target 
*target, int *retval)
if (0 <= semihosting->op && semihosting->op <= 0x31) {
*retval = semihosting_common(target);
if (*retval != ERROR_OK) {
-   LOG_ERROR("Failed semihosting operation");
+   LOG_ERROR("Failed semihosting operation 
(0x%X)", semihosting->op);
return SEMI_ERROR;
}
} else {

-- 


___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


[OpenOCD-devel] [PATCH]: b391837 tcl/target: Add flash bank to GD32VF103

2020-11-05 Thread gerrit
This is an automated email from Gerrit.

Marc Schink (d...@zapb.de) just uploaded a new patch set to Gerrit, which you 
can find at http://openocd.zylin.com/5924

-- gerrit

commit b391837f6d838ae55ec179a8c0b5dedbcde993c5
Author: Marc Schink 
Date:   Thu Nov 5 14:21:39 2020 +0100

tcl/target: Add flash bank to GD32VF103

Change-Id: Id7a166cc6cc18c91edb5636372d7889562ee0c3b
Signed-off-by: Marc Schink 

diff --git a/tcl/target/gd32vf103.cfg b/tcl/target/gd32vf103.cfg
index 0f4dcf3..0a43f00 100644
--- a/tcl/target/gd32vf103.cfg
+++ b/tcl/target/gd32vf103.cfg
@@ -24,3 +24,6 @@ set _TARGETNAME $_CHIPNAME.cpu
 target create $_TARGETNAME riscv -chain-position $_TARGETNAME
 
 $_TARGETNAME configure -work-area-phys 0x2000 -work-area-size 
$_WORKAREASIZE -work-area-backup 0
+
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME gd32vf103 0x0800 0 0 0 $_TARGETNAME

-- 


___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


[OpenOCD-devel] [PATCH]: 1deb8b8 semihosting, SYS_GET_CMDLINE: check CommandLine to be at most 255 bytes

2020-11-05 Thread gerrit
This is an automated email from Gerrit.

Adrian M Negreanu (adrian.negre...@nxp.com) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/5925

-- gerrit

commit 1deb8b8d09087c88676e14739abfc66b91de3aed
Author: Adrian Negreanu 
Date:   Thu Nov 5 23:15:16 2020 +0200

semihosting, SYS_GET_CMDLINE: check CommandLine to be at most 255 bytes

The specs for semihosting are not mentioning any maximum size for the
command line.

ARMGCC toolchain is using Newlib, which has a CommandLine of 255 bytes.

Change-Id: I41fc3b5fb7bcb61f5f06602cc01043aebd5d448f
Signed-off-by: Adrian Negreanu 

diff --git a/src/target/semihosting_common.c b/src/target/semihosting_common.c
index 9650556..2f25279 100644
--- a/src/target/semihosting_common.c
+++ b/src/target/semihosting_common.c
@@ -507,7 +507,9 @@ int semihosting_common(struct target *target)
char *arg = semihosting->cmdline != NULL ?
semihosting->cmdline : "";
uint32_t len = strlen(arg) + 1;
-   if (len > size)
+   if (size > 255) /* rdimon's CommandLine size */
+   semihosting->result = -1;
+   else if (len > size)
semihosting->result = -1;
else {
semihosting_set_field(target, len, 1, 
fields);

-- 


___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


[OpenOCD-devel] [openocd:tickets] Re: #283 Speed of SWD with SWV with ST-link V3

2020-11-05 Thread Stefan Brüns
The ST-Link v3 is USB-HS (480MBit/s), so bandwidth should be no concern.


---

** [tickets:#283] Speed of SWD with SWV with ST-link V3**

**Status:** new
**Milestone:** 0.10.0
**Labels:** SWV stlink 
**Created:** Sat Oct 24, 2020 12:20 PM UTC by Pawel
**Last Updated:** Sat Oct 31, 2020 02:15 PM UTC
**Owner:** nobody


Hi all,

ST-link v3 support SWV up to 24MHz but in openocd it is limited to max 2MHz.
( UM2448 Rev 5 page 18). I work with patched openocd and can verify that it is 
working fine with higher speeds that 2MHz.

It can looks like this:
[https://github.com/ntfreak/openocd/compare/master...phryniszak:master?diff=split](http://)

And one more thing - does it make sense to check baudrate like pyocd?

```python
def set_swo_clock(self, swo_clock, system_clock):
"""! @brief Prepare TPIU for transmitting SWO at a given baud rate.

Configures the TPIU for SWO UART mode, then sets the SWO clock 
frequency based on
the provided system clock.

@param self
@param swo_clock Desired SWO baud rate in Hertz.
@param system_clock The frequency of the SWO clock source in Hertz. 
This is almost always
the system clock, also called the HCLK or fast clock.
@return Boolean indicating if SWO UART mode could be configured with 
the requested
baud rate set within 3%.
```

I noticed that some baudrate combinations are giving for some reason wrong 
output with openocd.



---

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


[OpenOCD-devel] [openocd:tickets] #277 No release since 3 years after 0.10.0 hampers collaboration with other projects

2020-11-05 Thread Stefan Brüns
https://sourceforge.net/p/openocd/tickets/286/#a5f3
> We are going to deliver OpenOCD v0.11.0 soon, and the we should stop merging 
> new features in ~10 days.


---

** [tickets:#277] No release since 3 years after 0.10.0 hampers collaboration 
with other projects**

**Status:** new
**Milestone:** 0.9.0
**Created:** Wed Aug 26, 2020 12:58 PM UTC by Jelle Haandrikman
**Last Updated:** Wed Aug 26, 2020 12:58 PM UTC
**Owner:** nobody


Hello,

I tried to update the handling of OpenOCD in RIOT-OS to the current version, 
with regard of the ST-link adapter handling. However, this update can't be 
taken into account at this moment. Because the current official release is so 
old. It's not possible for RIOT (or other projects) to accomodate all versions 
on the supported platforms. 

OpenOCD hasn't issued an official release since 2017, different projects bundle 
different versions of OpenOCD nowadays. Debian has only started OpenOCD 
snapshots since May 2020. Which contains the updated ST-Link handling that 
isn't in 0.10.0. See the issue I submitted to below. 

The absence of an official release means that versions incorporated in 
distributions get out of sync. So  it remains hard to implement updates that 
take care of all the versions out in the wild. Even downloading the latest 
release of OpenOCD on the website points to version 0.10.0. Which puts people 
on the wrong footing. 

Also the whole feature set of OpenOCD has undergone significant updates since 
the latest release.  

Although a new release might incur quite some effort, it would make life a lot 
easier for downstream projects. 

The Issue for RIOT-OS I submitted. 
https://github.com/RIOT-OS/RIOT/issues/14855#issuecomment-680835175

best regards,
Jelle Haandrikman


---

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