From de3f9239356b6486552831a6605baa07b39348bd Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Tue, 18 Apr 2017 16:16:09 -0700 Subject: Add OpenOCD This is required to run the debug tests. --- .gitmodules | 3 +++ .travis.yml | 5 +++++ build-rv32ima.sh | 1 + build.common | 8 ++++++++ build.sh | 1 + riscv-gnu-toolchain | 2 +- riscv-openocd | 1 + 7 files changed, 20 insertions(+), 1 deletion(-) create mode 160000 riscv-openocd diff --git a/.gitmodules b/.gitmodules index 2c44816..0ea42ca 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule "riscv-gnu-toolchain"] path = riscv-gnu-toolchain url = https://github.com/riscv/riscv-gnu-toolchain.git +[submodule "riscv-openocd"] + path = riscv-openocd + url = https://github.com/riscv/riscv-openocd.git diff --git a/.travis.yml b/.travis.yml index 9ade992..3100a4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ addons: - flex - texinfo - python-pexpect + - libusb-1.0-0-dev env: global: @@ -37,6 +38,10 @@ before_install: - cd riscv-tests - git submodule update --init - cd .. + # openocd also needs submodules + - cd riscv-openocd + - git submodule update --init + - cd .. # actually use new gcc - export CXX=g++-4.8 CC=gcc-4.8 diff --git a/build-rv32ima.sh b/build-rv32ima.sh index 65e93ae..eaa0bb8 100755 --- a/build-rv32ima.sh +++ b/build-rv32ima.sh @@ -11,5 +11,6 @@ build_project riscv-fesvr --prefix=$RISCV build_project riscv-isa-sim --prefix=$RISCV --with-fesvr=$RISCV --with-isa=rv32ima build_project riscv-gnu-toolchain --prefix=$RISCV --with-arch=rv32ima --with-abi=ilp32 CC= CXX= build_project riscv-pk --prefix=$RISCV --host=riscv32-unknown-elf +build_project riscv-openocd --prefix=$RISCV --enable-remote-bitbang echo -e "\\nRISC-V Toolchain installation completed!" diff --git a/build.common b/build.common index 3b6a1c4..fadf6ef 100644 --- a/build.common +++ b/build.common @@ -24,6 +24,14 @@ function build_project { echo "Removing existing $PROJECT/build directory" rm -rf "$PROJECT/build" fi + if [ ! -e "$PROJECT/configure" ] + then + ( + cd "$PROJECT" + find . -iname configure.ac | sed s/configure.ac/m4/ | xargs mkdir -p + autoreconf -i + ) + fi mkdir -p "$PROJECT/build" cd "$PROJECT/build" echo "Configuring project $PROJECT" diff --git a/build.sh b/build.sh index ec5f003..1563b7f 100755 --- a/build.sh +++ b/build.sh @@ -7,6 +7,7 @@ echo "Starting RISC-V Toolchain build process" +build_project riscv-openocd --prefix=$RISCV --enable-remote-bitbang build_project riscv-fesvr --prefix=$RISCV build_project riscv-isa-sim --prefix=$RISCV --with-fesvr=$RISCV build_project riscv-gnu-toolchain --prefix=$RISCV diff --git a/riscv-gnu-toolchain b/riscv-gnu-toolchain index 8b16c61..9f1f197 160000 --- a/riscv-gnu-toolchain +++ b/riscv-gnu-toolchain @@ -1 +1 @@ -Subproject commit 8b16c6123d3dc9642ceeaa6ad371f494d5970873 +Subproject commit 9f1f1971208d898705cb19e353e3da28c9f8c4a0 diff --git a/riscv-openocd b/riscv-openocd new file mode 160000 index 0000000..ba3a569 --- /dev/null +++ b/riscv-openocd @@ -0,0 +1 @@ +Subproject commit ba3a56937bc921a72b672d666a60ea4292cff449 -- cgit v1.1