Gerhard Sittig [Sat, 12 Nov 2016 22:19:47 +0000 (23:19 +0100)]
avr_pdi: introduce decoder for Atmel Program and Debug Interface
Introduce a decoder for Atmel's proprietary programming and debugging
interface which got introduced with ATxmega chips. This implementation
supports the UART style physical (two wires PDI_CLK and PDI_DATA).
Uwe Hermann [Fri, 26 Aug 2016 13:09:17 +0000 (15:09 +0200)]
Add support for the new query-based PD v3 decoder API.
For the time being, both APIs (2 and 3) will remain supported until all
decoders have been converted to API version 3. Then, support for API
version 2 will be dropped.
Decoders using PD v3 API can benefit from both readability improvements
as well as performance improvements. Up to 10x speedup has been measured
in some situations (depends a lot on the decoder, the amount of data,
the amount of edges in the signals, the amount of oversampling etc. etc.).
This is only the first set of (basic) performance improvements for
libsigrokdecode, there are various additional opportunities for further
changes to improve performance.
This changeset has been tested to survive a run of all the test-cases in
the sigrok-test repo without issues (for the converted PDs), however it is
not very well-tested yet, so there might be regressions that need to be
addressed.
Gerhard Sittig [Sun, 20 Nov 2016 15:51:47 +0000 (16:51 +0100)]
build support: sort list of installed items, factor out pretty printer
Alpha-sort the list of installed items, to support developers which scan
the list for newly added items. Factor out the logic which pretty prints
installed items while maintaining a maximum screen output line length.
Gerhard Sittig [Sun, 16 Oct 2016 16:25:29 +0000 (18:25 +0200)]
Print error messages when decoders fail load time checks
Several checks get applied when loading externally provided protocol
decoders. Print error messages when checks fail, so that developers can
better resolve issues.
The sequence of tests terminates upon the first failed check, while
decoders may suffer from several issues at the same time. This is
considered acceptable, as it reduces the commit's size and the code's
complexity. This commit only adds error messages, and does not change
logic/behaviour.
Failed API version checks result in two messages: One specific message
which reflects the decoder's version and what's supported by the loader,
and a generic message that the API version check has failed. This is
done to simplify the logic of a rarely used error code path.
This commit addresses libsigrokdecode Bug 704, and allows to identify
decoders from parallel installations of differing version.
Gerhard Sittig [Sun, 16 Oct 2016 16:25:25 +0000 (18:25 +0200)]
.gitattributes: introduce git attributes for improved Python diffs
In the absence of respective instructions, git will use a rather generic
approach to generate diffs and patches. Introduce a git attributes file
which results in improved output for Python sources (i.e. all protocol
decoders).
Gerhard Sittig [Sun, 16 Oct 2016 16:26:18 +0000 (18:26 +0200)]
uart: skip frames with invalid start bits
When the start bit is not low at its sample point, then stop trying
to interpret the remaining frame -- it's already known to be invalid,
anyway.
Wait for the next start bit instead, assuming that either the falling
edge which started the inspection of the UART frame and its start bit
was a spurious glitch or that the captured signal does not communicate
at the decoder's configured bitrate.
Gerhard Sittig [Sun, 16 Oct 2016 16:25:28 +0000 (18:25 +0200)]
uart: rework text formatting of communicated data values, plus nits
Factor out the code which generates a textual representation for the
numeric values that were communicated via UART bit patterns. Make the
width of the output text depend on the number of bits in the UART frame
(five to nine) instead of assuming bytes of exactly eight bits.
Fix other minor issues while we are here: Nine bits result in a number
range of 0 to 511 (not 512). ASCII codes 30 and 31 are non-printables.
The previous implementation skipped a significant leading digit in the
octal representation.
Gerhard Sittig [Sun, 16 Oct 2016 16:25:27 +0000 (18:25 +0200)]
uart: minor nit, rename the "databyte" variable
Given the generic nature of UART communication and the supported range
for the data width, "byte" may be a misleading name for the numeric
value that gets communicated in five to nine data bits. Rename the
"databyte" variable to "datavalue".
Chris [Mon, 12 Sep 2016 01:14:44 +0000 (18:14 -0700)]
midi: Add support for complex MIDI message formats (inter-related).
- Handle "Running Status" where status byte can be omitted
- SysEx message can be terminated by status byte, not just EOX
- Handle SysReal messages that interrupt in-progress message transmission
- Identify and print garbage / truncated data
- Add 2 new annotations: text-sysreal-verbose and text-error
Chris Dreher [Fri, 19 Aug 2016 17:26:02 +0000 (10:26 -0700)]
midi: Substantially improve decoding of MIDI messages.
* Decode note names and percussion names (ex: 'G2', 'Tambourine').
* Decode instrument names and drum_kit names (ex: 'Flute', 'GS Orchestra Kit').
* Handle Polyphonic Pressure / Aftertouch (message 0xAn).
* Handle Program Change (message 0xCn).
* Handle Channel Pressure / Aftertouch (message 0xDn).
* Handle Channel Mode (message 0xBn mm where mm is 120 through 127).
* Handle System Common messages (message 0xF1 through 0xF6), including
full time code decoding.
* SysEx decoding now decodes the 1-3 byte manufacturer field, payload
is now displayed as hex.
* 'undefined' fields now display the value (ex: 'undefined 0xf4').
* Add 'MSB' and 'LSB' to many control_functions entries.
* Fix "trapped in state X" bug with handle_channel_msg_generic(),
though this might be dead code.
* Fix bug in sysex_manufacturer_ids; 1-byte manufacturers were not
tuples due to missing comma.
* Fix bug in SysEx decoding state machine; 0xF7 now sent to handle_sysex_msg().
Uwe Hermann [Wed, 11 May 2016 16:55:13 +0000 (18:55 +0200)]
usb_request: Drop hardcoded samplerate.
The libsigrokdecode backend now passes metadata (e.g. samplerate) to all
PDs, stacked and non-stacked (see bug #664), so this interim solution is no
longer needed.
Uwe Hermann [Fri, 29 Jan 2016 22:32:37 +0000 (23:32 +0100)]
Bump libtool version (not package version) to 3:0:0.
The last release (0.3.0) had the libtool version (current:revision:age)
set to 2:0:0. Since this release removes and changes interfaces, the new
version is 3:0:0.
This changes the library filename (e.g. on Linux) from
libsigrokdecode.so.2.0.0 to libsigrokdecode.so.3.0.0, the SONAME
(+symlink) becomes libsigrokdecode.so.3.
Daniel Thompson [Fri, 22 Jan 2016 08:29:09 +0000 (08:29 +0000)]
uart: Optimize handling of samples when tx and rx are both idle
Re-enable the fast path for identical samples but only when both
pins are waiting for the start bit. For sparse data sets (I tested
UT61E capture log) the optimization results in a >4x decode
improvement.
Petteri Aimonen [Sun, 10 Jan 2016 17:23:55 +0000 (19:23 +0200)]
arm_itm: Use objdump instead of addr2line.
This improves speed and fixes bug 564. Code is somewhat
of a copypaste from the arm_etm counterpart, but there
are enough differences that it is easier to keep separate
copy of the objdump parsing in each.