在
https://github.com/riscv-mcu/riscv-openocd 下载源码,基于windows的msys2中搭建环境编译
执行make后提示错误,是什么原因?有用过的小伙伴吗?官方技术支持能解答一下吗?
错误提示如下:有error关键字的地方都粘贴上来了。
../src/jtag/drivers/mpsse.c: In func
tion '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) {..........