From 35d42509f1e17322ea17e8702db66ecff271d2a5 Mon Sep 17 00:00:00 2001 From: Shoaib Shaikh Date: Wed, 25 Mar 2026 11:11:51 +0530 Subject: [PATCH] Add continuous mode support to Sipeed SLogic Analyzer - Updated device options to include continuous mode configuration. - Introduced a new boolean field `continuous_mode` in the device context structure. - Modified the scan function to enable continuous mode when applicable. - Enhanced the configuration getters and setters to handle continuous mode. - Adjusted the acquisition start function to handle continuous capture, allowing for unlimited sample bytes. --- README | 200 ++-- make-cxx.exit | 1 + make-cxx.log | 950 ++++++++++++++++++ src/hardware/sipeed-slogic-analyzer/api.c | 9 +- .../sipeed-slogic-analyzer/protocol.c | 16 +- .../sipeed-slogic-analyzer/protocol.h | 1 + 6 files changed, 1080 insertions(+), 97 deletions(-) create mode 100644 make-cxx.exit create mode 100644 make-cxx.log diff --git a/README b/README index 9f56b968d..1b0f1d2d3 100644 --- a/README +++ b/README @@ -1,6 +1,8 @@ ------------------------------------------------------------------------------- README -------------------------------------------------------------------------------- +--- + +--- The sigrok project aims at creating a portable, cross-platform, Free/Libre/Open-Source signal analysis software suite that supports various @@ -10,9 +12,7 @@ libsigrok is a shared library written in C which provides the basic API for talking to hardware and reading/writing the acquired data into various input/output file formats. - -Status ------- +## Status libsigrok is in a usable state and has had official tarball releases. @@ -23,117 +23,142 @@ in the shared library / libtool / .so-file version numbers. However, there are _NO_ guarantees at all for stable APIs in git snapshots! Distro packagers should only use released tarballs (no git snapshots). - -Requirements ------------- +## Requirements Requirements for the C library: - - git (only needed when building from git) - - gcc (>= 4.0) or clang - - make - - autoconf >= 2.63 (only needed when building from git) - - automake >= 1.11 (only needed when building from git) - - libtool (only needed when building from git) - - pkg-config >= 0.22 - - libglib >= 2.32.0 - - zlib (optional, used for CRC32 calculation in STF input) - - libzip >= 0.11 - - libtirpc (optional, used by VXI, fallback when glibc >= 2.26) - - libserialport >= 0.1.1 (optional, used by some drivers) - - librevisa >= 0.0.20130412 (optional, used by some drivers) - - libusb-1.0 >= 1.0.16 (optional, used by some drivers) - - hidapi >= 0.8.0 (optional, used for some HID based "serial cables") - - bluez/libbluetooth >= 4.0 (optional, used for Bluetooth/BLE communication) - - libftdi1 >= 1.0 (optional, used by some drivers) - - libgpib (optional, used by some drivers) - - libieee1284 (optional, used by some drivers) - - libgio >= 2.32.0 (optional, used by some drivers) - - nettle (optional, used by some drivers) - - check >= 0.9.4 (optional, only needed to run unit tests) - - doxygen (optional, only needed for the C API docs) - - graphviz (optional, only needed for the C API docs) +- git (only needed when building from git) +- gcc (>= 4.0) or clang +- make +- autoconf >= 2.63 (only needed when building from git) +- automake >= 1.11 (only needed when building from git) +- libtool (only needed when building from git) +- pkg-config >= 0.22 +- libglib >= 2.32.0 +- zlib (optional, used for CRC32 calculation in STF input) +- libzip >= 0.11 +- libtirpc (optional, used by VXI, fallback when glibc >= 2.26) +- libserialport >= 0.1.1 (optional, used by some drivers) +- librevisa >= 0.0.20130412 (optional, used by some drivers) +- libusb-1.0 >= 1.0.16 (optional, used by some drivers) +- hidapi >= 0.8.0 (optional, used for some HID based "serial cables") +- bluez/libbluetooth >= 4.0 (optional, used for Bluetooth/BLE communication) +- libftdi1 >= 1.0 (optional, used by some drivers) +- libgpib (optional, used by some drivers) +- libieee1284 (optional, used by some drivers) +- libgio >= 2.32.0 (optional, used by some drivers) +- nettle (optional, used by some drivers) +- check >= 0.9.4 (optional, only needed to run unit tests) +- doxygen (optional, only needed for the C API docs) +- graphviz (optional, only needed for the C API docs) Requirements for the C++ bindings: - - libsigrok >= 0.4.0 (the libsigrok C library, see above) - - A C++ compiler with C++11 support (-std=c++11 option), e.g. - - g++ (>= 4.8.1) - - clang++ (>= 3.3) - - autoconf-archive (only needed when building from git) - - doxygen (required for building the bindings, not only for C++ API docs!) - - graphviz (optional, only needed for the C++ API docs) - - Python 3 executable (development files are not needed) - - glibmm-2.4 (>= 2.32.0) or glibmm-2.68 (>= 2.68.0) +- libsigrok >= 0.4.0 (the libsigrok C library, see above) +- A C++ compiler with C++11 support (-std=c++11 option), e.g. + - g++ (>= 4.8.1) + - clang++ (>= 3.3) +- autoconf-archive (only needed when building from git) +- doxygen (required for building the bindings, not only for C++ API docs!) +- graphviz (optional, only needed for the C++ API docs) +- Python 3 executable (development files are not needed) +- glibmm-2.4 (>= 2.32.0) or glibmm-2.68 (>= 2.68.0) Requirements for the Python bindings: - - libsigrokcxx >= 0.4.0 (the libsigrok C++ bindings, see above) - - SWIG >= 2.0.0 - - Python >= 3 (including development files!) - - Python setuptools - - pygobject >= 3.0.0, a.k.a python-gi - - numpy - - doxygen (optional, only needed for the Python API docs) - - graphviz (optional, only needed for the Python API docs) - - doxypy (optional, only needed for the Python API docs) +- libsigrokcxx >= 0.4.0 (the libsigrok C++ bindings, see above) +- SWIG >= 2.0.0 +- Python >= 3 (including development files!) +- Python setuptools +- pygobject >= 3.0.0, a.k.a python-gi +- numpy +- doxygen (optional, only needed for the Python API docs) +- graphviz (optional, only needed for the Python API docs) +- doxypy (optional, only needed for the Python API docs) Requirements for the Ruby bindings: - - libsigrokcxx >= 0.4.0 (the libsigrok C++ bindings, see above) - - Ruby >= 2.5.0 (including development files!) - - SWIG >= 3.0.8 - - YARD (optional, only needed for the Ruby API docs) +- libsigrokcxx >= 0.4.0 (the libsigrok C++ bindings, see above) +- Ruby >= 2.5.0 (including development files!) +- SWIG >= 3.0.8 +- YARD (optional, only needed for the Ruby API docs) Requirements for the Java bindings: - - libsigrokcxx >= 0.4.0 (the libsigrok C++ bindings, see above) - - SWIG >= 2.0.0 - - Java JDK (for JNI includes and the javac/jar binaries) - - doxygen (optional, only needed for the Java API docs) - - graphviz (optional, only needed for the Java API docs) +- libsigrokcxx >= 0.4.0 (the libsigrok C++ bindings, see above) +- SWIG >= 2.0.0 +- Java JDK (for JNI includes and the javac/jar binaries) +- doxygen (optional, only needed for the Java API docs) +- graphviz (optional, only needed for the Java API docs) - -Building and installing ------------------------ +## Building and installing In order to get the libsigrok source code and build it, run: - $ git clone git://sigrok.org/libsigrok - $ cd libsigrok - $ ./autogen.sh - $ ./configure - $ make +$ git clone git://sigrok.org/libsigrok +$ cd libsigrok +$ ./autogen.sh +$ ./configure +$ make For installing libsigrok: - $ make install +$ make install See INSTALL or the following wiki page for more (OS-specific) instructions: - http://sigrok.org/wiki/Building +http://sigrok.org/wiki/Building Please also check the following wiki page in case you encounter any issues: - http://sigrok.org/wiki/Building#FAQ - - -Device-specific issues ----------------------- +http://sigrok.org/wiki/Building#FAQ + +## Windows (MSYS2/MinGW-w64) + +The supported Windows build path is MSYS2 with a MinGW-w64 shell. Install the +matching toolchain for your shell (for example mingw64 or ucrt64), plus the +Autotools and pkg-config stack and the runtime libraries you want enabled. + +Typical packages are: + +- autoconf +- automake +- libtool +- pkgconf +- make +- git +- gcc and g++ from the matching mingw-w64 toolchain +- glib2 +- libzip +- libusb +- zlib +- hidapi +- libftdi +- libserialport + +Then build from the MSYS2 MinGW shell that matches your target: +$ msys2 +$ ./autogen.sh +$ ./configure --disable-java --disable-ruby +$ make +$ make install + +The configure script will select the Windows-specific code paths automatically, +including the MinGW-specific libusb and Winsock settings. If you need USB +device access at runtime, assign the device to a WinUSB/libusb-compatible +driver first; see README.devices for the Windows driver notes. + +## Device-specific issues Please check README.devices for some notes and hints about device- or driver-specific issues to be aware of. - -Firmware --------- +## Firmware Some devices supported by libsigrok need a firmware to be uploaded before the device can be used. See README.devices for details. - -Copyright and license ---------------------- +## Copyright and license libsigrok is licensed under the terms of the GNU General Public License (GPL), version 3 or later. @@ -144,21 +169,14 @@ the library as a whole is licensed under the terms of the GPLv3+. Please see the individual source files for the full list of copyright holders. +## Mailing list -Mailing list ------------- - - https://lists.sourceforge.net/lists/listinfo/sigrok-devel +https://lists.sourceforge.net/lists/listinfo/sigrok-devel - -IRC ---- +## IRC You can find the sigrok developers in the #sigrok IRC channel on Libera.Chat. +## Website -Website -------- - - http://sigrok.org/wiki/Libsigrok - +http://sigrok.org/wiki/Libsigrok diff --git a/make-cxx.exit b/make-cxx.exit new file mode 100644 index 000000000..c22708346 --- /dev/null +++ b/make-cxx.exit @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/make-cxx.log b/make-cxx.log new file mode 100644 index 000000000..75a9c0c05 --- /dev/null +++ b/make-cxx.log @@ -0,0 +1,950 @@ +make all-am + GEN doxy/xml/index.xml + CC src/backend.lo + CC src/binary_helpers.lo + CC src/conversion.lo + CC src/crc.lo + CC src/device.lo + CC src/session.lo + CC src/session_file.lo + CC src/session_driver.lo + CC src/trigger.lo + CC src/hwdriver.lo + CC src/soft-trigger.lo + CC src/analog.lo + CC src/fallback.lo + CC src/resource.lo + CC src/strutil.lo + CC src/log.lo + CC src/version.lo + CC src/error.lo + CC src/std.lo + CC src/sw_limits.lo + CC src/tcp.lo + CC src/input/input.lo +src/tcp.c: In function 'sr_tcp_write_bytes': +src/tcp.c:321:33: warning: pointer targets in passing argument 2 of 'send' differ in signedness [-Wpointer-sign] + 321 | rc = send(tcp->sock_fd, data, dlen, 0); + | ^~~~ + | | + | const uint8_t * {aka const unsigned char *} +In file included from src/tcp.c:30: +D:/Apps/Scoop/apps/msys2/2026-03-22/mingw64/include/winsock2.h:1033:60: note: expected 'const char *' but argument is of type 'const uint8_t *' {aka 'const unsigned char *'} + 1033 | WINSOCK_API_LINKAGE int WSAAPI send(SOCKET s,const char *buf,int len,int flags); + | ~~~~~~~~~~~~^~~ +src/tcp.c: In function 'sr_tcp_read_bytes': +src/tcp.c:362:33: warning: pointer targets in passing argument 2 of 'recv' differ in signedness [-Wpointer-sign] + 362 | rc = recv(tcp->sock_fd, data, dlen, 0); + | ^~~~ + | | + | uint8_t * {aka unsigned char *} +D:/Apps/Scoop/apps/msys2/2026-03-22/mingw64/include/winsock2.h:1028:54: note: expected 'char *' but argument is of type 'uint8_t *' {aka 'unsigned char *'} + 1028 | WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags); + | ~~~~~~^~~ + CC src/input/feed_queue.lo + CC src/input/binary.lo + CC src/input/chronovu_la8.lo + CC src/input/csv.lo + CC src/input/logicport.lo + CC src/input/protocoldata.lo + CC src/input/raw_analog.lo + CC src/input/saleae.lo + CC src/input/trace32_ad.lo + CC src/input/vcd.lo + CC src/input/wav.lo + CC src/input/isf.lo + CC src/input/null.lo + CC src/input/stf.lo + CC src/output/output.lo + CC src/output/analog.lo + CC src/output/ascii.lo + CC src/output/bits.lo + CC src/output/binary.lo + CC src/output/csv.lo + CC src/output/chronovu_la8.lo + CC src/output/wav.lo + CC src/output/hex.lo + CC src/output/ols.lo + CC src/output/srzip.lo + CC src/output/vcd.lo + CC src/output/wavedrom.lo + CC src/output/null.lo + CC src/transform/transform.lo + CC src/transform/nop.lo + CC src/transform/scale.lo + CC src/transform/invert.lo + CC src/scpi/scpi.lo + CC src/scpi/scpi_tcp.lo + CC src/dmm/mm38xr.lo + CC src/dmm/ms2115b.lo + CC src/dmm/ms8250d.lo + CC src/dmm/rs9lcd.lo + CC src/dmm/ut372.lo + CC src/dmm/ut71x.lo + CC src/dmm/vc870.lo + CC src/dmm/vc96.lo + CC src/lcr/es51919.lo + CC src/lcr/vc4080.lo + CC src/scale/kern.lo + CC src/drivers.lo + CC src/hardware/agilent-dmm/protocol.lo + CC src/hardware/agilent-dmm/api.lo + CC src/hardware/appa-55ii/protocol.lo + CC src/hardware/appa-55ii/api.lo + CC src/hardware/arachnid-labs-re-load-pro/protocol.lo + CC src/hardware/arachnid-labs-re-load-pro/api.lo + CC src/hardware/asix-omega-rtm-cli/protocol.lo + CC src/hardware/asix-omega-rtm-cli/api.lo + CC src/hardware/asix-sigma/protocol.lo + CC src/hardware/asix-sigma/api.lo +src/hardware/asix-sigma/protocol.c: In function 'sigma_build_basic_trigger': +src/hardware/asix-sigma/protocol.c:2372:22: warning: array subscript 2 is above array bounds of 'uint16_t[2]' {aka 'short unsigned int[2]'} [-Warray-bounds=] + 2372 | masks[condidx++] = mask; + | ~~~~~^~~~~~~~~~~ +src/hardware/asix-sigma/protocol.c:2342:18: note: while referencing 'masks' + 2342 | uint16_t masks[2]; + | ^~~~~ + CC src/hardware/atorch/protocol.lo + CC src/hardware/atorch/api.lo + CC src/hardware/atten-pps3xxx/protocol.lo + CC src/hardware/atten-pps3xxx/api.lo + CC src/hardware/bkprecision-1856d/protocol.lo + CC src/hardware/bkprecision-1856d/api.lo + CC src/hardware/cem-dt-885x/protocol.lo + CC src/hardware/cem-dt-885x/api.lo + CC src/hardware/center-3xx/protocol.lo + CC src/hardware/center-3xx/api.lo + CC src/hardware/chronovu-la/protocol.lo + CC src/hardware/chronovu-la/api.lo + CC src/hardware/colead-slm/protocol.lo + CC src/hardware/colead-slm/api.lo + CC src/hardware/conrad-digi-35-cpu/protocol.lo + CC src/hardware/conrad-digi-35-cpu/api.lo + CC src/hardware/dcttech-usbrelay/protocol.lo + CC src/hardware/dcttech-usbrelay/api.lo + CC src/hardware/demo/protocol.lo + CC src/hardware/demo/api.lo + CC src/hardware/devantech-eth008/protocol.lo + CC src/hardware/devantech-eth008/api.lo + CC src/hardware/dreamsourcelab-dslogic/protocol.lo + CC src/hardware/dreamsourcelab-dslogic/api.lo + CC src/hardware/fluke-45/protocol.lo + CC src/hardware/fluke-45/api.lo + CC src/hardware/fluke-dmm/protocol.lo + CC src/hardware/fluke-dmm/fluke-18x.lo + CC src/hardware/fluke-dmm/fluke-190.lo + CC src/hardware/fluke-dmm/fluke-28x.lo + CC src/hardware/fluke-dmm/api.lo + CC src/hardware/ftdi-la/protocol.lo + CC src/hardware/ftdi-la/api.lo + CC src/hardware/fx2lafw/protocol.lo + CC src/hardware/fx2lafw/api.lo + CC src/hardware/gmc-mh-1x-2x/protocol.lo + CC src/hardware/gmc-mh-1x-2x/api.lo + CC src/hardware/greatfet/protocol.lo + CC src/hardware/greatfet/api.lo + CC src/hardware/gwinstek-gds-800/protocol.lo + CC src/hardware/gwinstek-gds-800/api.lo + CC src/hardware/gwinstek-gpd/protocol.lo + CC src/hardware/gwinstek-gpd/api.lo + CC src/hardware/gwinstek-psp/protocol.lo + CC src/hardware/gwinstek-psp/api.lo + CC src/hardware/hameg-hmo/protocol.lo + CC src/hardware/hameg-hmo/api.lo + CC src/hardware/hantek-4032l/protocol.lo + CC src/hardware/hantek-4032l/api.lo + CC src/hardware/hantek-6xxx/protocol.lo + CC src/hardware/hantek-6xxx/api.lo + CC src/hardware/hantek-dso/protocol.lo + CC src/hardware/hantek-dso/api.lo + CC src/hardware/hp-3457a/protocol.lo + CC src/hardware/hp-3457a/api.lo + CC src/hardware/hp-59306a/protocol.lo + CC src/hardware/hp-59306a/api.lo + CC src/hardware/icstation-usbrelay/protocol.lo + CC src/hardware/icstation-usbrelay/api.lo + CC src/hardware/ikalogic-scanalogic2/protocol.lo + CC src/hardware/ikalogic-scanalogic2/api.lo + CC src/hardware/ikalogic-scanaplus/protocol.lo + CC src/hardware/ikalogic-scanaplus/api.lo + CC src/hardware/ipdbg-la/protocol.lo + CC src/hardware/ipdbg-la/api.lo + CC src/hardware/itech-it8500/protocol.lo + CC src/hardware/itech-it8500/api.lo + CC src/hardware/juntek-jds6600/protocol.lo + CC src/hardware/juntek-jds6600/api.lo + CC src/hardware/kecheng-kc-330b/protocol.lo + CC src/hardware/kecheng-kc-330b/api.lo + CC src/hardware/kern-scale/protocol.lo + CC src/hardware/kern-scale/api.lo + CC src/hardware/kingst-la2016/protocol.lo + CC src/hardware/kingst-la2016/api.lo + CC src/hardware/korad-kaxxxxp/protocol.lo + CC src/hardware/korad-kaxxxxp/api.lo + CC src/hardware/lascar-el-usb/protocol.lo + CC src/hardware/lascar-el-usb/api.lo + CC src/hardware/lecroy-logicstudio/protocol.lo + CC src/hardware/lecroy-logicstudio/api.lo + CC src/hardware/lecroy-xstream/protocol.lo + CC src/hardware/lecroy-xstream/api.lo + CC src/hardware/link-mso19/protocol.lo + CC src/hardware/link-mso19/api.lo + CC src/hardware/manson-hcs-3xxx/protocol.lo + CC src/hardware/manson-hcs-3xxx/api.lo + CC src/hardware/mastech-ms6514/protocol.lo + CC src/hardware/mastech-ms6514/api.lo + CC src/hardware/maynuo-m97/protocol.lo + CC src/hardware/maynuo-m97/api.lo + CC src/hardware/microchip-pickit2/protocol.lo + CC src/hardware/microchip-pickit2/api.lo + CC src/hardware/mic-985xx/protocol.lo + CC src/hardware/mic-985xx/api.lo + CC src/hardware/motech-lps-30x/protocol.lo + CC src/hardware/motech-lps-30x/api.lo + CC src/hardware/norma-dmm/protocol.lo + CC src/hardware/norma-dmm/api.lo + CC src/hardware/openbench-logic-sniffer/protocol.lo + CC src/hardware/openbench-logic-sniffer/api.lo + CC src/hardware/pce-322a/protocol.lo + CC src/hardware/pce-322a/api.lo + CC src/hardware/pipistrello-ols/protocol.lo + CC src/hardware/pipistrello-ols/api.lo + CC src/hardware/raspberrypi-pico/protocol.lo + CC src/hardware/raspberrypi-pico/api.lo +In file included from src/hardware/raspberrypi-pico/protocol.c:32: +src/hardware/raspberrypi-pico/protocol.c: In function 'process_D4': +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1698:45: note: in expansion of macro 'LOG_PREFIX' + 1698 | #define sr_info(...) sr_log(SR_LOG_INFO, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:174:33: note: in expansion of macro 'sr_info' + 174 | sr_info("D4 Data stream stops with cbyte %d char %c rdidx %d cnt %lu", + | ^~~~~~~ +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1700:45: note: in expansion of macro 'LOG_PREFIX' + 1700 | #define sr_err(...) sr_log(SR_LOG_ERR, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:178:33: note: in expansion of macro 'sr_err' + 178 | sr_err("D4 Data stream aborts with cbyte %d char %c rdidx %d cnt %lu", + | ^~~~~~ +src/hardware/raspberrypi-pico/protocol.c: In function 'process_slice': +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1698:45: note: in expansion of macro 'LOG_PREFIX' + 1698 | #define sr_info(...) sr_log(SR_LOG_INFO, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:240:25: note: in expansion of macro 'sr_info' + 240 | sr_info("Data stream stops with cbyte %d char %c rdidx %d sbytes %d cnt %lu", + | ^~~~~~~ +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1700:45: note: in expansion of macro 'LOG_PREFIX' + 1700 | #define sr_err(...) sr_log(SR_LOG_ERR, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:244:25: note: in expansion of macro 'sr_err' + 244 | sr_err("Data stream aborts with cbyte %d char %c rdidx %d sbytes %d cnt %lu", + | ^~~~~~ +src/hardware/raspberrypi-pico/protocol.c: In function 'process_group': +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1696:45: note: in expansion of macro 'LOG_PREFIX' + 1696 | #define sr_spew(...) sr_log(SR_LOG_SPEW, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:485:25: note: in expansion of macro 'sr_spew' + 485 | sr_spew("Process_group sending %lu post trig samples dsb %d", + | ^~~~~~~ +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:546:33: note: in expansion of macro 'sr_dbg' + 546 | sr_dbg("Sending post trigger logical remainder of %lu", + | ^~~~~~ +src/hardware/raspberrypi-pico/protocol.c: In function 'raspberrypi_pico_receive': +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:782:33: note: in expansion of macro 'sr_dbg' + 782 | sr_dbg("Byte_cnt check device cnt %lu host cnt %lu", + | ^~~~~~ +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:782:33: note: in expansion of macro 'sr_dbg' + 782 | sr_dbg("Byte_cnt check device cnt %lu host cnt %lu", + | ^~~~~~ +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1700:45: note: in expansion of macro 'LOG_PREFIX' + 1700 | #define sr_err(...) sr_log(SR_LOG_ERR, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:785:41: note: in expansion of macro 'sr_err' + 785 | sr_err("ERROR: received %lu and counted %lu bytecnts " \ + | ^~~~~~ +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1700:45: note: in expansion of macro 'LOG_PREFIX' + 1700 | #define sr_err(...) sr_log(SR_LOG_ERR, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:785:41: note: in expansion of macro 'sr_err' + 785 | sr_err("ERROR: received %lu and counted %lu bytecnts " \ + | ^~~~~~ +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:809:17: note: in expansion of macro 'sr_dbg' + 809 | sr_dbg("Ending: sent %u of limit %lu samples byte_cnt %lu", + | ^~~~~~ +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:809:17: note: in expansion of macro 'sr_dbg' + 809 | sr_dbg("Ending: sent %u of limit %lu samples byte_cnt %lu", + | ^~~~~~ +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1696:45: note: in expansion of macro 'LOG_PREFIX' + 1696 | #define sr_spew(...) sr_log(SR_LOG_SPEW, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/protocol.c:814:9: note: in expansion of macro 'sr_spew' + 814 | sr_spew("Receive function done: sent %u limit %lu wrptr %u len %d", + | ^~~~~~~ + CC src/hardware/rdtech-dps/protocol.lo +In file included from src/hardware/raspberrypi-pico/api.c:29: +src/hardware/raspberrypi-pico/api.c: In function 'config_set': +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/api.c:358:17: note: in expansion of macro 'sr_dbg' + 358 | sr_dbg("config_set sr %lu\n", devc->sample_rate); + | ^~~~~~ +src/hardware/raspberrypi-pico/api.c: In function 'config_get': +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1696:45: note: in expansion of macro 'LOG_PREFIX' + 1696 | #define sr_spew(...) sr_log(SR_LOG_SPEW, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/api.c:401:17: note: in expansion of macro 'sr_spew' + 401 | sr_spew("config_get limit_samples of %lu", devc->limit_samples); + | ^~~~~~~ +src/hardware/raspberrypi-pico/api.c: In function 'dev_acquisition_start': +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1699:45: note: in expansion of macro 'LOG_PREFIX' + 1699 | #define sr_warn(...) sr_log(SR_LOG_WARN, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/api.c:581:25: note: in expansion of macro 'sr_warn' + 581 | sr_warn("WARN: Forcing common integer divisor sample rate of " \ + | ^~~~~~~ +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1699:45: note: in expansion of macro 'LOG_PREFIX' + 1699 | #define sr_warn(...) sr_log(SR_LOG_WARN, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/api.c:594:17: note: in expansion of macro 'sr_warn' + 594 | sr_warn("WARN: Non integer ADC divisor of 48Mhz clock for sample " \ + | ^~~~~~~ +src/hardware/raspberrypi-pico/protocol.h:31:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 31 | #define LOG_PREFIX "srpico" + | ^~~~~~~~ +./src/libsigrok-internal.h:1699:45: note: in expansion of macro 'LOG_PREFIX' + 1699 | #define sr_warn(...) sr_log(SR_LOG_WARN, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/raspberrypi-pico/api.c:598:17: note: in expansion of macro 'sr_warn' + 598 | sr_warn("WARN: Non integer PIO divisor of 120Mhz for sample rate " \ + | ^~~~~~~ +src/hardware/raspberrypi-pico/api.c:620:29: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 620 | sprintf(tmpstr, "R%lu\n", devc->sample_rate); + | ~~^ ~~~~~~~~~~~~~~~~~ + | | | + | | uint64_t {aka long long unsigned int} + | long unsigned int + | %llu + CC src/hardware/rdtech-dps/api.lo + CC src/hardware/rdtech-um/protocol.lo + CC src/hardware/rdtech-um/api.lo + CC src/hardware/rdtech-tc/protocol.lo + CC src/hardware/rdtech-tc/api.lo + CC src/hardware/rigol-dg/protocol.lo + CC src/hardware/rigol-dg/api.lo + CC src/hardware/rigol-ds/protocol.lo + CC src/hardware/rigol-ds/api.lo + CC src/hardware/rohde-schwarz-sme-0x/protocol.lo + CC src/hardware/rohde-schwarz-sme-0x/api.lo + CC src/hardware/saleae-logic16/protocol.lo + CC src/hardware/saleae-logic16/api.lo + CC src/hardware/saleae-logic-pro/protocol.lo + CC src/hardware/saleae-logic-pro/api.lo + CC src/hardware/scpi-dmm/protocol.lo + CC src/hardware/scpi-dmm/api.lo + CC src/hardware/scpi-pps/protocol.lo + CC src/hardware/scpi-pps/profiles.lo +src/hardware/scpi-pps/profiles.c: In function 'ea_ps_20xx_probe_channels': +src/hardware/scpi-pps/profiles.c:300:41: warning: unused parameter 'hw_info' [-Wunused-parameter] + 300 | struct sr_scpi_hw_info *hw_info, + | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ + CC src/hardware/scpi-pps/api.lo + CC src/hardware/serial-dmm/protocol.lo + CC src/hardware/serial-dmm/api.lo + CC src/hardware/serial-lcr/protocol.lo + CC src/hardware/serial-lcr/api.lo + CC src/hardware/siglent-sdl10x0/protocol.lo + CC src/hardware/siglent-sdl10x0/api.lo + CC src/hardware/siglent-sds/protocol.lo + CC src/hardware/siglent-sds/api.lo + CC src/hardware/sipeed-slogic-analyzer/protocol.lo + CC src/hardware/sipeed-slogic-analyzer/api.lo + CC src/hardware/sysclk-lwla/lwla.lo +In file included from src/hardware/sipeed-slogic-analyzer/protocol.c:23: +src/hardware/sipeed-slogic-analyzer/protocol.c: In function 'receive_transfer': +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1696:45: note: in expansion of macro 'LOG_PREFIX' + 1696 | #define sr_spew(...) sr_log(SR_LOG_SPEW, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:47:9: note: in expansion of macro 'sr_spew' + 47 | sr_spew("[%d] Transfer #%d status: %d(%s).", + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:67:53: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long long unsigned int'} [-Wsign-compare] + 67 | if (transfer->actual_length >= drop_bytes) { + | ^~ +src/hardware/sipeed-slogic-analyzer/protocol.c:76:68: warning: comparison of integer expressions of different signedness: 'int' and 'uint64_t' {aka 'long long unsigned int'} [-Wsign-compare] + 76 | if (devc->trigger_fired && transfer->actual_length > + | ^ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:82:17: note: in expansion of macro 'sr_dbg' + 82 | sr_dbg("[%u] Got %u/%u(%.2f%%) => speed: %.2fMBps, %.2fMBps(avg), %.0fMBps(exp) => " + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:82:17: note: in expansion of macro 'sr_dbg' + 82 | sr_dbg("[%u] Got %u/%u(%.2f%%) => speed: %.2fMBps, %.2fMBps(avg), %.0fMBps(exp) => " + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:82:17: note: in expansion of macro 'sr_dbg' + 82 | sr_dbg("[%u] Got %u/%u(%.2f%%) => speed: %.2fMBps, %.2fMBps(avg), %.0fMBps(exp) => " + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1700:45: note: in expansion of macro 'LOG_PREFIX' + 1700 | #define sr_err(...) sr_log(SR_LOG_ERR, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:107:33: note: in expansion of macro 'sr_err' + 107 | sr_err("Failed to allocate memory: %u bytes!", + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1700:45: note: in expansion of macro 'LOG_PREFIX' + 1700 | #define sr_err(...) sr_log(SR_LOG_ERR, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:162:17: note: in expansion of macro 'sr_err' + 162 | sr_err("Timeout %.3fms!!! Rate %.2fMBps(avg)<%.0fMBps(exp) or Reach duration limit: %.3f(%u+%.1f%%), %.3f > " + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 11 has type 'long long unsigned int' [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1700:45: note: in expansion of macro 'LOG_PREFIX' + 1700 | #define sr_err(...) sr_log(SR_LOG_ERR, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:162:17: note: in expansion of macro 'sr_err' + 162 | sr_err("Timeout %.3fms!!! Rate %.2fMBps(avg)<%.0fMBps(exp) or Reach duration limit: %.3f(%u+%.1f%%), %.3f > " + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c: In function 'handle_events': +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1698:45: note: in expansion of macro 'LOG_PREFIX' + 1698 | #define sr_info(...) sr_log(SR_LOG_INFO, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:245:17: note: in expansion of macro 'sr_info' + 245 | sr_info("Bulk in %u/%u bytes with %u transfers.", + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1698:45: note: in expansion of macro 'LOG_PREFIX' + 1698 | #define sr_info(...) sr_log(SR_LOG_INFO, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:245:17: note: in expansion of macro 'sr_info' + 245 | sr_info("Bulk in %u/%u bytes with %u transfers.", + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1698:45: note: in expansion of macro 'LOG_PREFIX' + 1698 | #define sr_info(...) sr_log(SR_LOG_INFO, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:245:17: note: in expansion of macro 'sr_info' + 245 | sr_info("Bulk in %u/%u bytes with %u transfers.", + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c: In function 'train_bulk_in_transfer': +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:300:25: note: in expansion of macro 'sr_dbg' + 300 | sr_dbg("Failed to allocate memory: %u bytes! Half it.", + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:307:17: note: in expansion of macro 'sr_dbg' + 307 | sr_dbg("Train: receive %u bytes per %ums...", + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:307:17: note: in expansion of macro 'sr_dbg' + 307 | sr_dbg("Train: receive %u bytes per %ums...", + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:343:9: note: in expansion of macro 'sr_dbg' + 343 | sr_dbg("Choose: receive %u bytes per %ums :)", try_transfer_nbytes, + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:343:9: note: in expansion of macro 'sr_dbg' + 343 | sr_dbg("Choose: receive %u bytes per %ums :)", try_transfer_nbytes, + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c: In function 'sipeed_slogic_acquisition_start': +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long long unsigned int' [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1698:45: note: in expansion of macro 'LOG_PREFIX' + 1698 | #define sr_info(...) sr_log(SR_LOG_INFO, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:375:17: note: in expansion of macro 'sr_info' + 375 | sr_info("Need continuous capture at %uch@%uMHz.", + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1698:45: note: in expansion of macro 'LOG_PREFIX' + 1698 | #define sr_info(...) sr_log(SR_LOG_INFO, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:380:17: note: in expansion of macro 'sr_info' + 380 | sr_info("Need %ux %uch@%uMHz in %ums.", devc->cur_limit_samples, + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'long long unsigned int' [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1698:45: note: in expansion of macro 'LOG_PREFIX' + 1698 | #define sr_info(...) sr_log(SR_LOG_INFO, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:380:17: note: in expansion of macro 'sr_info' + 380 | sr_info("Need %ux %uch@%uMHz in %ums.", devc->cur_limit_samples, + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1698:45: note: in expansion of macro 'LOG_PREFIX' + 1698 | #define sr_info(...) sr_log(SR_LOG_INFO, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:380:17: note: in expansion of macro 'sr_info' + 380 | sr_info("Need %ux %uch@%uMHz in %ums.", devc->cur_limit_samples, + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:409:25: note: in expansion of macro 'sr_dbg' + 409 | sr_dbg("Failed to allocate memory[%d]", + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:416:25: note: in expansion of macro 'sr_dbg' + 416 | sr_dbg("Failed to allocate transfer[%d]", + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:424:70: warning: passing argument 7 of 'libusb_fill_bulk_transfer' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] + 424 | devc->per_transfer_nbytes, receive_transfer, sdi, + | ^~~ +In file included from src/hardware/sipeed-slogic-analyzer/protocol.h:25: +D:/Apps/Scoop/apps/msys2/2026-03-22/mingw64/include/libusb-1.0/libusb.h:1952:15: note: expected 'void *' but argument is of type 'const struct sr_dev_inst *' + 1952 | void *user_data, unsigned int timeout) + | ~~~~~~^~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:433:25: note: in expansion of macro 'sr_dbg' + 433 | sr_dbg("Failed to submit transfer[%d]: %s.", + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:442:9: note: in expansion of macro 'sr_dbg' + 442 | sr_dbg("Submited %u transfers", devc->num_transfers_used); + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.c:473:48: warning: passing argument 1 of 'sipeed_slogic_acquisition_stop' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] + 473 | sipeed_slogic_acquisition_stop(sdi); + | ^~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:118:64: note: expected 'struct sr_dev_inst *' but argument is of type 'const struct sr_dev_inst *' + 118 | SR_PRIV int sipeed_slogic_acquisition_stop(struct sr_dev_inst *sdi); + | ~~~~~~~~~~~~~~~~~~~~^~~ +src/hardware/sipeed-slogic-analyzer/api.c: In function 'scan': +src/hardware/sipeed-slogic-analyzer/api.c:219:60: warning: pointer targets in passing argument 3 of 'libusb_get_string_descriptor_ascii' differ in signedness [-Wpointer-sign] + 219 | cbuf, sizeof(cbuf)); + | ^~~~ + | | + | char * +In file included from src/hardware/sipeed-slogic-analyzer/protocol.h:25, + from src/hardware/sipeed-slogic-analyzer/api.c:23: +D:/Apps/Scoop/apps/msys2/2026-03-22/mingw64/include/libusb-1.0/libusb.h:2200:44: note: expected 'unsigned char *' but argument is of type 'char *' + 2200 | uint8_t desc_index, unsigned char *data, int length); + | ~~~~~~~~~~~~~~~^~~~ +src/hardware/sipeed-slogic-analyzer/api.c:222:60: warning: pointer targets in passing argument 3 of 'libusb_get_string_descriptor_ascii' differ in signedness [-Wpointer-sign] + 222 | usb->devhdl, des.iProduct, cbuf, sizeof(cbuf)); + | ^~~~ + | | + | char * +D:/Apps/Scoop/apps/msys2/2026-03-22/mingw64/include/libusb-1.0/libusb.h:2200:44: note: expected 'unsigned char *' but argument is of type 'char *' + 2200 | uint8_t desc_index, unsigned char *data, int length); + | ~~~~~~~~~~~~~~~^~~~ +src/hardware/sipeed-slogic-analyzer/api.c:226:60: warning: pointer targets in passing argument 3 of 'libusb_get_string_descriptor_ascii' differ in signedness [-Wpointer-sign] + 226 | cbuf, sizeof(cbuf)); + | ^~~~ + | | + | char * +D:/Apps/Scoop/apps/msys2/2026-03-22/mingw64/include/libusb-1.0/libusb.h:2200:44: note: expected 'unsigned char *' but argument is of type 'char *' + 2200 | uint8_t desc_index, unsigned char *data, int length); + | ~~~~~~~~~~~~~~~^~~~ +src/hardware/sipeed-slogic-analyzer/api.c:263:47: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int32_t' {aka 'int'} [-Wsign-compare] + 263 | for (i = 0; i < devc->limit_samplechannel; + | ^ +src/hardware/sipeed-slogic-analyzer/api.c:285:24: warning: passing argument 1 of 'g_free' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] + 285 | g_free(conn); + | ^~~~ +In file included from D:/Apps/Scoop/apps/msys2/2026-03-22/mingw64/include/glib-2.0/glib/glist.h:34, + from D:/Apps/Scoop/apps/msys2/2026-03-22/mingw64/include/glib-2.0/glib/ghash.h:36, + from D:/Apps/Scoop/apps/msys2/2026-03-22/mingw64/include/glib-2.0/glib.h:52, + from src/hardware/sipeed-slogic-analyzer/protocol.h:24: +D:/Apps/Scoop/apps/msys2/2026-03-22/mingw64/include/glib-2.0/glib/gmem.h:74:46: note: expected 'gpointer' {aka 'void *'} but argument is of type 'const char *' + 74 | void (g_free) (gpointer mem); + | ~~~~~~~~~~~~~~~~~~^~~ +src/hardware/sipeed-slogic-analyzer/api.c: In function 'dev_close': +src/hardware/sipeed-slogic-analyzer/api.c:353:29: warning: variable 'drvc' set but not used [-Wunused-but-set-variable] + 353 | struct drv_context *drvc; + | ^~~~ +src/hardware/sipeed-slogic-analyzer/api.c: In function 'config_set': +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long long unsigned int' [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1699:45: note: in expansion of macro 'LOG_PREFIX' + 1699 | #define sr_warn(...) sr_log(SR_LOG_WARN, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:441:25: note: in expansion of macro 'sr_warn' + 441 | sr_warn("Reach limit or not supported, wrap to %uMHz.", + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c: At top level: +src/hardware/sipeed-slogic-analyzer/api.c:523:5: warning: no previous prototype for 'config_channel_set' [-Wmissing-prototypes] + 523 | int config_channel_set(const struct sr_dev_inst *sdi, struct sr_channel *ch, unsigned int changes) { + | ^~~~~~~~~~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c: In function 'config_channel_set': +src/hardware/sipeed-slogic-analyzer/api.c:523:74: warning: unused parameter 'ch' [-Wunused-parameter] + 523 | int config_channel_set(const struct sr_dev_inst *sdi, struct sr_channel *ch, unsigned int changes) { + | ~~~~~~~~~~~~~~~~~~~^~ +src/hardware/sipeed-slogic-analyzer/api.c: In function 'slogic_usb_control_write': +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 8 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1696:45: note: in expansion of macro 'LOG_PREFIX' + 1696 | #define sr_spew(...) sr_log(SR_LOG_SPEW, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:638:9: note: in expansion of macro 'sr_spew' + 638 | sr_spew("%s: req:%u value:%u index:%u %p:%u in %dms.", __func__, + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1699:45: note: in expansion of macro 'LOG_PREFIX' + 1699 | #define sr_warn(...) sr_log(SR_LOG_WARN, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:641:17: note: in expansion of macro 'sr_warn' + 641 | sr_warn("%s: Nothing to write although len(%u)>0!", __func__, + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1699:45: note: in expansion of macro 'LOG_PREFIX' + 1699 | #define sr_warn(...) sr_log(SR_LOG_WARN, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:646:17: note: in expansion of macro 'sr_warn' + 646 | sr_warn("%s: Align up to %u(from %u)!", __func__, len_aligndup, + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1699:45: note: in expansion of macro 'LOG_PREFIX' + 1699 | #define sr_warn(...) sr_log(SR_LOG_WARN, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:646:17: note: in expansion of macro 'sr_warn' + 646 | sr_warn("%s: Align up to %u(from %u)!", __func__, len_aligndup, + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:632:29: warning: variable 'devc' set but not used [-Wunused-but-set-variable] + 632 | struct dev_context *devc; + | ^~~~ +src/hardware/sipeed-slogic-analyzer/api.c: In function 'slogic_usb_control_read': +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 8 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1696:45: note: in expansion of macro 'LOG_PREFIX' + 1696 | #define sr_spew(...) sr_log(SR_LOG_SPEW, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:680:9: note: in expansion of macro 'sr_spew' + 680 | sr_spew("%s: req:%u value:%u index:%u %p:%u in %dms.", __func__, + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1700:45: note: in expansion of macro 'LOG_PREFIX' + 1700 | #define sr_err(...) sr_log(SR_LOG_ERR, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:683:17: note: in expansion of macro 'sr_err' + 683 | sr_err("%s: Can't read to NULL while len(%u)>0!", __func__, + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1699:45: note: in expansion of macro 'LOG_PREFIX' + 1699 | #define sr_warn(...) sr_log(SR_LOG_WARN, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:688:17: note: in expansion of macro 'sr_warn' + 688 | sr_warn("%s: Align up to %u(from %u)!", __func__, len_aligndup, + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1699:45: note: in expansion of macro 'LOG_PREFIX' + 1699 | #define sr_warn(...) sr_log(SR_LOG_WARN, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:688:17: note: in expansion of macro 'sr_warn' + 688 | sr_warn("%s: Align up to %u(from %u)!", __func__, len_aligndup, + | ^~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:674:29: warning: variable 'devc' set but not used [-Wunused-but-set-variable] + 674 | struct dev_context *devc; + | ^~~~ +src/hardware/sipeed-slogic-analyzer/api.c: At top level: +src/hardware/sipeed-slogic-analyzer/api.c:745:5: warning: no previous prototype for 'slogic_soft_trigger_raw_data' [-Wmissing-prototypes] + 745 | int slogic_soft_trigger_raw_data(void *data, size_t len, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c: In function 'slogic_combo8_remote_stop': +src/hardware/sipeed-slogic-analyzer/api.c:877:33: warning: unused variable 'usb' [-Wunused-variable] + 877 | struct sr_usb_dev_inst *usb = sdi->conn; + | ^~~ +src/hardware/sipeed-slogic-analyzer/api.c:876:29: warning: unused variable 'devc' [-Wunused-variable] + 876 | struct dev_context *devc = sdi->priv; + | ^~~~ +src/hardware/sipeed-slogic-analyzer/api.c: In function 'slogic16U3_remote_test_mode': +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:910:25: note: in expansion of macro 'sr_dbg' + 910 | sr_dbg("[%u]read aux testmode: %08x.", retry, + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:895:29: warning: unused variable 'devc' [-Wunused-variable] + 895 | struct dev_context *devc = sdi->priv; + | ^~~~ +In file included from src/hardware/sipeed-slogic-analyzer/protocol.h:30: +src/hardware/sipeed-slogic-analyzer/api.c: In function 'slogic16U3_remote_reset': +./src/libsigrok-internal.h:59:27: warning: passing argument 5 of 'slogic_usb_control_write' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] + 59 | #define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a) + | ^~~ +src/hardware/sipeed-slogic-analyzer/api.c:957:17: note: in expansion of macro 'ARRAY_AND_SIZE' + 957 | ARRAY_AND_SIZE(cmd_rst), 500); + | ^~~~~~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:628:62: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'const uint8_t *' {aka 'const unsigned char *'} + 628 | uint16_t index, uint8_t *data, size_t len, + | ~~~~~~~~~^~~~ +./src/libsigrok-internal.h:59:27: warning: passing argument 5 of 'slogic_usb_control_write' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] + 59 | #define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a) + | ^~~ +src/hardware/sipeed-slogic-analyzer/api.c:961:34: note: in expansion of macro 'ARRAY_AND_SIZE' + 961 | ARRAY_AND_SIZE(cmd_derst), 500); + | ^~~~~~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:628:62: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'const uint8_t *' {aka 'const unsigned char *'} + 628 | uint16_t index, uint8_t *data, size_t len, + | ~~~~~~~~~^~~~ +src/hardware/sipeed-slogic-analyzer/api.c:951:29: warning: unused variable 'devc' [-Wunused-variable] + 951 | struct dev_context *devc = sdi->priv; + | ^~~~ +src/hardware/sipeed-slogic-analyzer/api.c: In function 'slogic16U3_remote_run': +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:982:25: note: in expansion of macro 'sr_dbg' + 982 | sr_dbg("[%u]read aux channel: %08x.", retry, + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:1011:56: warning: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'unsigned int'} [-Wsign-compare] + 1011 | if ((1 << devc->cur_samplechannel) - 1 != + | ^~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:1031:25: note: in expansion of macro 'sr_dbg' + 1031 | sr_dbg("[%u]read aux samplerate: %08x.", retry, + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:1053:33: note: in expansion of macro 'sr_dbg' + 1053 | sr_dbg("Failed to configure samplerate from base[%u] %u.", + | ^~~~~~ +src/hardware/sipeed-slogic-analyzer/protocol.h:32:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=] + 32 | #define LOG_PREFIX "sipeed-slogic-analyzer" + | ^~~~~~~~~~~~~~~~~~~~~~~~ +./src/libsigrok-internal.h:1697:45: note: in expansion of macro 'LOG_PREFIX' + 1697 | #define sr_dbg(...) sr_log(SR_LOG_DBG, LOG_PREFIX ": " __VA_ARGS__) + | ^~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:1105:25: note: in expansion of macro 'sr_dbg' + 1105 | sr_dbg("[%u]read vref(/1024x1v6): %08x.", retry, + | ^~~~~~ +./src/libsigrok-internal.h:59:27: warning: passing argument 5 of 'slogic_usb_control_write' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] + 59 | #define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a) + | ^~~ +src/hardware/sipeed-slogic-analyzer/api.c:1149:41: note: in expansion of macro 'ARRAY_AND_SIZE' + 1149 | ARRAY_AND_SIZE(cmd_run), 500); + | ^~~~~~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:628:62: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'const uint8_t *' {aka 'const unsigned char *'} + 628 | uint16_t index, uint8_t *data, size_t len, + | ~~~~~~~~~^~~~ +src/hardware/sipeed-slogic-analyzer/api.c: In function 'slogic16U3_remote_stop': +./src/libsigrok-internal.h:59:27: warning: passing argument 5 of 'slogic_usb_control_write' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] + 59 | #define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a) + | ^~~ +src/hardware/sipeed-slogic-analyzer/api.c:1158:41: note: in expansion of macro 'ARRAY_AND_SIZE' + 1158 | ARRAY_AND_SIZE(cmd_stop), 500); + | ^~~~~~~~~~~~~~ +src/hardware/sipeed-slogic-analyzer/api.c:628:62: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'const uint8_t *' {aka 'const unsigned char *'} + 628 | uint16_t index, uint8_t *data, size_t len, + | ~~~~~~~~~^~~~ +src/hardware/sipeed-slogic-analyzer/api.c: At top level: +src/hardware/sipeed-slogic-analyzer/api.c:1204:56: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] + 1204 | static struct slogic_model *const support_models_ptr = &support_models[0]; + | ^ + CC src/hardware/sysclk-lwla/lwla1016.lo + CC src/hardware/sysclk-lwla/lwla1034.lo + CC src/hardware/sysclk-lwla/protocol.lo + CC src/hardware/sysclk-lwla/api.lo + CC src/hardware/sysclk-sla5032/protocol.lo + CC src/hardware/sysclk-sla5032/api.lo + CC src/hardware/teleinfo/protocol.lo + CC src/hardware/teleinfo/api.lo + CC src/hardware/testo/protocol.lo + CC src/hardware/testo/api.lo + CC src/hardware/tondaj-sl-814/protocol.lo + CC src/hardware/tondaj-sl-814/api.lo + CC src/hardware/uni-t-dmm/protocol.lo + CC src/hardware/uni-t-dmm/api.lo + CC src/hardware/uni-t-ut181a/protocol.lo + CC src/hardware/uni-t-ut181a/api.lo + CC src/hardware/uni-t-ut32x/protocol.lo + CC src/hardware/uni-t-ut32x/api.lo + CC src/hardware/yokogawa-dlm/protocol.lo + CC src/hardware/yokogawa-dlm/protocol_wrappers.lo + CC src/hardware/yokogawa-dlm/api.lo + CC src/hardware/zeroplus-logic-cube/analyzer.lo + CC src/hardware/zeroplus-logic-cube/gl_usb.lo + CC src/hardware/zeroplus-logic-cube/protocol.lo + CC src/hardware/zeroplus-logic-cube/api.lo + CC src/hardware/zketech-ebd-usb/protocol.lo + CC src/hardware/zketech-ebd-usb/api.lo + CC src/driver_list_start.lo + CC src/driver_list_stop.lo + GEN bindings/cxx/enums.timestamp + CXX bindings/cxx/classes.lo + CCLD src/libdrivers.la + CCLD src/libdrivers_head.la +copying selected object files to avoid basename conflicts... + CCLD src/libdrivers_tail.la + CCLD src/libdrivers.o + GEN src/libdrivers.lo + CCLD libsigrok.la +copying selected object files to avoid basename conflicts... + CXXLD bindings/cxx/libsigrokcxx.la diff --git a/src/hardware/sipeed-slogic-analyzer/api.c b/src/hardware/sipeed-slogic-analyzer/api.c index d736e380f..c5e824218 100644 --- a/src/hardware/sipeed-slogic-analyzer/api.c +++ b/src/hardware/sipeed-slogic-analyzer/api.c @@ -33,7 +33,7 @@ static const uint32_t drvopts[] = { }; static const uint32_t devopts[] = { - SR_CONF_CONTINUOUS, + SR_CONF_CONTINUOUS | SR_CONF_GET | SR_CONF_SET, SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, @@ -253,6 +253,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) devc->cur_samplechannel = devc->limit_samplechannel; devc->cur_samplerate = devc->limit_samplerate; + devc->continuous_mode = TRUE; devc->cur_pattern_mode_idx = PATTERN_MODE_NORMAL; devc->voltage_threshold[0] = devc->voltage_threshold[1] = 1.7000000000000004; @@ -406,6 +407,9 @@ static int config_get(uint32_t key, GVariant **data, case SR_CONF_LIMIT_SAMPLES: *data = g_variant_new_uint64(devc->cur_limit_samples); break; + case SR_CONF_CONTINUOUS: + *data = g_variant_new_boolean(devc->continuous_mode); + break; case SR_CONF_VOLTAGE_THRESHOLD: *data = std_gvar_tuple_double(devc->voltage_threshold[0], devc->voltage_threshold[1]); @@ -502,6 +506,9 @@ static int config_set(uint32_t key, GVariant *data, case SR_CONF_LIMIT_SAMPLES: devc->cur_limit_samples = g_variant_get_uint64(data); break; + case SR_CONF_CONTINUOUS: + devc->continuous_mode = g_variant_get_boolean(data); + break; case SR_CONF_VOLTAGE_THRESHOLD: g_variant_get(data, "(dd)", &devc->voltage_threshold[0], &devc->voltage_threshold[1]); diff --git a/src/hardware/sipeed-slogic-analyzer/protocol.c b/src/hardware/sipeed-slogic-analyzer/protocol.c index ffe88185f..367e560a9 100644 --- a/src/hardware/sipeed-slogic-analyzer/protocol.c +++ b/src/hardware/sipeed-slogic-analyzer/protocol.c @@ -370,11 +370,17 @@ SR_PRIV int sipeed_slogic_acquisition_start(const struct sr_dev_inst *sdi) } devc->samples_got_nbytes = 0; - devc->samples_need_nbytes = - devc->cur_limit_samples * devc->cur_samplechannel / 8; - sr_info("Need %ux %uch@%uMHz in %ums.", devc->cur_limit_samples, - devc->cur_samplechannel, devc->cur_samplerate / SR_MHZ(1), - 1000 * devc->cur_limit_samples / devc->cur_samplerate); + if (devc->continuous_mode) { + devc->samples_need_nbytes = UINT64_MAX; + sr_info("Need continuous capture at %uch@%uMHz.", + devc->cur_samplechannel, devc->cur_samplerate / SR_MHZ(1)); + } else { + devc->samples_need_nbytes = + devc->cur_limit_samples * devc->cur_samplechannel / 8; + sr_info("Need %ux %uch@%uMHz in %ums.", devc->cur_limit_samples, + devc->cur_samplechannel, devc->cur_samplerate / SR_MHZ(1), + 1000 * devc->cur_limit_samples / devc->cur_samplerate); + } if ((ret = train_bulk_in_transfer(devc, usb->devhdl)) != SR_OK) { sr_err("Failed to train bulk_in_transfer!`"); diff --git a/src/hardware/sipeed-slogic-analyzer/protocol.h b/src/hardware/sipeed-slogic-analyzer/protocol.h index 1118877c4..b3a88165c 100644 --- a/src/hardware/sipeed-slogic-analyzer/protocol.h +++ b/src/hardware/sipeed-slogic-analyzer/protocol.h @@ -74,6 +74,7 @@ struct dev_context { uint64_t cur_limit_samples; uint64_t cur_samplerate; int32_t cur_samplechannel; + gboolean continuous_mode; int64_t cur_pattern_mode_idx; uint32_t expected_rate_MBps; }; // configuration