首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >riscv-适用于Windows的gcc

riscv-适用于Windows的gcc
EN

Stack Overflow用户
提问于 2016-01-18 16:47:00
回答 1查看 2.2K关注 0票数 1

我想在Windows7/8/10 32或64位下使用riscv-gcc。我从https://github.com/riscv/riscv-gcc下载了源文件,我多次尝试使用MinGW构建riscv-gcc,每次我都得到一个错误,然后我试图消除这个错误,但在下一次尝试构建时,我又得到了一个错误(以下是一个小列表:

1)

代码语言:javascript
复制
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)

代码语言:javascript
复制
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)

代码语言:javascript
复制
:/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_MIN

4)

代码语言:javascript
复制
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)

代码语言:javascript
复制
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板上。

EN

回答 1

Stack Overflow用户

发布于 2016-11-16 12:24:53

我建议,如果你使用的是Windows10,那么你可以注册预览版本,然后你就可以使用Windows Subsystem for Linux了。根据riscv.org网站上提供的说明,我已经能够使用它来下载和构建riscv工具链。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34850477

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档