Re: [sigrok-devel] Queries regarding building sigrok-projects

2021-06-02 Thread Wolfram Sang
Hi Ashwin, > My understanding of steps that I need to follow for adding a new hardware > support to sigrok is as follows : > > *Step 1:* Use the new-driver script to generate skeleton files (api.c, > protocol.c/.h) > *Step 2: *Modify created files accordingly to support FX3. > *Step 3:* I need to

Re: [sigrok-devel] Can I submit pull request in github?

2021-03-17 Thread Wolfram Sang
> I would like to contribute, can I just submit pull request via github? Yes, it is actually the preferred way these days. Looking forward to your contribution, thank you! signature.asc Description: PGP signature ___ sigrok-devel mailing list sigrok

Re: [sigrok-devel] [RFC libsigrokdecode] Build: uninstall decoders, too

2020-08-30 Thread Wolfram Sang
Hi Soeren, > Personally, my prefered solution would be to ask the user when uninstalling > as he/she is the only one who can make the desired choice when using > makefiles. Is there a way to add a yes/no confirmation? If so, this is the > route I'd go. Uh, please no. Nobody expects user interacti

Re: [sigrok-devel] [RFC libsigrokdecode] Build: uninstall decoders, too

2020-08-30 Thread Wolfram Sang
Hi Gerhard, > Minor make nit: Was to understand that $(RM) is more portable, > and might be preferred. But could not find examples in existing > rules within the minute that I spent searching. It's pre-set in > GNU make, can't speak with certainty for automake on other > platforms that don't use G

[sigrok-devel] [RFC libsigrokdecode] Build: uninstall decoders, too

2020-08-29 Thread Wolfram Sang
From: Wolfram Sang Decoders were left when using 'uninstall' target. Signed-off-by: Wolfram Sang --- Found this while trying to remove outdated (because renamed) decoders which triggered warnings. I hope this is proper automake. Makefile.am | 2 ++ 1 file changed, 2 insertion

Re: [sigrok-devel] [RFC PATCH 0/1] HACK: Support Velleman LABPS3005DN

2020-06-14 Thread Wolfram Sang
Hi Merlijn, > My question is -- what would the best way to integrate support in the > korad-kap driver? Some flag to enable quircks for this device? I'd go this way. If the rest of the protocol is largely the same, it makes sense to me to have a quirk to fix up the in/out communication and th

[sigrok-devel] [PATCH libsigrok v2] openbench-logic-sniffer: improve error messages when scanning ID

2020-05-04 Thread Wolfram Sang
From: Wolfram Sang - always say 'ID' when the ID command failed - print hexdump of a faulty ID because on a stalled device we may get 0x00 bytes which would terminate the string early. Introduce a new 'num_read' variable to avoid that in a future change 'ret' mi

[sigrok-devel] [PATCH libsigrok v2] serial: flush() after open() in the serial core.

2020-05-03 Thread Wolfram Sang
_open(serial, ...) ... when != serial - serial_flush(serial); and then the results and the unmatched findings of serial_flush() were audited. Signed-off-by: Wolfram Sang --- Changes since V1: - do the generic flush *after* setting parameters src/hardware/agilent-dmm/

Re: [sigrok-devel] [PATCH libsigrok v2] serial: flush() after open() in the serial core.

2020-05-03 Thread Wolfram Sang
On Sun, May 03, 2020 at 10:57:50PM +0200, Wolfram Sang wrote: > Quite some drivers flush the serial port after opening it. And quite > some don't although they should. Factor this out, so serial_open() will > always flush the port. The removal in the drivers was done with this >

Re: [sigrok-devel] [RFC PATCH] Flush buffers when opening port

2020-05-03 Thread Wolfram Sang
On Sat, Apr 11, 2020 at 10:07:39PM +0200, Wolfram Sang wrote: > Make sure that all buffers are empty after opening (on all supported > systems). > > Signed-off-by: Wolfram Sang > --- > > This came up while debugging bug #1025. It doesn't fix the bug but I > t

[sigrok-devel] [PATCH libsigrok] openbench-logic-sniffer: improve error messages when scanning ID

2020-05-03 Thread Wolfram Sang
From: Wolfram Sang - always say 'ID' when the ID command failed - print hexdump of a faulty ID because on a stalled device we may get 4 0x00 bytes which would terminate the string early. Made debugging OLS startup issues a lot easier. Signed-off-by: Wolfram Sang --- src/hardware

Re: [sigrok-devel] [PATCH RFC libsigrok] serial: flush() after open() in the serial core.

2020-05-03 Thread Wolfram Sang
> @@ -122,6 +122,10 @@ SR_PRIV int serial_open(struct sr_serial_dev_inst > *serial, int flags) > if (ret != SR_OK) > return ret; > > + ret = serial_flush(serial); > + if (ret != SR_OK) > + return ret; > + > if (serial->serialcomm) > re

Re: [sigrok-devel] [PATCH pulseview v2 0/2] complete stacktrace support

2020-04-25 Thread Wolfram Sang
> I really wish they had pointed out why the heck they disable it. Searching for "stacktrace" in https://gitweb.gentoo.org/repo/gentoo.git/log/dev-libs/boost points to this commit: https://gitweb.gentoo.org/repo/gentoo.git/commit/dev-libs/boost?id=2ee11719e251c9ae1a53cdcacc96ac94d7733862 which

Re: [sigrok-devel] [PATCH pulseview v2 0/2] complete stacktrace support

2020-04-24 Thread Wolfram Sang
> ...so... uh... why is it complaining even though it found a more > recent version? Any idea? The only idea I have is the obvious one: do you have the stacktrace package for that boost version installed? signature.asc Description: PGP signature ___

[sigrok-devel] [PATCH RFC libsigrok] serial: flush() after open() in the serial core.

2020-04-22 Thread Wolfram Sang
_open(serial, ...) ... when != serial - serial_flush(serial); and then the results and the unmatched findings of serial_flush() were audited. Signed-off-by: Wolfram Sang --- As discussed with Gerhard, this is the libsigrok counterpart of a similar patch for libserialport. Note the

[sigrok-devel] [PATCH pulseview v2 0/2] complete stacktrace support

2020-04-17 Thread Wolfram Sang
--- Simple tracer still works, too. Again no testing on non-Linux platforms. Thanks to Soeren, Gerhard, and Uwe for support! Looking forward to comments. Wolfram Sang (2): HACK: make pulseview crash when pressing "Run" Add stacktrace support CMakeLists.

[sigrok-devel] [PATCH pulseview v2 1/2] HACK: make pulseview crash when pressing "Run"

2020-04-17 Thread Wolfram Sang
Not-Signed-off-by: Wolfram Sang --- pv/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index ea9f01af..20b9ab22 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -710,6 +710,7 @@ void MainWindow::on_run_stop_clicked

[sigrok-devel] [PATCH pulseview v2 2/2] Add stacktrace support

2020-04-17 Thread Wolfram Sang
Use backtrace when available, otherwise the basic stacktracer. Signed-off-by: Wolfram Sang --- CMakeLists.txt | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ecaf6694..e157e7db 100644 --- a/CMakeLists.txt +++ b

Re: [sigrok-devel] [pulseview PATCH 0/4] Fix stacktrace to show symbol names

2020-04-16 Thread Wolfram Sang
> For symbols outside pv, you might need to disable ASLR with > > $ sudo sysctl -w kernel.randomize_va_space=0 > > or using 'setarch ... -R ...' I think I should add some documentation containing the above (and some more) in V2. signature.asc Description: PGP signature __

Re: [sigrok-devel] [pulseview PATCH 3/4] For stacktraces, build with no-pie

2020-04-16 Thread Wolfram Sang
> > list(APPEND PULSEVIEW_LINK_LIBS "-ldl") > > + link_libraries("-no-pie -fno-pie") > > endif() > > May I suggest you add another change "for good measure", and > replace the open coded -ldl spec with ${CMAKE_DL_LIBS} which is > more portable? Sure, good catch, thanks! Will do that in V2

Re: [sigrok-devel] [pulseview PATCH 2/4] With stacktrace, enfore 'Debug' build

2020-04-16 Thread Wolfram Sang
> Wait, is the "RelWithDebInfo" as good a choice, and already gets > enforced in the absence of a user spec? And is accepting the user > spec -- when provided -- the most appropriate activity? Does it > mean that strictly speaking this specific change is not needed? OK, my take on this was "enfor

Re: [sigrok-devel] [pulseview PATCH 0/4] Fix stacktrace to show symbol names

2020-04-16 Thread Wolfram Sang
On Thu, Apr 16, 2020 at 03:42:34PM +0200, Stefan BrĂ¼ns wrote: > On Thursday, 16 April 2020 15:22:06 CEST Wolfram Sang wrote: > > This small series is the result of my first journey into the worlds of > > CMake, Boost, and userspace stacktraces. I get useful output now on my > &g

[sigrok-devel] [pulseview PATCH 4/4] HACK: make pulseview crash early

2020-04-16 Thread Wolfram Sang
Not-Signed-off-by: Wolfram Sang --- pv/session.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pv/session.cpp b/pv/session.cpp index 6b879cf9..4a6498b6 100644 --- a/pv/session.cpp +++ b/pv/session.cpp @@ -180,6 +180,7 @@ shared_ptr Session::main_view() const void Session::set_main_bar

[sigrok-devel] [pulseview PATCH 3/4] For stacktraces, build with no-pie

2020-04-16 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a1403c92..4881ca36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -474,7 +474,7 @@ if(ENABLE_SIGNALS) endif() if(ENABLE_STACKTRACE

[sigrok-devel] [pulseview PATCH 0/4] Fix stacktrace to show symbol names

2020-04-16 Thread Wolfram Sang
ks for me(tm) now. Looking forward to hear from other tests or review of the CMake bits. Happy hacking, Wolfram Wolfram Sang (4): Add boost::stacktrace to CMakeList With stacktrace, enfore 'Debug' build For stacktraces, build with no-pie HACK: make pulseview crash early CMak

[sigrok-devel] [pulseview PATCH 1/4] Add boost::stacktrace to CMakeList

2020-04-16 Thread Wolfram Sang
uests/2541/diffs Signed-off-by: Wolfram Sang --- CMakeLists.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ecaf6694..2986ee94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,6 +123,11 @@ if(ENABLE_TESTS) endif() if(ENABLE_

[sigrok-devel] [pulseview PATCH 2/4] With stacktrace, enfore 'Debug' build

2020-04-16 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- CMakeLists.txt | 4 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2986ee94..a1403c92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,10 @@ if(WIN32) set(ENABLE_SIGNALS FALSE) endif() +if

Re: [sigrok-devel] [RFC PATCH] std: avoid doube close

2020-04-12 Thread Wolfram Sang
> Is the device driver's or the serial port's close an issue? Or > one of them first and the other one as a consequence? Haven't > checked the code base, so I'm talking from the top of my head > here, and may miss something. It's independent of serial ports. I am quite confident bugs #1151 and #1

Re: [sigrok-devel] [RFC PATCH] Flush buffers when opening port

2020-04-12 Thread Wolfram Sang
> Is it intended that potential sp_flush() errors get ignored? > (Assuming that DEBUG() is silent in regular applications. And at > most only results in output but won't affect the return code.) Yes, to avoid regressions. That shows I rate an error there as 'not critical'. I have no strong opinio

[sigrok-devel] [RFC PATCH] std: avoid doube close

2020-04-11 Thread Wolfram Sang
s not idle. Signed-off-by: Wolfram Sang --- I am not sure if the added condition is good enough. Yet, I'd appreciate comments to see if I am on the right track. src/std.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/std.c b/src/std.c index 581e2e46..09ebf1ed 100644

[sigrok-devel] [RFC PATCH] Flush buffers when opening port

2020-04-11 Thread Wolfram Sang
Make sure that all buffers are empty after opening (on all supported systems). Signed-off-by: Wolfram Sang --- This came up while debugging bug #1025. It doesn't fix the bug but I think it is still nice to have. Opinions? serialport.c | 4 1 file changed, 4 insertions(+) diff --

[sigrok-devel] [PATCH] Return proper type when sp_get_port_transport() fails

2020-04-05 Thread Wolfram Sang
The above function must always return an 'enum sp_transport'. So, add a 'NONE' type and return it if no port ist present. Fixes bug #1531. Signed-off-by: Wolfram Sang --- I added this also to Bugzilla, but I prefer discussions via mail :) I think this is a viable fix. Bu

Re: [sigrok-devel] I2C decoder, potential issue with STOP before/without ACK?

2020-04-05 Thread Wolfram Sang
Hi Soeren! > Thanks for your input :) Very welcome! > > The latter is called a void message and declared illegal > > in the specs. > > So it would make sense to emit a warning annotation if > this condition is encountered in FIND_ADDRESS? This would be ideal. All the best, Wolfram signa

Re: [sigrok-devel] I2C decoder, potential issue with STOP before/without ACK?

2020-04-05 Thread Wolfram Sang
Hi, >elif self.state == 'FIND ACK': > -# Wait for a data/ack bit: SCL = rising. > -(scl, sda) = self.wait({0: 'r'}) > -self.get_ack(scl, sda) > +# Wait for any of the following conditions (or combinations): > +# a) a data/ack bit: SCL = rising. > +# b) STO

Re: [sigrok-devel] Contributing a Smart Battery / SMBus decoder

2020-03-26 Thread Wolfram Sang
Hi, > SMBus is based on the I2C protocol, roughly with timeouts and differences in > acknowledgements. Should a SMBus decoder work on logic signals or stack on > top of the existing i2c decoder? True about the timeout, but the differences in acknowledgements are in the protocol layer. The I2C dec

Re: [sigrok-devel] Contribute to the sigrok project

2019-08-10 Thread Wolfram Sang
> what are the next steps? I guess you could send a pull-request via github if you haven't done so already? The IRC channel #sigrok on Freenode is usually a good place to get a timely response from the core developers. Thanks for your work! signature.asc Description: PGP signature __

Re: [sigrok-devel] Support for Hantek 1008C

2019-04-05 Thread Wolfram Sang
Hi, > unfortunately I did not get any sort of answer and I am unsure if I was > considered rude to ask the support for Hantek 1008C (I am sorry in this > case), if nobody is there "responsible" for it or what the problem is. Definately the latter. Questions are really welcome here, but currently

[sigrok-devel] PulseView: suppress_zoom_to_fit_after_acq_ question?

2019-01-02 Thread Wolfram Sang
Hi Soeren, I have a question about the variable suppress_zoom_to_fit_after_acq_: I assume this is meant to suppress zoom-to-fit if settings were changed while an acquisition is running? Or what is the use case? I see it in effect when a session gets restored because of a commandline parameter wh

[sigrok-devel] [PATCH libsigrok v2 00/12] ols: make driver more generic and add support for Pepino

2019-01-02 Thread Wolfram Sang
only half the channels available at 200MHz. We never handled this case and this series doesn't add it as well. Wolfram Sang (12): ols: remove unused define ols: remove needless initialization ols: use 32bit for handling sample counts ols: drop wrong usage of macro ols: simplify cal

[sigrok-devel] [PATCH libsigrok v2 10/12] ols: mention compatible devices in driver name

2019-01-02 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c index 26490c05..5e959507 100644 --- a/src/hardware/openbench

[sigrok-devel] [PATCH libsigrok v2 11/12] pipistrello: rename registers to match actual function

2019-01-02 Thread Wolfram Sang
Magnus (creator of the Pipistrello) confirmed that he mixed up the register names. The code was doing it correctly nonetheless but was confusing to read because of this. Fix it to make it easier to comprehend. Signed-off-by: Wolfram Sang --- src/hardware/pipistrello-ols/api.c | 4 ++-- src

[sigrok-devel] [PATCH libsigrok v2 09/12] ols: extend reponse delay when scanning device

2019-01-02 Thread Wolfram Sang
My Pepino needs 15ms instead of 10ms, so let's use 20ms to be on the safe side. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/open

[sigrok-devel] [PATCH libsigrok v2 08/12] ols: sort commands according to their hex value

2019-01-02 Thread Wolfram Sang
Makes adding new ones easier. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/protocol.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/openbench-logic-sniffer/protocol.h b/src/hardware/openbench-logic-sniffer/protocol.h index 1ec671a4

[sigrok-devel] [PATCH libsigrok v2 04/12] ols: drop wrong usage of macro

2019-01-02 Thread Wolfram Sang
commit f51acd69 ("ols: combine demux samples") wrongly replaced the bit pattern of 0x20 with the number of channels which just happens to be 32 as well. So, the code works but is confusing to read. Reword the for-loop to make it more comprehensible. Signed-off-by: Wolfram Sang --- sr

[sigrok-devel] [PATCH libsigrok v2 07/12] ols: refactor using max_channels

2019-01-02 Thread Wolfram Sang
ch is the removal of the NUM_CHANNELS macro. The number of channels needs to be dealt with at runtime. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/protocol.c | 5 +++-- src/hardware/openbench-logic-sniffer/protocol.h | 1 - 2 files changed, 3 insertions(+), 3 dele

[sigrok-devel] [PATCH libsigrok v2 05/12] ols: simplify calculation of readcount

2019-01-02 Thread Wolfram Sang
Somewhen we probably want DIV_ROUND_UP from the Kernel. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/api.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c

[sigrok-devel] [PATCH libsigrok v2 02/12] ols: remove needless initialization

2019-01-02 Thread Wolfram Sang
channel_mask is recalculated before it gets accessed, so this initialization is not needed. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/protocol.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hardware/openbench-logic-sniffer/protocol.c b/src/hardware

[sigrok-devel] [PATCH libsigrok v2 01/12] ols: remove unused define

2019-01-02 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/protocol.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hardware/openbench-logic-sniffer/protocol.h b/src/hardware/openbench-logic-sniffer/protocol.h index cfe98cb4..e8e7574c 100644 --- a/src/hardware/openbench-logic

[sigrok-devel] [PATCH libsigrok v2 06/12] ols: refactor channel initialization

2019-01-02 Thread Wolfram Sang
We needs this twice so put it into a seperate function, so updates to it will automatically handled for both callers. Signed-off-by: Wolfram Sang --- .../openbench-logic-sniffer/protocol.c| 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src

[sigrok-devel] [PATCH libsigrok v2 03/12] ols: use 32bit for handling sample counts

2019-01-02 Thread Wolfram Sang
this) and to prepare support for devices with even more memory (Pepino). Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer

[sigrok-devel] [PATCH libsigrok v2 12/12] ols: add feature to support >256K memory

2019-01-02 Thread Wolfram Sang
ding on the device name later. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/api.c| 28 +++ .../openbench-logic-sniffer/protocol.h| 2 ++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/hardware/openbench-logic-sniffer/a

Re: [sigrok-devel] [PATCH libsigrok 11/11] ols: add feature to support >256K memory

2018-12-31 Thread Wolfram Sang
> +#define CMD_CAPTURE_COUNT 0x83 /* extension for Pepino > */ > +#define CMD_CAPTURE_DELAY 0x84 /* extension for Pepino > */ I just agreed with Magnus (creator of the Pepino) that these registers in deed need to be renamed. signature.asc Descripti

Re: [sigrok-devel] [PATCH libsigrok 10/11] ols: mention compatible devices in driver name

2018-12-31 Thread Wolfram Sang
> - .longname = "Openbench Logic Sniffer", > + .longname = "Openbench Logic Sniffer & Compatibles", Probably even better "& SUMP compatibles". signature.asc Description: PGP signature ___ sigrok-devel mailing list sigrok-devel@lists.sourcefor

[sigrok-devel] [PATCH libsigrok 05/11] ols: simplify calculation of readcount

2018-12-30 Thread Wolfram Sang
Somewhen we probably want DIV_ROUND_UP from the Kernel. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/api.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c

[sigrok-devel] [PATCH libsigrok 11/11] ols: add feature to support >256K memory

2018-12-30 Thread Wolfram Sang
Add support for the Pepino-style of accessing >256K of memory. For that, we introduce 'feature_flag' which can be set according to the device. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/api.c| 28 +++ .../openbench-logic-sniff

[sigrok-devel] [PATCH libsigrok 04/11] ols: drop wrong usage of macro

2018-12-30 Thread Wolfram Sang
commit f51acd69 ("ols: combine demux samples") wrongly replaced the bit pattern of 0x20 with the number of channels which just happens to be 32 as well. So, the code works but is confusing to read. Reword the for-loop to make it more comprehensible. Signed-off-by: Wolfram Sang --- sr

[sigrok-devel] [PATCH libsigrok 09/11] ols: extend reponse delay when scanning device

2018-12-30 Thread Wolfram Sang
My Pepino needs 15ms instead of 10ms, so let's use 20ms to be on the safe side. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/open

[sigrok-devel] [PATCH libsigrok 07/11] ols: refactor using max_channels

2018-12-30 Thread Wolfram Sang
ch is the removal of the NUM_CHANNELS macro. The number of channels needs to be dealt with at runtime. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/protocol.c | 5 +++-- src/hardware/openbench-logic-sniffer/protocol.h | 1 - 2 files changed, 3 insertions(+), 3 dele

[sigrok-devel] [PATCH libsigrok 00/11] ols: make driver more generic and add support for Pepino

2018-12-30 Thread Wolfram Sang
so it needs another look. Will happily share that patch in case someone else is interested. * OLS/Pepino have only half the channels available at 200MHz. We never handled this case and this series doesn't add it as well. Wolfram Sang (11): ols: remove unused define ols: remove needl

[sigrok-devel] [PATCH libsigrok 08/11] ols: sort commands according to their hex value

2018-12-30 Thread Wolfram Sang
Makes adding new ones easier. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/protocol.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/openbench-logic-sniffer/protocol.h b/src/hardware/openbench-logic-sniffer/protocol.h index 1ec671a4

[sigrok-devel] [PATCH libsigrok 06/11] ols: refactor channel initialization

2018-12-30 Thread Wolfram Sang
We needs this twice so put it into a seperate function, so updates to it will automatically handled for both callers. Signed-off-by: Wolfram Sang --- .../openbench-logic-sniffer/protocol.c| 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src

[sigrok-devel] [PATCH libsigrok 03/11] ols: use 32bit for handling sample counts

2018-12-30 Thread Wolfram Sang
this) and to prepare support for devices with even more memory (Pepino). Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer

[sigrok-devel] [PATCH libsigrok 02/11] ols: remove needless initialization

2018-12-30 Thread Wolfram Sang
channel_mask is recalculated before it gets accessed, so this initialization is not needed. Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/protocol.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hardware/openbench-logic-sniffer/protocol.c b/src/hardware

[sigrok-devel] [PATCH libsigrok 01/11] ols: remove unused define

2018-12-30 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/protocol.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hardware/openbench-logic-sniffer/protocol.h b/src/hardware/openbench-logic-sniffer/protocol.h index cfe98cb4..e8e7574c 100644 --- a/src/hardware/openbench-logic

[sigrok-devel] [PATCH libsigrok 10/11] ols: mention compatible devices in driver name

2018-12-30 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- src/hardware/openbench-logic-sniffer/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c index 26490c05..351f7954 100644 --- a/src/hardware/openbench

Re: [sigrok-devel] SUMP protocol (Open Bench Logic Sniffer) driver

2018-04-07 Thread Wolfram Sang
Hi, > 1. When first loaded the number of samples is uninitialized, and "RUN" sends > a request for 0x samples. This seems to cause Pulseview to stop > responding, maybe because it is waiting for data it will never get. After > the number of samples drop down is changed once it requests the

Re: [sigrok-devel] (no subject)

2018-01-26 Thread Wolfram Sang
> Using an FPGA as a front-end and RAM interface to shovel the data > into, then pushing the data over a slow serial (UART or USB2) > interface into the PC when the RAM is full and acquisition has stopped > is a concept that worked well for years but it's totally outdated > now. But still, for ho

Re: [sigrok-devel] (no subject)

2018-01-25 Thread Wolfram Sang
Hi! > > with an Openbench Logic Sniffer (open hardware/firmware), a Saanlima > > Pipistrello (open hardware/firmware) > > Unfortunately the Pipistrello with 64 MB DRAM appear to be discontinued: Yes :( I plan to update all OLS based wiki entries, hopefully in February. Such information will be a

Re: [sigrok-devel] (no subject)

2018-01-25 Thread Wolfram Sang
Hi Soeren, > insist that DreamsSource labs is not an ethical company since they > treated (and still treat) the sigrok project like shit. Didn't know that, but really good to know! Uwe Bonnes pointed to the same direction. Any pointers for details? I submitted a talk about measuring with free HW

Re: [sigrok-devel] (no subject)

2018-01-25 Thread Wolfram Sang
> Both look like pretty good ideas, but I am really after something in a > case that I could chuck into a tool bag if needed. I don't have this one, but maybe someone else can add experiences with it? https://sigrok.org/wiki/DreamSourceLab_DSLogic In their Kickstarter, they claimed "OpenHardwar

Re: [sigrok-devel] (no subject)

2018-01-24 Thread Wolfram Sang
> I am often going to be looking at 4+ channels at over 10MHz per > channel and really want the hardware to be Open Source/from a decent, > ethical company that will last a long time (so I can recommend them to > colleagues). I do such kind of measurements with an Openbench Logic Sniffer. Reasona

[sigrok-devel] sigrok at ELC-E in Prague

2017-10-22 Thread Wolfram Sang
Hi, just wanted to let you know that I will be giving a talk and a showcase including sigrok at ELC-E in Prague next week. Talk, Monday 12:05: https://osseu17.sched.com/event/ByYP/more-robust-i2c-designs-with-a-new-fault-injection-driver-wolfram-sang-renesas Showcase, Tuesday 17:35 https

[sigrok-devel] [PATCH sigrok-test] sdcard_sd: add CMD23 test

2017-05-14 Thread Wolfram Sang
From: Wolfram Sang Signed-off-by: Wolfram Sang --- This is already against the decoder changes Uwe merged yesterday. decoder/test/sdcard_sd/R-Car-H2_cmd23_cmd18.output | 286 + decoder/test/sdcard_sd/test.conf | 5 + 2 files changed, 291 insertions

Re: [sigrok-devel] [PATCH libsigrokdecode 2/2] sdcard_sd: reference latest command when displaying response

2017-05-13 Thread Wolfram Sang
Hi Uwe, > Merged all 3 patches, thanks! Thanks! > > +self.last_cmd = cmd; > > Dropped the semicolon here, not needed. Ooops, that shows where I come from :) Regards, Wolfram signature.asc Description: PGP signature ---

[sigrok-devel] [PATCH libsigrokdecode 2/2] sdcard_sd: reference latest command when displaying response

2017-05-12 Thread Wolfram Sang
From: Wolfram Sang Replace the hardcoded value with the last cmd used. I'd think the whole ACMD handling could be simplified if we make further use of this new variable. But for now, let's keep it simple and make it work. Signed-off-by: Wolfram Sang --- decoders/sdcard_sd/

[sigrok-devel] [PATCH libsigrokdecode 1/2] sdcard_sd: output CMD8 in cmd8-handler

2017-05-12 Thread Wolfram Sang
From: Wolfram Sang Probably a typo, currently 'cmd0' gets pushed out. Signed-off-by: Wolfram Sang --- decoders/sdcard_sd/pd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decoders/sdcard_sd/pd.py b/decoders/sdcard_sd/pd.py index 7e486fe..2d88096 100644 ---

[sigrok-devel] [PATCH sigrok-test 3/2] sdcard_sd: correct cmd numbers when prefixing responses

2017-05-12 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- decoder/test/sdcard_sd/imx6_quad_working_snippet.output | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/decoder/test/sdcard_sd/imx6_quad_working_snippet.output b/decoder/test/sdcard_sd/imx6_quad_working_snippet.output index 4487b9b

Re: [sigrok-devel] Gnuplot output format

2017-05-11 Thread Wolfram Sang
Hi, > Anyway, I think it makes sense bringing back gnuplot output until CSV > stabilizes. Thanks to your report I had a look at the CSV driver and reviewed the process_logic() function. It has multiple problems for which I sent out patches a second ago. Would you kindly re-test with the patches o

[sigrok-devel] [PATCH libsigrok 2/4] output/csv: fix segfault with logic channels

2017-05-11 Thread Wolfram Sang
'i' was iterating in steps of unitsize. However, the destination array was also indexed with it, but it is of u8 type. Let 'i' run bytewise and only multiply with unitsize when we need it. Signed-off-by: Wolfram Sang --- src/output/csv.c | 4 ++-- 1 file changed, 2 insert

[sigrok-devel] [PATCH libsigrok 3/4] output/csv: fix a minor leak

2017-05-11 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- src/output/csv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/output/csv.c b/src/output/csv.c index 3cf19191..fd43f00d 100644 --- a/src/output/csv.c +++ b/src/output/csv.c @@ -608,6 +608,7 @@ static int cleanup(struct sr_output *o

[sigrok-devel] [PATCH libsigrok 4/4] output/csv: get proper index for input channels

2017-05-11 Thread Wolfram Sang
'j' is the loop variable for channels, not 'ch'. Signed-off-by: Wolfram Sang --- src/output/csv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output/csv.c b/src/output/csv.c index fd43f00d..5aa83458 100644 --- a/src/output/csv.c +++ b/src/ou

[sigrok-devel] [PATCH libsigrok 0/4] output/csv: bugfixes for process_logic()

2017-05-11 Thread Wolfram Sang
indly re-test if it works for you now? It seems to work with the data I captured recently. Wolfram Sang (4): output/csv: fix segfault when naming logic channels output/csv: fix segfault with logic channels output/csv: fix a minor leak output/csv: get proper index for input channels src/o

[sigrok-devel] [PATCH libsigrok 1/4] output/csv: fix segfault when naming logic channels

2017-05-11 Thread Wolfram Sang
'j' is the loop variable for channels, not 'i'. Reported-by: Maxim Sloyko Signed-off-by: Wolfram Sang --- src/output/csv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output/csv.c b/src/output/csv.c index c39c29a7..8d1bcd98 100644 --- a/src/ou

[sigrok-devel] [PATCH sigrok-test] pdtest: say that '-f' creates initial output for new tests

2017-05-03 Thread Wolfram Sang
From: Wolfram Sang Signed-off-by: Wolfram Sang --- decoder/pdtest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decoder/pdtest b/decoder/pdtest index 1c24e6c..da548e3 100755 --- a/decoder/pdtest +++ b/decoder/pdtest @@ -62,7 +62,7 @@ def usage(msg=None): -l List test

Re: [sigrok-devel] [PATCH libsigrokdecode 2/2] sdcard_sd: reference latest command when displaying response

2017-05-03 Thread Wolfram Sang
> -def putr(self, cmd, desc): > -self.putt([cmd, ['Reply: %s' % desc]]) > +def putr(self, desc): > +self.putt([self.cmd, ['Reply: %s' % desc]]) Hmmm, this doesn't handle ACMDs nicely... needs some more thought. signature.asc Description: PGP signature --

[sigrok-devel] [PATCH libsigrokdecode 1/2] sdcard_sd: remove unused functions

2017-05-03 Thread Wolfram Sang
From: Wolfram Sang putr2 is unused, so let it go. Signed-off-by: Wolfram Sang --- Maybe I am missing something, but I even can't see an intended but currently unimplemented use-case? decoders/sdcard_sd/pd.py | 6 -- 1 file changed, 6 deletions(-) diff --git a/decoders/sdcard_sd/pd

[sigrok-devel] [PATCH libsigrokdecode 2/2] sdcard_sd: reference latest command when displaying response

2017-05-03 Thread Wolfram Sang
From: Wolfram Sang Replace the hardcoded value with the latest cmd used. Signed-off-by: Wolfram Sang --- I assume it is safe to use self.cmd because the state machine always starts with 'GET COMMAND TOKEN' first. decoders/sdcard_sd/pd.py | 14 +++--- 1 file changed, 7

Re: [sigrok-devel] [PATCH 0/3] libsigrokdecode: small improvements for sdcard_sd

2017-05-03 Thread Wolfram Sang
> Basically -f will force-overwrite / generate the files; Thanks! > but you should > generally check if the contents look reasonable and as expected Did that and found another issue in the decoder ;) Patches coming in a minute... > graphically via PulseView. Otherwise there's a risk of introdu

Re: [sigrok-devel] [PATCH 0/3] libsigrokdecode: small improvements for sdcard_sd

2017-05-03 Thread Wolfram Sang
Hi Uwe, > the sigrok-test repo accordingly. Btw, if you could provide some more > .sr files for sigrok-dumps (and/or tests for sigrok-test) that would be > great! Just posted the dump. How do I generate the reference output to match against for the test? Thanks, Wolfram signature.asc Desc

[sigrok-devel] [PATCH sigrok-dumps] Add a SD card (SD) dump (R-Car H2 & OLS)

2017-05-03 Thread Wolfram Sang
From: Wolfram Sang First dump: proof CMD23 before CMD18. Other dumps will follow. --- sdcard/sd_mode/rcar-h2/README | 25 + sdcard/sd_mode/rcar-h2/cmd23_cmd18.sr | Bin 0 -> 636 bytes 2 files changed, 25 insertions(+) create mode 100644 sdcard/sd_mode/rcar

Re: [sigrok-devel] [PATCH v2 2/2] openbench-logic-sniffer: fix acquistion restart with trigger enabled

2017-04-30 Thread Wolfram Sang
gt; correct behavior. > > According to http://mygizmos.org/ols/Logic-Sniffer-FPGA-Spec.pdf section 2.3.1 > p.8, the openbench logic sniffer must be reset before each arm command. > > This patch may fix bug #809 It still does :) For both patches: Tested-by: Wolfram Sang And

Re: [sigrok-devel] [PATCH] openbench-logic-sniffer: fix acquistion restart with trigger enabled

2017-04-29 Thread Wolfram Sang
Hi, > With trigger enabled, and with pulseview, a second (or more) acquisition start > immediatly instead of blocking. It's mandatory to try several times to have a > correct behavior. > > According to http://mygizmos.org/ols/Logic-Sniffer-FPGA-Spec.pdf section 2.3.1 > p.8, the openbench logic sn

[sigrok-devel] [PATCH 3/3] sdcard_sd: really show result of SET_BLOCKLEN

2017-04-26 Thread Wolfram Sang
From: Wolfram Sang Now that self.arg is populated, we can finally use it. Signed-off-by: Wolfram Sang --- decoders/sdcard_sd/pd.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/decoders/sdcard_sd/pd.py b/decoders/sdcard_sd/pd.py index 1ad9cb6..835a544 100644 --- a

[sigrok-devel] [PATCH 0/3] libsigrokdecode: small improvements for sdcard_sd

2017-04-26 Thread Wolfram Sang
From: Wolfram Sang I just did some SD card measurements and came up with these 3 little patches for the sdcard decoder. I also got finally around to build pulseview from git after using the Debian package for a long time. That felt like a quantum leap, thanks for all the work on that! Kind

[sigrok-devel] [PATCH 1/3] sdcard_sd: don't interate over not implemented command

2017-04-26 Thread Wolfram Sang
From: Wolfram Sang There is no handler for CMD4 yet. Signed-off-by: Wolfram Sang --- decoders/sdcard_sd/pd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decoders/sdcard_sd/pd.py b/decoders/sdcard_sd/pd.py index 02e78d7..b544b37 100644 --- a/decoders/sdcard_sd/pd.py

[sigrok-devel] [PATCH 2/3] sdcard_sd: always show CMD argument in hex

2017-04-26 Thread Wolfram Sang
From: Wolfram Sang This is especially useful with the default handler, so you can better understand the transfer if you are already familiar with CMD numbers and their arguments. It makes it also easier to compare with the debug output of the e.g. Linux Kernel. Signed-off-by: Wolfram Sang

[sigrok-devel] 33C3?

2016-12-18 Thread Wolfram Sang
Hi, I noticed that there sadly won't be a sigrok table at 33C3. But who is going nonetheless? I'll be around... Best wishes, Wolfram signature.asc Description: PGP signature -- Check out the vibrant tech community

[sigrok-devel] [PATCH v2] input: vcd: skip BOM at beginning of file

2016-04-10 Thread Wolfram Sang
According to the infos I have, VCD files should be plain ASCII, but we got report of a version adding a UTF8 BOM at the beginning of the file, so we need to skip it. This fixes bug #755. Signed-off-by: Wolfram Sang --- Thanks to Aurelien Jacobs for the criticism. src/input/vcd.c | 4 1

Re: [sigrok-devel] [PATCH] input: vcd: skip BOM at beginning of file

2016-04-10 Thread Wolfram Sang
> > + /* Skip UTF8 BOM */ > > + if (buf->str[0] == '\xef' && buf->str[1] == '\xbb' && buf->str[2] == > > '\xbf') > > You could use strncmp() here. And for good mesure, you could check > buf->len. Something like this: I first intentionally decided against strncmp, but now I can't recall why.

[sigrok-devel] [PATCH] input: vcd: skip BOM at beginning of file

2016-04-06 Thread Wolfram Sang
According to the infos I have, VCD files should be plain ASCII, but nonetheless DSView on Windows seems to add a UTF8 BOM at the beginning of the file, so we need to skip it. This fixes bug #755. Signed-off-by: Wolfram Sang --- src/input/vcd.c | 4 1 file changed, 4 insertions(+) diff

  1   2   >