Gerhard Sittig [Sun, 13 Jan 2019 10:43:27 +0000 (11:43 +0100)]
appimage: pass $ARCH to appimagetool
More recent appimagetool(1) implementations require an ARCH spec, since
auto-detection finds several architectures in the application directory.
This addresses part of bug #1349 (newer AppImageKit versions are
required to unbreak the magic bytes in the ELF header).
Gerhard Sittig [Sat, 17 Nov 2018 19:32:25 +0000 (20:32 +0100)]
new-driver: keep driver_info local to the api.c source file
There is a circular reference between the driver info structure (which
lists callback routines) and a driver's routines (one of them may have
to reference the driver info). Add a forward declaration, and keep the
declaration and the implementation 'static' within the api.c source
file. Otherwise linker issues may arise should developers put the
declaration into protocol.h since it's marked as SR_PRIV in the template.
Gerhard Sittig [Tue, 9 Oct 2018 17:27:06 +0000 (19:27 +0200)]
eevblog-121gw: introduce BLE to UART gateway (EEVBlog 121GW comm helper)
Introduce a Python script which relays data which is received via BLE
communication to a UART. This enables immediate use of the serial-dmm
device driver for the EEVBlog 121GW multimeter, until sigrok's serial
communication layer grows (better) support for this physical layer.
Prefer the bluepy(3) Python module over the external gatttool(1) process
since this enables automatic scan for the device's address, and graceful
handling of lost communication, including re-connecting to the device.
Uwe Hermann [Thu, 11 Oct 2018 19:28:40 +0000 (21:28 +0200)]
sigrok-native-appimage: Add bugfix patch for AppImageKit.
The problem was that relative paths would not work, since AppRun
(part of the AppImage) would chdir() into the AppImage mount point
(/tmp/.mount_xxxxx/usr), which would make glib's g_get_current_dir() return
that path, so all glib functions calling that would do the wrong thing.
For now, we fix this by patching away the chdir() in AppRun.
Until MXE uses a recent enough glib, we're applying a similar (ported) patch.
This fixes the following compiler warnings:
src/usb.c: In function 'usb_pollfd_removed':
src/usb.c:34:20: warning: format '%i' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
#define LOG_PREFIX "usb"
^
src/libsigrok-internal.h:764:41: note: in expansion of macro 'LOG_PREFIX'
#define sr_err(...) sr_log(SR_LOG_ERR, LOG_PREFIX ": " __VA_ARGS__)
^
src/usb.c:222:2: note: in expansion of macro 'sr_err'
sr_err("FD to be removed (%" G_GINTPTR_FORMAT
^
src/input/input.c: In function 'sr_input_free':
src/input/input.c:29:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'gsize {aka long long unsigned int}' [-Wformat=]
#define LOG_PREFIX "input"
^
./src/libsigrok-internal.h:763:42: note: in expansion of macro 'LOG_PREFIX'
#define sr_warn(...) sr_log(SR_LOG_WARN, LOG_PREFIX ": " __VA_ARGS__)
^
src/input/input.c:686:3: note: in expansion of macro 'sr_warn'
sr_warn("Found %" G_GSIZE_FORMAT
^
src/output/analog.c: In function 'receive':
src/output/analog.c:118:34: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'guint64 {aka long long unsigned int}' [-Wformat=]
g_string_append_printf(*out, "%"
^
src/scpi/scpi.c: In function 'sr_scpi_get_string':
src/scpi/scpi.c:28:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'gsize {aka long long unsigned int}' [-Wformat=]
#define LOG_PREFIX "scpi"
^
./src/libsigrok-internal.h:760:42: note: in expansion of macro 'LOG_PREFIX'
#define sr_spew(...) sr_log(SR_LOG_SPEW, LOG_PREFIX ": " __VA_ARGS__)
^
src/scpi/scpi.c:623:2: note: in expansion of macro 'sr_spew'
sr_spew("Got response: '%.70s', length %" G_GSIZE_FORMAT ".",
^
In file included from session.c:22:0:
session.c: In function 'srd_session_metadata_set':
session.c:190:10: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'guint64 {aka long long unsigned int}' [-Wformat=]
srd_dbg("Setting session %d samplerate to %"G_GUINT64_FORMAT".",
^
libsigrokdecode-internal.h:101:44: note: in definition of macro 'srd_dbg'
#define srd_dbg(...) srd_log(SRD_LOG_DBG, __VA_ARGS__)
^
Uwe Hermann [Wed, 3 Oct 2018 14:15:24 +0000 (16:15 +0200)]
sigrok-cross-mingw: Drop apparently obsolete libzip patch.
Initial tests with MinGW 5.0.4 and libzip 1.5.1 from recent MXE suggest
that this issue is no longer reproducible. It was probably fixed in
either of the packages in the mean time.
With this change the DMG should work on at least Mac OS X 10.8, 10.9,
and 10.10 according to Qt docs (only tested on 10.11.6 / El Capitan).
The DMG also currently uses Python 3.7, which should work fine for
Mac OS X 10.9 (Mavericks) and later, according to Python docs
(again, only tested on 10.11.6 / El Capitan).
Uwe Hermann [Fri, 23 Mar 2018 08:24:02 +0000 (09:24 +0100)]
sigrok-cross-android: Set CMAKE_MAKE_PROGRAM to fix libftdi build.
The libftdi build was failing (for quite a while now) like this:
CMake Error: CMake was unable to find a build program corresponding
to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need
to select a different build tool.
Explicitly setting CMAKE_MAKE_PROGRAM seems to fix this.
Cenkron [Tue, 16 Jan 2018 21:35:26 +0000 (15:35 -0600)]
mingw/msys2: Make build directory names reflect debug/release and 32/64
For mingw and msys2 builds, both the install and build directory names
now reflect the build characteristics.
This makes it possible to do debug and release builds simultaneously.
Cenkron [Fri, 12 Jan 2018 19:05:29 +0000 (13:05 -0600)]
mxe/msys2: Use -DCMAKE_BUILD_TYPE in favor of a patch.
Direct cmake to apply the -mwindows linker switch based on a cmake
command line argument rather than by using a patch file. The command
line argument is -DCMAKE_BUILD_TYPE=xxxxx and applies the linker switch
only to WIN32 builds that are not Debug.
Uwe Hermann [Thu, 11 Jan 2018 22:53:08 +0000 (23:53 +0100)]
sigrok-native-msys2: Have libsigrok Python bindings use Python 3.
We're installing Python 3 versions of setuptools and numpy using this
script's "prepare" option, so force the build to use those (otherwise
it'll search for the Python 2 versions and won't find them).
Note: The Python bindings build still remains off (--disable-python)
since there are issues there that need to be investigated.
Uwe Hermann [Fri, 17 Nov 2017 19:16:47 +0000 (20:16 +0100)]
sigrok-fwextract-dreamsourcelab-dslogic: Revert to v0.97 firmware.
The v0.98 firmware seems to require quite a few changes in libsigrok
since the protocol changed upstream. Until someone implements support
for the v0.98 firmware, we'll stay at v0.97 which is known to work on
all DSLogic devices with the current libsigrok driver.
Gerhard Sittig [Thu, 17 Aug 2017 19:11:49 +0000 (21:11 +0200)]
macosx: Refine pulseview executable invocation in wrapper script.
Cope with whitespace in e.g. pathnames that get passed to the script and
then forwarded to the executable. Prefix the invocation of the external
binary with 'exec' as there is no need to return to the script after the
last line finished executing.
Uwe Hermann [Tue, 15 Aug 2017 20:52:54 +0000 (22:52 +0200)]
macosx: Set $SIGROK_FIRMWARE_DIR environment variable.
This allows the .app/DMG to properly find its firmware files.
In addition to the files it ships with, libsigrok will still search all
the usual paths for firmware files (if needed). I.e., the user can place
additional firmware files in local paths (see libsigrok's README.devices).
Gerhard Sittig [Sat, 19 Nov 2016 16:54:47 +0000 (17:54 +0100)]
sigrok-cross-linux: run configure under scan-build, too
http://clang-analyzer.llvm.org/scan-build.html#recommended_autoconf
suggests that autotools generated configure scripts shall be run under
scan-build, too. Adjust the cross build script accordingly (N.B. the
initial cmake invocation at configure time already did so).
Gerhard Sittig [Sun, 21 May 2017 16:18:43 +0000 (18:18 +0200)]
new-driver: do accept multiple command line words for driver name
The README specifies that driver names consist of multiple words
(typically vendor and model). Adjust the args parser configuration such
that more than one word gets accepted (the previous implementation did
insist on a single word).
Uwe Hermann [Fri, 17 Feb 2017 08:20:42 +0000 (09:20 +0100)]
sigrok-cross-mingw: Lower Python version to 3.4 (Win XP support).
The last Python version to officially support Windows XP was 3.4.x.
We'll keep the Windows installers at that version for the time being,
until Windows XP support is no longer feasible (e.g. because important
sigrok requirements such as Qt, glib, or libusb drop XP suppport).
Uwe Hermann [Sun, 29 Jan 2017 18:03:41 +0000 (19:03 +0100)]
sigrok-cross-android: Set "android:versionName" to a timestamp.
Use the current date-/timestamp when building as the versionName
Android field.
This "version" basically means "git HEAD of everything as of the
build time of the APK", which includes every piece of software that
the sigrok-cross-android script grabs and builds, as well as the
pre-installed Android NDK + SDK components.