Compare commits
No commits in common. "a376d27260aa49dbf643dbddb000ae6bdd37c70a" and "bab2803568e08a23dea336913d61a5699e603cd7" have entirely different histories.
a376d27260
...
bab2803568
2 changed files with 5 additions and 38 deletions
31
README.md
31
README.md
|
|
@ -37,7 +37,6 @@ mkdir ./build && cd ./build
|
||||||
mkdir /usr/local/riscv && chmod -R 0775 /usr/local/riscv
|
mkdir /usr/local/riscv && chmod -R 0775 /usr/local/riscv
|
||||||
|
|
||||||
# Setup to build newlib for 32bit embedded and compressed cpus.
|
# Setup to build newlib for 32bit embedded and compressed cpus.
|
||||||
# Not needed for ch32fun as it uses musl
|
|
||||||
./configure --prefix=/usr/local/riscv --with-arch=rv32ec \
|
./configure --prefix=/usr/local/riscv --with-arch=rv32ec \
|
||||||
--with-arch=rv32ec \
|
--with-arch=rv32ec \
|
||||||
--with-abi=ilp32e \
|
--with-abi=ilp32e \
|
||||||
|
|
@ -59,36 +58,6 @@ make -j4 build-binutils
|
||||||
Pretty much the same as FreeBSD, just follow the toolchain's `README.md` files
|
Pretty much the same as FreeBSD, just follow the toolchain's `README.md` files
|
||||||
instructions.
|
instructions.
|
||||||
|
|
||||||
First download the tar.gz file from the link in the requirements(Xpack).
|
|
||||||
|
|
||||||
Once you've downloaded the latest release extract the archive into it's own
|
|
||||||
file.
|
|
||||||
|
|
||||||
You should then move the contents into a new directory like so.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
sudo mkdir -p /opt/riscv
|
|
||||||
tar -xvzf ./xpack<name_here>
|
|
||||||
sudo mv ./xpack<name_here>/* /opt/riscv/
|
|
||||||
```
|
|
||||||
|
|
||||||
You will also need to add the location to your path so it's picked up in your
|
|
||||||
terminal.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
# Appends the new location on to the existing path variable.
|
|
||||||
echo "export PATH=/opt/riscv/bin:$PATH" >> ~/.bashrc
|
|
||||||
|
|
||||||
# Sources the bashrc(config file) to update current terminal session.
|
|
||||||
source ~/.bashrc
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
After following the above steps you should now have a working RISC-V toolchain
|
|
||||||
that can be used for development.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,16 +33,14 @@ set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||||
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD")
|
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||||
message("OS:: FreeBSD")
|
message("OS:: FreeBSD")
|
||||||
#set(NEWLIB /usr/local/riscv/riscv32-unknown-elf/include)
|
#set(NEWLIB /usr/local/riscv/riscv32-unknown-elf/include)
|
||||||
#set(NEWLIB /usr/local/lib/gcc/riscv32-unknown-elf/11.3.00/include)
|
set(NEWLIB /usr/local/lib/gcc/riscv32-unknown-elf/11.3.00/include)
|
||||||
set(NEWLIB /compat/linux/opt/riscv/riscv-none-elf/include)
|
set(CMAKE_C_COMPILER riscv32-unknown-elf-gcc)
|
||||||
set(CMAKE_C_COMPILER riscv-none-elf-gcc)
|
set(CMAKE_CXX_COMPILER riscv32-unknown-elf-g++)
|
||||||
set(CMAKE_CXX_COMPILER riscv-none-elf-g++)
|
set(CMAKE_ASM_COMPILER riscv32-unknown-elf-gcc)
|
||||||
set(CMAKE_ASM_COMPILER riscv-none-elf-gcc)
|
|
||||||
|
|
||||||
# Don't know why this is here?
|
# Don't know why this is here?
|
||||||
#set(CMAKE_FIND_ROOT_PATH /usr/local/riscv/)
|
#set(CMAKE_FIND_ROOT_PATH /usr/local/riscv/)
|
||||||
#set(CMAKE_FIND_ROOT_PATH /usr/local/lib/gcc/riscv32-unknown-elf/)
|
set(CMAKE_FIND_ROOT_PATH /usr/local/lib/gcc/riscv32-unknown-elf/)
|
||||||
set(CMAKE_FIND_ROOT_PATH /compat/linux/opt/riscv/)
|
|
||||||
|
|
||||||
#set(CMAKE_SYSROOT "/usr/local/riscv/" /usr/local/riscv/riscv32-unknown-elf)
|
#set(CMAKE_SYSROOT "/usr/local/riscv/" /usr/local/riscv/riscv32-unknown-elf)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue