🔍 搜索帖子 / 资讯 / 芯片型号…
论坛/NucleiStudio讨论专区/windows下编译riscv openocd
windows下编译riscv openocd
NucleiStudio讨论专区 作者 yuxin 发布于 2024-03-25 14:35(928 天前) 4443 浏览

在https://github.com/riscv-mcu/riscv-openocd 下载源码,基于windows的msys2中搭建环境编译

执行make后提示错误,是什么原因?有用过的小伙伴吗?官方技术支持能解答一下吗?

错误提示如下:有error关键字的地方都粘贴上来了。

../src/jtag/drivers/mpsse.c: In function 'open_matching_device':

../src/jtag/drivers/mpsse.c: 368:39:error: comparison is always true due to limited range of data type [-Werror=type-limits]

368 | if (product && ctx->interface >= FTD2XX_CHANNEL_MIN && ctx->interface <= FTD2XX_CHANNEL_MAX) {

       |                                                                  ^~

../src/jtag/drivers/mpsse.c:381:43:error: comparison of integer expressions of different signedness: 'int' and 'DWORD' {aka 'long unsigned int'} [-Werror=sign-compare]

381 | for (int i = 0; i < ft_cnt; i++) {

       |                                                                  ^~

../src/jtag/drivers/mpsse.c:401:79: error: assignment discards 'const' qualifier from pointer target  type [-Werror=discarded-qualifiers]

 401 |      ft_matched_device_description = product;   

        |                                                                  ^~

In file included from ../src/jtag/drivers/mpsse.c:24:

../src/jtag/drivers/mpsse.c:444:27: error: format  '%x' expects argument of type 'unsigned int', but argument 6 has type 'ULONG' {aka 'long unsigned int'} [-Werror=format=]

 444 | LOG_ERROR("unsupported FTDI chip type (D2xx): 0x%04x", devInfo[ft_matched_device_id].Type);

../src/jtag/drivers/mpsse.c: In function 'mpsse_purge':

../src/jtag/drivers/mpsse.c:666:27: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'FT_STATUS' {aka 'long unsigned int'} [-Werror=format=]

 666 | LOG_ERROR("unable to purge  ftdi tx&rx buffers: %ul", ft_status);

../src/jtag/drivers/mpsse.c: In function 'mpsse_flush':

../src/jtag/drivers/mpsse.c:1145:27: error: format '%d' expects argument of type 'int', but argument  6 has type 'DWORD' {aka 'long unsigned int'} [-Werror=format=]

 1145 | LOG_ERROR("ftdi device did not accept all data: %d, tried %d",............

../src/jtag/drivers/mpsse.c:1150:27: error: format '%d' expects argument of type 'int', but argument  6 has type 'DWORD' {aka 'long unsigned int'} [-Werror=format=]

 1150 | LOG_ERROR("ftdi device did  not return all data: %d, expected %d",...............

../src/jtag/drivers/mpsse.c:1141:12: error: 'ft_status' may be used uninitialized [-Werror=maybe-uninitialized]

 1141 | if (ft_status != FT_OK) {..........






                                 

全部回复 2
y
yuxin925 天前 · 1 楼

我编译openocd官方 https://sourceforge.net/p/openocd/code/ci/master/tree/ 的代码没有出错,但是芯来科技的https://github.com/riscv-mcu/riscv-openocd?tab=readme-ov-file 就提示以上的错误,有官方的技术支持能答疑一下吗?

小
小白two927 天前 · 2 楼

你是要编译openocd么?

💡 请 登录 后参与讨论(微信扫码即登录/注册)