Skip to content

OpenOCD

Carsten edited this page Mar 11, 2022 · 9 revisions

Building OpenOCD

  1. Get the patched version of RISC-V OpenOCD
  2. Select the correct branch depending on the RISC-V core
    Core Branch Note
    SweRV riscv-tapasco-swerv System bus access is disabled.
    SCR1 riscv-tapasco-scr1-no-bursts Write and read bursts are disabled.
    SCR1 riscv-tapasco-scr1-write-bursts Only read bursts are disabled.
    CVA6 riscv-tapasco-cva6 Patched write bursts as in riscv-tapasco-scr1-write-bursts and replaced read bursts of length=n with n bursts of length=1.
    SCR1 riscv-tapasco-cva6 The CVA6 branch seems to work for SCR1 too.
    Default riscv-tapasco
  3. Compile C Cap'n Proto
    • git clone https://github.com/opensourcerouting/c-capnproto
    • cd c-capnproto
    • git submodule update --init --recursive
    • autoreconf -f -i -s
    • ./configure
    • make
    • cd ..
  4. Move library c-capnproto/.libs/libcapnp_c.la into riscv-openocd/src/jtag/drivers/
  5. Move library c-capnproto/.libs/libcapnp_c.so into riscv-openocd/src/jtag/drivers/.libs/ (new directory)
  6. Build OpenOCD with:
    • ./bootstrap
    • ./configure --enable-tapascojtag
    • make
    • make install (requires root permissions, otherwise directly use src/openocd as the binary)