Regression in Makefile: OpenOCD does no find USB connected Segger Flasher for ARM. In commit 70c2b83232415954356803e286ea2263f5e98c8d (2024-02-27 18:31:13) has been removed CONFIGURE_ENV variable. This variable allows to build OpenOCD with older libusb: FreeBSD have libusb 1.0.13, but minimum required is 1.0.16. Commit line that removed libusb support: -CONFIGURE_ENV+= libusb_CFLAGS=" " libusb_LIBS="-lusb" Bug report where was introduced CONFIGURE_ENV: Bug 256491 - devel/openocd: Update to 0.11.0, enable USB support for J-Link
Moin moin, Thank you for reporting this. I'll be having a look somewhere next week™. You're once referring to the Segger Flasher but the PR you're referencing is talking about Segger J-Link (these are separate products). Are you also referring to J-Link instead of their dedicated Flasher product(s)? AFAIK, OpenOCD is deprecating the internal libjaylink. Creating a FreeBSD port of libjaylink is on my ToDo list but that's currently a few months out. Before the Makefile overhaul of this port, were you using the J-Link as a dumb JTAG/SWD probe (without all the fancy J-Link features) or were you actually able to use it with through OpenOCD's internal libjaylink?
(In reply to Joel Bodenmann from comment #1) Hello, I have Segger Flasher. But in current case, I think that it does not matter if there is Segger Flasher or Segger J-Link, both seems to use same USB code. The main problem is that OpenOCD has dependency to libusb 1.0.16, but unfortunately FreeBSD have libusb 1.0.13. Before Makefile overhaul, I was using Segger Flasher for firmware uploading and debugging with GDB. I think that it uses internal libjaylink, because when OpenOCD stops to communicating with Flasher, then error codes came from libjaylink. I added hare two configure outputs, where one is have defined "CONFIGURE_ENV+= libusb_CFLAGS=" " libusb_LIBS="-lusb"" and another without it. Configure output without CONFIGURE_ENV: checking for libusb-1.0 >= 1.0.16... no checking whether byte ordering is bigendian... no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating libjaylink/Makefile config.status: creating libjaylink/version.h config.status: creating libjaylink.pc config.status: creating Doxyfile config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands libjaylink configuration summary: - Package version ................ 0.3.1 - Library version ................ 2:0:2 - Installation prefix ............ /usr/local - Building on .................... amd64-portbld-freebsd14.0 - Building for ................... amd64-portbld-freebsd14.0 Enabled transports: - USB ............................ no (missing: libusb-1.0) - TCP ............................ yes Configure output with CONFIGURE_ENV: checking for libusb-1.0 >= 1.0.16... yes checking whether byte ordering is bigendian... no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating libjaylink/Makefile config.status: creating libjaylink/version.h config.status: creating libjaylink.pc config.status: creating Doxyfile config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands libjaylink configuration summary: - Package version ................ 0.3.1 - Library version ................ 2:0:2 - Installation prefix ............ /usr/local - Building on .................... amd64-portbld-freebsd14.0 - Building for ................... amd64-portbld-freebsd14.0 Enabled transports: - USB ............................ yes - TCP ............................ yes
Thanks - I can reproduce this. I'll try to get this handled over the weekend - Thank you for your patience. IRL has been a bit of a drag...
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=cb4b4bccc6cc654a846356e8854f615b364f37d7 commit cb4b4bccc6cc654a846356e8854f615b364f37d7 Author: Joel Bodenmann <jbo@FreeBSD.org> AuthorDate: 2024-04-08 12:32:41 +0000 Commit: Joel Bodenmann <jbo@FreeBSD.org> CommitDate: 2024-04-08 12:35:18 +0000 devel/openocd: Fix libusb for libjaylink We're using OpenOCD's internal redistribution of libjaylink which requires libusb >= 1.0.16. PR: 277688 Approved by: tcberner (mentor, implicit) devel/openocd/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Should be fixed - Thank you for reporting this and thank you for your patience!