Bug 280250 - devel/openocd: add remote bitbang option
Summary: devel/openocd: add remote bitbang option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Joel Bodenmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-12 22:03 UTC by gatekeeper
Modified: 2024-07-14 20:31 UTC (History)
0 users

See Also:
jbo: maintainer-feedback+


Attachments
git patch (1.76 KB, patch)
2024-07-12 22:03 UTC, gatekeeper
no flags Details | Diff
git patch (1.76 KB, patch)
2024-07-12 22:12 UTC, gatekeeper
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gatekeeper 2024-07-12 22:03:00 UTC
Created attachment 252003 [details]
git patch

Hi. To use the Spike RISC-V emulator with gdb (see e.g. the instructions in https://github.com/riscv-software-src/riscv-isa-sim), openocd must be compiled with the remote bitbang option turned on. As the openocd port currently does not have this option, I propose the patch, which is in attachment, to address this issue. Furthermore, I propose that this option is enabled by default, also reflected in the attached patch.
Comment 1 gatekeeper 2024-07-12 22:12:23 UTC
Created attachment 252004 [details]
git patch
Comment 2 Joel Bodenmann freebsd_committer freebsd_triage 2024-07-12 23:28:18 UTC
Have you actually been able to successfully use the port with remote bitbanging enabled?
It has been a while but I seem to recall that something prevented the bitbanging driver from working under FreeBSD. But that might have just been the Linux GPIO bitbanging driver.
Comment 3 gatekeeper 2024-07-13 09:26:01 UTC
Hi. What I can report/confirm is that I was successful in using the remote bitbanging as in the example given in the website I posted (i.e. debugging RISC-V with the spike emulator).
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-07-14 20:31:12 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=63f1ac9a402f267ee416f5209e07d8133dd1226a

commit 63f1ac9a402f267ee416f5209e07d8133dd1226a
Author:     Tiago Gasiba <tiago.gasiba@gmai.com>
AuthorDate: 2024-07-12 21:53:41 +0000
Commit:     Joel Bodenmann <jbo@FreeBSD.org>
CommitDate: 2024-07-14 20:29:39 +0000

    devel/openocd: Add option for remote-bitbang driver

    PR:                     280250
    Approved by:            tcberner (mentor)
    Differential Revision:  https://reviews.freebsd.org/D45975

 devel/openocd/Makefile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Comment 5 Joel Bodenmann freebsd_committer freebsd_triage 2024-07-14 20:31:50 UTC
Committed - Thanks!