chipsalliance / chipsalliance/rocket-chip
Not able to install riscv toolchain properly || facing problem in installing openocd
- Dominant language
- Scala
- Stars
- 3.9k
- Forks
- 1.3k
- Avg merge
- 5d 13m
- Merged PRs (30d)
- 1
Description
Starting RISC-V Toolchain build process
Removing existing riscv-openocd/build directory
Configuring project riscv-openocd
Building project riscv-openocd
Makefile:5353: warning: overriding recipe for target 'check-recursive'
Makefile:4181: warning: ignoring old recipe for target 'check-recursive'
Makefile:5353: warning: overriding recipe for target 'check-recursive'
Makefile:4181: warning: ignoring old recipe for target 'check-recursive'
Makefile:5353: warning: overriding recipe for target 'check-recursive'
Makefile:4181: warning: ignoring old recipe for target 'check-recursive'
In file included from ../src/flash/common.h:21,
from ../src/flash/nor/core.h:25,
from ../src/flash/nor/imp.h:22,
from ../src/flash/nor/jtagspi.c:22:
../src/flash/nor/jtagspi.c: In function ‘jtagspi_write_enable’:
../src/helper/log.h:130:2: warning: ‘status’ may be used uninitialized in this function [-Wmaybe-uninitialized]
130 | log_printf_lf(LOG_LVL_ERROR, __FILE__, __LINE__, __func__, expr)
| ^~~~~~~~~~~~~
../src/flash/nor/jtagspi.c:255:11: note: ‘status’ was declared here
255 | uint32_t status;
| ^~~~~~
../src/flash/nor/jtagspi.c: In function ‘jtagspi_wait’:
../src/flash/nor/jtagspi.c:242:15: warning: ‘status’ may be used uninitialized in this function [-Wmaybe-uninitialized]
242 | if ((status & SPIFLASH_BSY_BIT) == 0) {
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from ../src/jtag/jtag.h:25,
from ../src/target/riscv/riscv-011.c:18:
../src/target/riscv/riscv-011.c: In function ‘dbus_scan’:
../src/helper/binarybuffer.h:93:19: warning: ‘out’ may be used uninitialized in this function [-Wmaybe-uninitialized]
93 | buffer[i / 8] &= ~(1 << (i % 8));
| ^~
In file included from ../src/jtag/jtag.h:25,
from ../src/target/riscv/riscv-013.c:18:
../src/target/riscv/riscv-013.c: In function ‘dmi_scan.constprop’:
../src/helper/binarybuffer.h:55:19: warning: ‘out’ may be used uninitialized in this function [-Wmaybe-uninitialized]
55 | buffer[i / 8] &= ~(1 << (i % 8));
| ^~
/usr/bin/ld: src/.libs/libopenocd.a(libocdjtagdrivers_la-bitbang.o):/home/anusha/riscv-tools/riscv-openocd/build/../src/jtag/drivers/bitbang.h:60: multiple definition of `bitbang_swd'; src/.libs/libopenocd.a(libocdjtagdrivers_la-remote_bitbang.o):/home/anusha/riscv-tools/riscv-openocd/build/../src/jtag/drivers/bitbang.h:60: first defined here
collect2: error: ld returned 1 exit status
gmake[2]: *** [Makefile:2897: src/openocd] Error 1
gmake[1]: *** [Makefile:4181: all-recursive] Error 1
gmake: *** [Makefile:1953: all] Error 2
Contributor guide
Research direction
Start with the riscv-openocd build output and inspect src/jtag/drivers/bitbang.h alongside the bitbang.o and remote_bitbang.o link step. Reproduce the reported toolchain build, then trace the failure at Makefile:2897 for src/openocd. Done means the OpenOCD build completes successfully without the reported linker error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100