I am trying to build rocket-chip tools according to instructions here: https://github.com/chipsalliance/rocket-tools/blob/master/README.md
I face the following error:
/usr/bin/ld: src/.libs/libopenocd.a(libocdjtagdrivers_la-bitbang.o):/home/mats/src/rocket-tools/riscv-openocd/build/../src/jtag/drivers/bitbang.h:61: multiple definition of `bitbang_swd'; src/.libs/libopenocd.a(libocdjtagdrivers_la-remote_bitbang.o):/home/mats/src/rocket-tools/riscv-openocd/build/../src/jtag/drivers/bitbang.h:61: first defined here
I do not understand how the same include file can get included twice.
Any support overcoming this issue is appreciated.
Add an
extern
before thebitbang_swd
variable references to make it compile.Not sure why the source code doesn't have it already.