indeed, when i run
thomas@thomas-VirtualBox:~/freedom-e-sdk$ make software PROGRAM=demo_gpio BOARD=freedom-e300-arty
it builds all the system call functions in bsp/libwrap/sys, which belongs to the SiFive toolchain. Then, how can I use the riscv gcc toolchain?
thanks.
make[1]: Entering directory '/home/thomas/freedom-e-sdk/software/demo_gpio'
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/env/start.o /home/thomas/freedom-e-sdk/bsp/env/start.S
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/env/entry.o /home/thomas/freedom-e-sdk/bsp/env/entry.S
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -include sys/cdefs.h -c -o demo_gpio.o demo_gpio.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -include sys/cdefs.h -c -o /home/thomas/freedom-e-sdk/bsp/drivers/plic/plic_driver.o /home/thomas/freedom-e-sdk/bsp/drivers/plic/plic_driver.c
/home/thomas/freedom-e-sdk/bsp/drivers/plic/plic_driver.c: In function 'volatile_memzero':
/home/thomas/freedom-e-sdk/bsp/drivers/plic/plic_driver.c:16:36: warning: comparison of distinct pointer types lacks a cast
for (ptr = (uint32_t *)base; ptr < (base + size); ptr++){
^
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -include sys/cdefs.h -c -o /home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty/init.o /home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty/init.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/stdlib/malloc.o /home/thomas/freedom-e-sdk/bsp/libwrap/stdlib/malloc.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/open.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/open.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/lseek.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/lseek.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/read.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/read.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/write.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/write.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/fstat.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/fstat.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/stat.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/stat.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/close.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/close.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/link.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/link.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/unlink.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/unlink.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/execve.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/execve.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/fork.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/fork.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/getpid.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/getpid.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/kill.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/kill.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/wait.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/wait.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/isatty.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/isatty.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/times.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/times.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/sbrk.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/sbrk.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/_exit.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/_exit.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/puts.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/puts.c
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty -c -o /home/thomas/freedom-e-sdk/bsp/libwrap/misc/write_hex.o /home/thomas/freedom-e-sdk/bsp/libwrap/misc/write_hex.c
riscv-none-embed-ar rcs libwrap.a /home/thomas/freedom-e-sdk/bsp/libwrap/stdlib/malloc.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/open.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/lseek.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/read.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/write.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/fstat.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/stat.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/close.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/link.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/unlink.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/execve.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/fork.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/getpid.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/kill.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/wait.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/isatty.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/times.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/sbrk.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/_exit.o /home/thomas/freedom-e-sdk/bsp/libwrap/sys/puts.o /home/thomas/freedom-e-sdk/bsp/libwrap/misc/write_hex.o
riscv-none-embed-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32ima -mabi=ilp32 -mcmodel=medany -I/home/thomas/freedom-e-sdk/bsp/include -I/home/thomas/freedom-e-sdk/bsp/drivers/ -I/home/thomas/freedom-e-sdk/bsp/env -I/home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty /home/thomas/freedom-e-sdk/bsp/env/start.o /home/thomas/freedom-e-sdk/bsp/env/entry.o demo_gpio.o /home/thomas/freedom-e-sdk/bsp/drivers/plic/plic_driver.o /home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty/init.o -o demo_gpio -Wl,--wrap=malloc -Wl,--wrap=free -Wl,--wrap=open -Wl,--wrap=lseek -Wl,--wrap=read -Wl,--wrap=write -Wl,--wrap=fstat -Wl,--wrap=stat -Wl,--wrap=close -Wl,--wrap=link -Wl,--wrap=unlink -Wl,--wrap=execve -Wl,--wrap=fork -Wl,--wrap=getpid -Wl,--wrap=kill -Wl,--wrap=wait -Wl,--wrap=isatty -Wl,--wrap=times -Wl,--wrap=sbrk -Wl,--wrap=_exit -Wl,--wrap=puts -Wl,--wrap=_malloc -Wl,--wrap=_free -Wl,--wrap=_open -Wl,--wrap=_lseek -Wl,--wrap=_read -Wl,--wrap=_write -Wl,--wrap=_fstat -Wl,--wrap=_stat -Wl,--wrap=_close -Wl,--wrap=_link -Wl,--wrap=_unlink -Wl,--wrap=_execve -Wl,--wrap=_fork -Wl,--wrap=_getpid -Wl,--wrap=_kill -Wl,--wrap=_wait -Wl,--wrap=_isatty -Wl,--wrap=_times -Wl,--wrap=_sbrk -Wl,--wrap=__exit -Wl,--wrap=_puts -L. -Wl,--start-group -lwrap -lc -Wl,--end-group -T /home/thomas/freedom-e-sdk/bsp/env/freedom-e300-arty/flash.lds -nostartfiles -L/home/thomas/freedom-e-sdk/bsp/env --specs=nano.specs
make[1]: Leaving directory '/home/thomas/freedom-e-sdk/software/demo_gpio'