RISC-V MCU中文社区

【求助】 windows下编译riscv openocd

发表于 NucleiStudio讨论专区 2024-03-25 14:35:36
2
264
0

在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) {..........






                                 

喜欢0
用户评论 (2)
  • huahuayuanyuan

    2024-03-29 08:54:42 huahuayuanyuan 1#

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

  • 小白two

    2024-03-26 11:42:05 小白two 2#

    你是要编译openocd么?

huahuayuanyuan

huahuayuanyuan 实名认证

懒的都不写签名

积分
问答
粉丝
关注
  • RV-STAR 开发板
  • RISC-V处理器设计系列课程
  • 培养RISC-V大学土壤 共建RISC-V教育生态
RV-STAR 开发板