我想在Windows7/8/10 32或64位下使用riscv-gcc。我从https://github.com/riscv/riscv-gcc下载了源文件,我多次尝试使用MinGW构建riscv-gcc,每次我都得到一个错误,然后我试图消除这个错误,但在下一次尝试构建时,我又得到了一个错误(以下是一个小列表:
1)
c:/mingw/build/riscv-gcc/binutils-2.21.1/libiberty/hashtab.c: In function 'hash_pointer':
c:/mingw/build/riscv-gcc/binutils-2.21.1/libiberty/hashtab.c:202:24: error: 'intptr_t' undeclared (first use in this function)
return (hashval_t) ((intptr_t)p >> 3);2)
c:/mingw/build/riscv-gcc/binutils-2.21.1/libiberty/hashtab.c:418:64: error: 'free' undeclared (first use in this function)
return htab_create_alloc (size, hash_f, eq_f, del_f, calloc, free);3)
:/mingw/build/riscv-gcc/binutils-2.21.1/libiberty/fibheap.c:38:24: error: 'LONG_MIN' undeclared (first use in this function)
#define FIBHEAPKEY_MIN LONG_MIN4)
c:/mingw/build/riscv-gcc/binutils-2.21.1/libiberty/unlink-if-ordinary.c: In function 'unlink_if_ordinary':
c:/mingw/build/riscv-gcc/binutils-2.21.1/libiberty/unlink-if-ordinary.c:65:15: error: storage size of 'st' isn't known
struct stat st;5)
up.c:gcc -c -DHAVE_CONFIG_H -g -O2 -D__USE_MINGW_ACCESS -I. -I/c/mingw/build/riscv-gcc/binutils-2.21.1/libiberty/../include -W -Wall -Wwrite-strings -Wc++-co pat -Wstrict-prototypes -pedantic /c/mingw/build/riscv-gcc/binutils-2.21.1/libiberty/sort.c -o sort.o3
:3: warningcc -c -DHAVE_CONFIG_H -g -O2 -D__USE_MINGW_ACCESS -I. -I/c/mingw/build/riscv-gcc/binutils-2.21.1/libiberty/../include -W -Wall -Wwrite-strings -Wc +-compat -Wstrict-prototypes -pedantic /c/mingw/build/riscv-gcc/binutils-2.21.1/libiberty/xstrerror.c -o xstrerror.og
implicit declaration of function 'strlen' [-Wimplicimake[3]: t*** [unlink-if-ordinary.o] Error 1我不是一个"linux家伙“,我只是想有一个Windows兼容的工具链,以便在我的FPGA项目中与RISC-V软核一起使用。有没有人已经有Windows版的riscv-gcc?非常感谢!
我已经完成了一些实验,我的结论是:-如果你的唯一目标是在FPGA中使用RISC-V (或MIPS),而你不想与Linux有任何交易,最好的解决方案是FPGArduino http://www.nxlab.fer.hr/fpgarduino/我用Xilinx Spartan-3AN Starter Kit测试了它,并成功地将其移植到自定义的Spartan-6板上。
发布于 2016-11-16 12:24:53
我建议,如果你使用的是Windows10,那么你可以注册预览版本,然后你就可以使用Windows Subsystem for Linux了。根据riscv.org网站上提供的说明,我已经能够使用它来下载和构建riscv工具链。
https://stackoverflow.com/questions/34850477
复制相似问题