treideme / openocd-hacks

Sources of the OpenOCD that are maintained by @karlp. Attempt to upstream to the latest MRS release and ressurect RISCV Semihosting for WCH parts.
Other
7 stars 5 forks source link

CH347 library missing #1

Open treideme opened 1 year ago

treideme commented 1 year ago

It won't build without the CH347 library.

./bootstrap
./configure --enable-wlinke --enable-ch347 --program-prefix=/opt/openocdhacks/ --disable-werror
make

Error:

...
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./src -I./src -DPKGDATADIR=\"/usr/local/share/openocd\" -DBINDIR=\"/usr/local/bin\" -DFD_SETSIZE=128 -I./jimtcl -I./jimtcl -isystem /usr/include/libusb-1.0 -I/usr/include/libftdi1 -I/usr/include/libusb-1.0 -I/usr/include/hidapi -I/usr/include/libusb-1.0 -I./src/jtag/drivers/libjaylink/libjaylink -I./src/jtag/drivers/libjaylink -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Wpointer-arith -Wundef -Wno-error=deprecated-declarations -DFD_SETSIZE=128 -g -O2 -MT src/jtag/drivers/libocdjtagdrivers_la-ch347.lo -MD -MP -MF src/jtag/drivers/.deps/libocdjtagdrivers_la-ch347.Tpo -c src/jtag/drivers/ch347.c -o src/jtag/drivers/libocdjtagdrivers_la-ch347.o
src/jtag/drivers/ch347.c:118:10: fatal error: CH347LIB.h: No such file or directory
  118 | #include <CH347LIB.h>

A possible workaround is to explicitly disable the ch347 support.

./configure --enable-wlinke --disable-ch347 --program-prefix=/opt/openocdhacks/ --disable-werror
jnk0le commented 3 months ago

https://github.com/WCHSoftGroup/ch341par_linux should have prebuild linux files for ch347. header is of course CH347_lib.h instead of CH347LIB.h

https://github.com/WCHSoftGroup/ch347/blob/main/OpenOCD_SourceCode_CH347/src/jtag/drivers/ch347.c cold be the source, no associated header