I would like to build gdbserver
to run on a RISCV platform and allow serial attachment from a Linux development machine.
I have tried to build various repositories e.g. riscv-binutils-gdb
which I obtained from GitHUB via git
. I am using a riscv toolchain that I downloaded from sifive. In the end I would like to test gdbserver
on the sifive hifive 1 rev A01 that I purchased.
Here are the build commands I am using:
CC=$RISCV_BIN/$RISCV_PREFIX"gcc"
AR=$RISCV_BIN/$RISCV_PREFIX"ar"
./configure --prefix=$RISCV_BIN/$RISCV_PREFIX --target=riscv64-unknown-elf --host=riscv64-unknown-elf --build=x86_64-pc-linux-gnu
I would expect this to build gdbserver
and its prerequisites, but I get errors such as:
/home/mroths/riscv-binutils-gdb/libiberty/./unlink-if-ordinary.c:67: undefined reference to `lstat'
I assume that I am not invoking the build correctly, but any assistance would be appreciated.
If there is a better repository to start with, please let me know that as well.