From cd26f836814066205cffeccb422c93231acf421a Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Tue, 11 Dec 2018 11:58:33 -0800 Subject: Removed riscv-gnu-toolchain and openocd submodules --- .gitmodules | 6 ------ openocd | 1 - riscv-gnu-toolchain | 1 - 3 files changed, 8 deletions(-) delete mode 100644 .gitmodules delete mode 160000 openocd delete mode 160000 riscv-gnu-toolchain diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index eb6b315..0000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "openocd"] - path = openocd - url = https://github.com/sifive/riscv-openocd.git -[submodule "riscv-gnu-toolchain"] - path = riscv-gnu-toolchain - url = https://github.com/sifive/riscv-gnu-toolchain.git diff --git a/openocd b/openocd deleted file mode 160000 index 29d37f7..0000000 --- a/openocd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 29d37f75a977125127be2760be9e465d2da095ab diff --git a/riscv-gnu-toolchain b/riscv-gnu-toolchain deleted file mode 160000 index efa1d4c..0000000 --- a/riscv-gnu-toolchain +++ /dev/null @@ -1 +0,0 @@ -Subproject commit efa1d4cc1ab2af031332badf343add080990b825 -- cgit v1.2.3 From 926417e65cd58c5b365170570a17316e2a827264 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Tue, 11 Dec 2018 12:02:10 -0800 Subject: Update README to point only at pre-built toolchain --- README.md | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 1099afd..e7437ad 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ This repository, maintained by SiFive, Inc, makes it easy to get started develop ### Contents ### -* RISC-V Software Toolchain -* RISC-V Debugging Toolchain * Board Support Packages for FE310 and Development Kits * A Few Example Programs @@ -24,33 +22,15 @@ cd freedom-e-sdk make help ``` -#### Building Tools from Source #### +#### Install the RISC-V Toolchain #### -Ubuntu packages needed: +The RISC-V GNU Toolchain and OpenOCD are available from the SiFive Website at - $ sudo apt-get install autoconf automake libmpc-dev libmpfr-dev libgmp-dev gawk bison flex texinfo libtool libusb-1.0-0-dev make g++ pkg-config libexpat1-dev zlib1g-dev +https://www.sifive.com/boards -Next, build the tools: - -``` -cd freedom-e-sdk -make tools [BOARD=freedom-e300-hifive1] -``` - -If your machine has enough resources, you can speed up the build process by adding `-j n` to `make`, where `n` is the number of processors of your build system. - - -#### Using Pre-Built Binary Tools #### - -If you would like to avoid compiling the tools from source, they are -available as pre-built binaries from - -https://www.sifive.com/products/tools - -For OpenOCD and/or RISC-V GNU Toolchain, -download the .tar.gz for your platform, and unpack it to -your desired location. Then, use the `RISCV_PATH` and `RISCV_OPENOCD_PATH` -variables when attempting to use the tools: +For OpenOCD and/or RISC-V GNU Toolchain, download the .tar.gz for your platform, +and unpack it to your desired location. Then, use the `RISCV_PATH` and +`RISCV_OPENOCD_PATH` variables when attempting to use the tools: ``` cp openocd--.tar.gz /my/desired/location/ -- cgit v1.2.3 From c63b035b06cf236e5b4eae7844e3d5ded9c8c858 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Tue, 11 Dec 2018 15:30:57 -0800 Subject: Remove tools from Makefile --- Makefile | 87 +--------------------------------------------------------------- 1 file changed, 1 insertion(+), 86 deletions(-) diff --git a/Makefile b/Makefile index 3b9c44f..e5e5216 100644 --- a/Makefile +++ b/Makefile @@ -19,9 +19,6 @@ GDB_PORT ?= 3333 # Variables the user probably shouldn't override. builddir := work/build -installdir := work/install -toolchain_srcdir := riscv-gnu-toolchain -openocd_srcdir := openocd ############################################################# # BSP Loading @@ -68,18 +65,6 @@ help: @echo " SiFive Freedom E Software Development Kit " @echo " Makefile targets:" @echo "" - @echo " tools [BOARD=$(BOARD)]:" - @echo " Install compilation & debugging tools to target your desired board." - @echo "" - @echo " toolchain-clean:" - @echo " Removes the installed toolchain." - @echo "" - @echo " openocd-clean:" - @echo " Removes the locally built instance of OpenOCD." - @echo "" - @echo " uninstall:" - @echo " Uninstall the compilation & debugging tools." - @echo "" @echo " software [PROGRAM=$(PROGRAM) BOARD=$(BOARD)]:" @echo " Build a software program to load with the" @echo " debugger." @@ -103,12 +88,9 @@ help: @echo " For more information, visit dev.sifive.com" ############################################################# -# This section is for tool installation +# This section is for tool configuration ############################################################# -.PHONY: tools -tools: riscv-gnu-toolchain openocd -# Pointers to various important tools in the toolchain. toolchain_builddir := $(builddir)/riscv-gnu-toolchain/riscv64-unknown-elf toolchain_prefix := $(toolchain_builddir)/prefix @@ -122,73 +104,6 @@ RISCV_AR := $(abspath $(RISCV_PATH)/bin/riscv64-unknown-elf-ar) PATH := $(abspath $(RISCV_PATH)/bin):$(PATH) -$(RISCV_GCC) $(RISCV_GXX) $(RISCV_OBJDUMP) $(RISCV_GDB) $(RISCV_AR): $(toolchain_builddir)/install.stamp - touch -c $@ - -# Builds riscv-gnu-toolchain, which contains GCC and all the supporting -# software for C code. -.PHONY: riscv-gnu-toolchain -riscv-gnu-toolchain: $(RISCV_GCC) $(RISCV_GXX) $(RISCV_OBJDUMP) $(RISCV_GDB) $(RISCV_AR) - -$(builddir)/riscv-gnu-toolchain/%/install.stamp: $(builddir)/riscv-gnu-toolchain/%/build.stamp - $(MAKE) -C $(dir $@) install - date > $@ - -$(builddir)/riscv-gnu-toolchain/%/build.stamp: $(builddir)/riscv-gnu-toolchain/%/configure.stamp - $(MAKE) -C $(dir $@) - date > $@ - -$(builddir)/riscv-gnu-toolchain/%-elf/configure.stamp: - $(eval $@_TUPLE := $(patsubst $(builddir)/riscv-gnu-toolchain/%-elf/configure.stamp,%,$@)) - rm -rf $(dir $@) - mkdir -p $(dir $@) - cd $(dir $@); $(abspath $(toolchain_srcdir)/configure) \ - --prefix=$(abspath $(dir $@)/prefix) \ - --disable-linux \ - --enable-multilib \ - --with-cmodel=medany \ - --with-libgcc-cmodel - date > $@ - -.PHONY: toolchain-clean -toolchain-clean: - rm -rf $(toolchain_builddir) - -# Builds and installs OpenOCD, which translates GDB into JTAG for debugging and -# initializing the target. -openocd_builddir := $(builddir)/openocd -openocd_prefix := $(openocd_builddir)/prefix - -RISCV_OPENOCD_PATH ?= $(openocd_prefix) -RISCV_OPENOCD ?= $(RISCV_OPENOCD_PATH)/bin/openocd - -.PHONY: openocd -openocd: $(RISCV_OPENOCD) - -$(RISCV_OPENOCD): $(openocd_builddir)/install.stamp - touch -c $@ - -$(openocd_builddir)/install.stamp: $(openocd_builddir)/build.stamp - $(MAKE) -C $(dir $@) install - date > $@ - -$(openocd_builddir)/build.stamp: $(openocd_builddir)/configure.stamp - $(MAKE) -C $(dir $@) - date > $@ - -$(openocd_builddir)/configure.stamp: - rm -rf $(dir $@) - mkdir -p $(dir $@) - cd $(abspath $(openocd_srcdir)); autoreconf -i - cd $(dir $@); $(abspath $(openocd_srcdir)/configure) \ - --prefix=$(abspath $(dir $@)/prefix) \ - --disable-werror - date > $@ - -.PHONY: openocd-clean -openocd-clean: - rm -rf $(openocd_builddir) - ############################################################# # This Section is for Software Compilation ############################################################# -- cgit v1.2.3