Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace binary toolchain with code to download it from SiFive #23

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
toolchain/riscv/Linux/
# IntelliJ/CLion
.idea

Expand Down
1 change: 1 addition & 0 deletions make_scripts_riscv/project.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

MAKECMDGOALS ?= all
all: all_binaries
all_binaries: toolchain
# see below for recipe of 'all' target
#
# # other components will add dependencies to 'all_binaries'. The
Expand Down
21 changes: 20 additions & 1 deletion make_scripts_riscv/toolchain.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
CONFIG_TOOLPLATFORM=$(shell uname |cut -d '_' -f1)
CONFIG_TOOLCHAIN_NAME=riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6
CONFIG_TOOLPATH=$(BL60X_SDK_PATH)/toolchain/riscv/$(CONFIG_TOOLPLATFORM)
##change to your toolchain path
CONFIG_TOOLPREFIX ?= $(BL60X_SDK_PATH)/toolchain/riscv/$(shell uname |cut -d '_' -f1)/bin/riscv64-unknown-elf-
CONFIG_TOOLPREFIX ?= $(CONFIG_TOOLPATH)/bin/riscv64-unknown-elf-
#CONFIG_TOOLPREFIX ?= riscv64-unknown-elf-

all: toolchain

$(CONFIG_TOOLPATH)/.installed:
$(summary) WGET $(CONFIG_TOOLCHAIN_NAME).tar.gz
cd $(CONFIG_TOOLPATH) && wget https://static.dev.sifive.com/dev-tools/$(CONFIG_TOOLCHAIN_NAME).tar.gz
$(summary) TAR $(patsubst $(PWD)/%,%,$(CONFIG_TOOLCHAIN_NAME).tar.gz)
cd $(CONFIG_TOOLPATH) && tar -zxf $(CONFIG_TOOLCHAIN_NAME).tar.gz -C . --strip-components=1
$(summary) RM $(patsubst $(PWD)/%,%,$(CONFIG_TOOLCHAIN_NAME).tar.gz)
cd $(CONFIG_TOOLPATH) && rm $(CONFIG_TOOLCHAIN_NAME).tar.gz
$(summary) TOUCH $@
touch $@

# use hidden file as indicator that toolchain is fine, but if it's not, try
# downloading it from SiFive, unpack in place and remove tarball
toolchain: $(CONFIG_TOOLPATH)/.installed
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-ar
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-as
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-c++
Binary file not shown.
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-cpp
Binary file not shown.
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-g++
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-gcc
Binary file not shown.
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-gcc-ar
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-gcc-nm
Binary file not shown.
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-gcov
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-gdb
Binary file not shown.
116 changes: 0 additions & 116 deletions toolchain/riscv/Linux/bin/riscv64-unknown-elf-gdb-add-index

This file was deleted.

Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-gprof
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-ld
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-ld.bfd
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-nm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-size
Binary file not shown.
Binary file not shown.
Binary file removed toolchain/riscv/Linux/bin/riscv64-unknown-elf-strip
Binary file not shown.
Loading