After a prior change to the dynamic library path location users have
reported issues of nightly builds crashing on MacOS:
- #1633
- #1627
- #1651
- #1744
This change, mentioned by Andrea Leofreddi in #1633, hints PulseView and
sigrok-cli as to the correct location of dynamic libraries through the
addition of an environment variable to the startup script.
Gerhard Sittig [Sat, 26 Feb 2022 12:53:08 +0000 (13:53 +0100)]
sigrok-cross-mingw: use libusb1 version 1.0.24 for MXE builds
Stick with libusb1 version 1.0.24 which is provided by current MXE (the
patch "changes" from 1.0.24 to 1.0.24, remains in place in case version
1.0.25 is needed or desired later). Don't force a modified 1.0.20-rc3
any longer.
Use a RAW_IO commit which is authored by jpa@ and which is discussed in
libusb PR 1069.
Gerhard Sittig [Sat, 26 Feb 2022 12:46:05 +0000 (13:46 +0100)]
sigrok-cross-mingw: group and sort libusb1 patches for MXE
Order the different types of patches which are applied to MXE's libusb.
Unbreak autotools use first, switch the library version then, enable
RAW_IO after that. Comment on these groups to help casual readers.
Gerhard Sittig [Sat, 26 Feb 2022 10:48:40 +0000 (11:48 +0100)]
sigrok-cross-mingw: move libusb1 manipulation out of "MXE fixes"
Factor the libusb1 related tweaking out of the "MXE fixes" patch file.
It is assumed that binutils and glib issues are rather different from
the libusb manipulation. A separate libusb patch also simplifies its
maintenance.
Add comments discussing how the "event abstraction" branch reference
may have become obsolete when libusb1 1.0.24 was released. Which only
leaves RAW_IO as an essential motivation for a modified version (which
is also being submitted towards mainline libusb).
Gerhard Sittig [Sat, 26 Feb 2022 10:27:44 +0000 (11:27 +0100)]
sigrok-cross-mingw: patch for boost numeric literals issue in MXE builds
Patch the pulseview cmake instructions within sigrok-util until the
pulseview.git repository builds out of the box. General applicability
of the compiler switch on all platforms is yet to get determined.
Rearrange the res_writer class of the KingstVis firmware extractor.
Separate the bytes/hexfile handling from file writing. Get the CRC
in that data handing part. Which leaves data processing to internal
helpers, while the calling public routine has all details available,
to provide a more helpful log message to users.
Separate the resource enumeration from the output file creation. Which
prettifies the output (sorted order), and allows future implementations
to easier filter the output if desired.
Gerhard Sittig [Sat, 19 Feb 2022 12:01:27 +0000 (13:01 +0100)]
sigrok-fwextract-kingst-la2016: extract more blobs (all of them)
The previous implementation exclusively extracted the 01a2 MCU firmware
and the LA1016 and LA2016 FPGA bitstreams. The sigrok device driver
already supports more devices, and may easily support even more similar
devices when their firmware becomes available. Simplify users' reports
for currently unsupported devices by just extracting all blobs from the
KingstVis executable. This eliminates the necessity to manipulate the
extractor script (including regexes), raising the application's diag
verbosity is sufficient. Users decide how many of the extracted blobs
they copy to the firmware directory, keeping unused files is non-fatal.
Gerhard Sittig [Sat, 19 Feb 2022 11:48:53 +0000 (12:48 +0100)]
sigrok-fwextract-kingst-la2016: comment nits
Move the comment on the script's purpose and compatibility with vendor
firmware versions to the top of the file. Adress style nits in other
comments (start with capital, end in punctuation).
The ihex format conversion code most probably doesn't support "\r\n*"
(any number of trailing newlines), and neither needs to. Split on LF and
trim trailing whitespace is good enough (as the code already does). Make
the comment catch up with the implementation.
Gerhard Sittig [Sat, 19 Feb 2022 11:43:36 +0000 (12:43 +0100)]
sigrok-fwextract-kingst-la2016: use argparse(3) for commandline options
Neither open code the access to the sys.argv[] detail nor indices of
positional arguments. Use the argparse(3) Python module instead, which
transparently handles presence checks and provides a help text.
The sigrok-fwextract-kingst-la2016(1) manpage source code is sufficient,
there is no benefit in keeping a groff rendered text incarnation of that
manpage as well. No other firmware/ utility has this either.
This undoes the redundant part of commit 625617b09c84 which should not
have gone here in the first place.
Gerhard Sittig [Sat, 22 Jan 2022 15:56:10 +0000 (16:56 +0100)]
sigrok-cross-mingw: Temporarily skip Pulseview PDF manual for Windows CI builds.
Currently Windows CI jobs fail on sigrok.org build machines in the
Pulseview 'make manual-pdf' step. Intentionally break the lookup of the
external utility from the cross MinGW script, to skip the PDF creation.
This temporary evil hack needs to get reverted when the actual cause of
the failed build got addressed. The approach of the sigrok-util patch
keeps all other Pulseview builds unaffected.
Gerhard Sittig [Mon, 17 Jan 2022 18:44:24 +0000 (19:44 +0100)]
sigrok-cross-mingw: Temporarily unbreak Windows CI builds in dirty ways.
A typical use of the cross-compile scripts are CI builds, which currently
fail in the Python tarball download step. Disable certificate checks when
sigrok.org build machines fetch data from the sigrok.org site. Keep the
Zadig download unaffected.
Another typical use is the convenient local compilation from source at
users' sites, which should be rare since nightlies are available, while
developers don't run the cross-compile scripts which are designed for
single shots instead of multiple iterations including local source code
modifications. Which should make this change acceptable for this use
case as well, and happens to unbreak it, too.
Add a TODO comment, ideally this commit soon gets reverted.
The cross compile script executes a lot of steps, some of them rather
expensive and complex, before first output from child processes appears
on screen (libserialport clone being the first typical output). Prepare
to optionally emit progress messages for developers' awareness. Just set
the $ECHO environment variable to suppress these.
Gerhard Sittig [Mon, 3 Jan 2022 20:28:37 +0000 (21:28 +0100)]
macosx: create_dmg: also install the C language IRMP shared library
Have the install_name_tool also massage the libirmp.la build output and
thus have the shared library added to the resulting package. It was
missing before and the Python part of IR_IRMP failed to load.
Add a comment for developers' awareness, the application's executable
and the data files are handled in a different section of the script than
the shared libraries were. Drop trailing whitespace from a text line.
Kevin Grant [Mon, 5 Apr 2021 13:07:07 +0000 (14:07 +0100)]
sigrok-fwextract-kingst-la2016: fix fpga bitstream extraction, add device support
Firmware extraction is trivially broken, probably due to a change of stream name
in the vendor resource file. Fixed that issue and also extracted more files to
support different hardware variations; the two existing hardware revisions of
LA2016 & LA1016 each require different bitstreams. The crc32 of extracted
files is now shown to help track any vendor changes.
Florian Schmidt [Sun, 7 Jun 2020 17:04:08 +0000 (19:04 +0200)]
sigrok-fwextract-kingst-la2016: do not zero pad fpga bitstream
zero padding to 180224 will be done by uploader(/libsigrok).
to get same behaviour as vendors software uploader will need to know this
exact file-size without zero padding.
Uwe Hermann [Thu, 3 Oct 2019 13:06:22 +0000 (15:06 +0200)]
sigrok-native-appimage: Bump to use Ubuntu 16.04 as base OS.
Until recently, the sigrok AppImages were built on Ubuntu 14.04
Trusty Tahr (originally released 2014, Canonical support ended 04/2019).
We're now building on Ubuntu 16.04 Xenial Xerus (originally released
2016, Canonical support will end 04/2021).
https://wiki.ubuntu.com/Releases
This release is still old enough so that the generated AppImages should
run on the majority of modern Linux distros, but also recent enough so
we somewhat recent versions of all libraries. In the case of Qt, we get
a recent enough version to be able to build PulseView (which currently
needs Qt >= 5.3) at all: Qt 5.5.1.
Ryan Govostes [Mon, 18 Mar 2019 16:17:40 +0000 (12:17 -0400)]
sigrok-native-macosx: Fix Homebrew package paths
Use a more reliable method of determining paths to Homebrew formula prefixes,
`brew --prefix`. Use this to find pkg-config files for keg-only formulae,
now including libffi, which is required for glibmm.
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.