ID |
Date |
Author |
Subject |
438
|
Mon Jul 6 11:30:56 2015 |
Felix Bachmair | Creation of Object files | Hi Stefan,
That's fine for me. I thought it might be interesting for others as well..
Cheers
Felix
Stefan Ritt wrote: |
Hi Felix,
the distribution does not contain any binaries, since there are too many Linux distributions around, so everybody compiles from the sources under Linux. Do you want me to just add libDRS.so to the official Makefile? Actually you are the first one asking for this. Would it be beneficial to have this in the distribution, or can you just maintain your own Makefile in the github repository?
Stefan
Felix Bachmair wrote: |
HI,
We are using the DRS4 Board in the EUDAQ framework [1]. We wrote a a Producer based on the software of the evaluation board, which is using the DRS class/header/src files.
In order to make it work we needed to compile it with a shared object file. [2]
Would it be possbile to include a shared object in the 'official' release?
Cheers
Felix
[1]https://telescopes.desy.de/EUDAQ
[2]https://github.com/veloxid/DRS4-v5-shared
|
|
|
440
|
Tue Jul 7 09:29:21 2015 |
Felix Bachmair | Creation of Object files | Yes of course no problem.
You can download via github https://github.com/veloxid/DRS4-v5-shared and I also put it in the attachment.
It's tested with Ubuntu, Fedora and RHEL.
For mac OSX one needs to create a dylib out of the so file.
Cheers
Felix
Stefan Ritt wrote: |
Anyhow it would be nice if you just post your Makefile here, which runs with the standard distribution, so people can use it if needed.
Stefan
Felix Bachmair wrote: |
Hi Stefan,
That's fine for me. I thought it might be interesting for others as well..
Cheers
Felix
Stefan Ritt wrote: |
Hi Felix,
the distribution does not contain any binaries, since there are too many Linux distributions around, so everybody compiles from the sources under Linux. Do you want me to just add libDRS.so to the official Makefile? Actually you are the first one asking for this. Would it be beneficial to have this in the distribution, or can you just maintain your own Makefile in the github repository?
Stefan
Felix Bachmair wrote: |
HI,
We are using the DRS4 Board in the EUDAQ framework [1]. We wrote a a Producer based on the software of the evaluation board, which is using the DRS class/header/src files.
In order to make it work we needed to compile it with a shared object file. [2]
Would it be possbile to include a shared object in the 'official' release?
Cheers
Felix
[1]https://telescopes.desy.de/EUDAQ
[2]https://github.com/veloxid/DRS4-v5-shared
|
|
|
|
|
Attachment 1: Makefile
|
########################################################
#
# Makefile for drsosc, drscl and drs_exam
# executables under linux
#
# Requires wxWidgets 2.8.9 or newer
#
########################################################
# check if wxWidgets is installed
HAVE_WX = $(shell which wx-config)
ifeq ($(HAVE_WX),)
$(error Error: wxWidgets required to compile "drsosc")
endif
# check for OS
OS = $(shell uname)
ifeq ($(OS),Darwin)
DOS = OS_DARWIN
else
DOS = OS_LINUX
endif
CFLAGS = -g -O2 -Wall -Wuninitialized -fno-strict-aliasing -Iinclude -I/usr/local/include -D$(DOS) -DHAVE_USB -DHAVE_LIBUSB10 -DUSE_DRS_MUTEX
LIBS = -lpthread -lutil -lusb-1.0
ifeq ($(OS),Darwin)
CFLAGS += -stdlib=libstdc++
endif
# wxWidgets libs and flags
WXLIBS = $(shell wx-config --libs)
WXFLAGS = $(shell wx-config --cxxflags)
CPP_OBJ = DRS.o averager.o ConfigDialog.o DOFrame.o DOScreen.o DRSOsc.o MeasureDialog.o Measurement.o Osci.o InfoDialog.o DisplayDialog.o AboutDialog.o EPThread.o TriggerDialog.o rb.o
OBJECTS = musbstd.o mxml.o strlcpy.o
SHARED_OBJECTS= libDRS.so
ifeq ($(OS),Darwin)
all: drsosc drscl drs_exam drs_exam_multi DRSOsc.app
else
all: drsosc drscl drs_exam drs_exam_multi
endif
DRSOsc.app: drsosc
-mkdir DRSOsc.app
-mkdir DRSOsc.app/Contents
-mkdir DRSOsc.app/Contents/MacOS
-mkdir DRSOsc.app/Contents/Resources
-mkdir DRSOsc.app/Contents/Resources/English.lproj
echo 'APPL????' > DRSOsc.app/Contents/PkgInfo
cp Info.plist DRSOsc.app/Contents/Info.plist
cp DRSOsc.icns DRSOsc.app/Contents/Resources
cp drsosc DRSOsc.app/Contents/MacOS/DRSOsc
drsosc: $(OBJECTS) $(CPP_OBJ) main.o
$(CXX) $(CFLAGS) $(OBJECTS) $(CPP_OBJ) main.o -o drsosc $(LIBS) $(WXLIBS)
drscl: $(OBJECTS) DRS.o averager.o drscl.o
$(CXX) $(CFLAGS) $(OBJECTS) DRS.o averager.o drscl.o -o drscl $(LIBS) $(WXLIBS)
drs_exam: $(OBJECTS) drs_exam.o $(SHARED_OBJECTS)
# $(CXX) $(CFLAGS) -L . $(OBJECTS) -lDRS drs_exam.o -o drs_exam $(LIBS) $(WXLIBS)
$(CXX) $(CFLAGS) $(OBJECTS) -L. drs_exam.o -lDRS -o drs_exam $(LIBS) $(WXLIBS)
drs_exam_multi: $(OBJECTS) DRS.o averager.o drs_exam_multi.o
#old $(CXX) $(CFLAGS) $(OBJECTS) DRS.o averager.o drs_exam_multi.o -o drs_exam_multi $(LIBS) $(WXLIBS)
$(CXX) $(CFLAGS) $(OBJECTS) -L. DRS.o averager.o drs_exam_multi.o -o drs_exam_multi -lDRS $(LIBS) $(WXLIBS)
main.o: src/main.cpp include/mxml.h include/DRS.h
$(CXX) $(CFLAGS) $(WXFLAGS) -c $<
drscl.o: src/drscl.cpp include/mxml.h include/DRS.h
$(CXX) $(CFLAGS) -c $<
drs_exam.o: src/drs_exam.cpp include/mxml.h include/DRS.h
$(CXX) $(CFLAGS) -c $<
drs_exam_multi.o: src/drs_exam_multi.cpp include/mxml.h include/DRS.h
$(CXX) $(CFLAGS) -c $<
$(CPP_OBJ): %.o: src/%.cpp include/%.h include/mxml.h include/DRS.h
$(CXX) $(CFLAGS) $(WXFLAGS) -c $<
$(OBJECTS): %.o: src/%.c include/mxml.h include/DRS.h
$(CC) $(CFLAGS) -c $<
$(SHARED_OBJECTS): %.so: DRS.o mxml.o averager.o musbstd.o
# Make Shared objectss
# g++ -Wall -shared -fPIC -o libDRS.so src/DRS.cpp src/averager.cpp src/mxml.c -I include/
# < $<
# @ $@
# %.so
#g++ -Wall -shared -fPIC -o libDRS.so src/DRS.cpp src/averager.cpp src/mxml.c -I include/")
$(CXX) $(CFLAGS) $(WXFLAGS) -Wall -shared -fPIC -o $@ -I include/ src/DRS.cpp src/averager.cpp src/mxml.c src/musbstd.c $(LIBS) $(WXLIBS)
clean:
rm -f *.o *.so drscl drsosc
|
444
|
Fri Aug 7 20:32:15 2015 |
Felix Bachmair | DRS4 | Hi
Did you copy the udev rule 41-drs.rules into /etc/udev/rules.d/ ?
Which operating system are you using?
Cheers
Felix
dante wrote: |
Hi
I have just installed DRS4, but when I try to view it from the USB it don't work. Why?
[ .../home $] lsusb -d 04b4:1175 -v
Bus 002 Device 008: ID 04b4:1175 Cypress Semiconductor Corp.
Couldn't open device, some information will be missing
Device Descriptor:
|
|
495
|
Sat Apr 2 11:21:10 2016 |
Felix Bachmair | Question about timimng calibration | Hi,
I am trying to understand some details about the timing calibration.
We wrote our own code but we more or less use the ideas of the Oscilloscope class.
In the binary file writing of in the function Osci.cpp::SaveWaveforms() (line 924ff)
the following code is executed:
if (m_waveDepth == 2048) {
t = (tcal[j]+tcal[j+1])/2;
j++;
} else
t = tcal[j];
I do not understand the averaging of the to adjacent calibration constants. Could you explain this? Do one have two measurements?
Cheers
Felix
|
205
|
Thu Dec 13 12:03:29 2012 |
Evgeni | DRS-4 trigger | How to configure DRS oscilloscope for the oscillations with an amplitude greater than the value of the exposed
in the trigger (internal). |
207
|
Thu Dec 13 19:49:47 2012 |
Evgeni | DRS-4 trigger |
Stefan Ritt wrote: |
Evgeni wrote: |
How to configure DRS oscilloscope for the oscillations with an amplitude greater than the value of the exposed
in the trigger (internal).
|
Sorry, I don't understand that question. The DRS4 Evaluation board input signal range is 1V. If you have larger signals, you have to attenuante them externally.
/Stefan
|
Can I adjust the internal trigger DRS oscilloscope for signal extraction 0.5 volts (for example) from any of the four channels. In our case, there is a lot of noise with low amplitude, which must be removed during the registration. We need to record the individual pulses of higher amplitude than the noise. So we want to use the internal trigger DRS oscilloscope to cut this noise by setting up its threshold amplitude noise.
|
209
|
Fri Dec 14 10:07:14 2012 |
Evgeni | DRS-4 trigger |
Evgeni wrote: |
How to configure DRS oscilloscope for the oscillations with an amplitude greater than the value of the exposed
in the trigger (internal).
|
|
210
|
Fri Dec 14 10:07:54 2012 |
Evgeni | DRS-4 trigger |
Stefan Ritt wrote: |
Evgeni wrote: |
Stefan Ritt wrote: |
Evgeni wrote: |
How to configure DRS oscilloscope for the oscillations with an amplitude greater than the value of the exposed
in the trigger (internal).
|
Sorry, I don't understand that question. The DRS4 Evaluation board input signal range is 1V. If you have larger signals, you have to attenuante them externally.
/Stefan
|
Can I adjust the internal trigger DRS oscilloscope for signal extraction 0.5 volts (for example) from any of the four channels. In our case, there is a lot of noise with low amplitude, which must be removed during the registration. We need to record the individual pulses of higher amplitude than the noise. So we want to use the internal trigger DRS oscilloscope to cut this noise by setting up its threshold amplitude noise.
|
Sure, you can set the trigger level with the vertical slider (see attached figure). The trigger level works form -0.5V to +0.5V. Just like with a normal oscilloscope. I thought this would be obvious...
|
That's it? Thank you for your comprehensive answer. |
608
|
Mon May 22 18:27:56 2017 |
Esperienza Giove | Invalid magic number 0000 | Hello everybody!
After some times i init my board, or if i stop the program during the acquisition, i get the error message "Invalid magic 0000". The only way i can solve this problem is to physically disconnect and plug in again the USB cable.
What's the point? Is there a bash command / code i could use to reset it?
Thank you very much |
610
|
Thu May 25 20:17:41 2017 |
Esperienza Giove | Invalid magic number 0000 | Hello, thanks for your answer. Unluckily if i try to reset in this way it keeps hanging
musb_write: requested 10, wrote 0, errno -7 (Unknown error 18446744073709551609)
musb_read error 0
musb_write: requested 10, wrote 0, errno -7 (Unknown error 18446744073709551609)
musb_read error 0
Invalid magic number: 0000
musb_write: requested 10, wrote 0, errno -7 (Unknown error 18446744073709551609)
musb_read error 0
musb_write: requested 10, wrote 0, errno -7 (Unknown error 18446744073709551609)
musb_read error 0
I also tried with sudo tee /sys/bus/usb/drivers/usb/unbind and binding again; same thing happens. It seems the board needs to be reset when this happens. Is there a way to do that - to reset the board instead of usb?
Thank you
Stefan Ritt wrote:
|
Under linux, many people observed that the USB connection is unstable to the evaluation board. This must be related to the linux USB stack, since my code runs fine under MacOSX and Windows, where I use the same USB library (libusb-1.0). So I can't do anything from my side. Baybe the linux system has some tools to reset an USB endpoint. I googled it and found some proposals here:
https://askubuntu.com/questions/645/how-do-you-reset-a-usb-device-from-the-command-line
Regards,
Stefan
Esperienza Giove wrote: |
Hello everybody!
After some times i init my board, or if i stop the program during the acquisition, i get the error message "Invalid magic 0000". The only way i can solve this problem is to physically disconnect and plug in again the USB cable.
What's the point? Is there a bash command / code i could use to reset it?
Thank you very much
|
|
|
611
|
Thu May 25 20:20:57 2017 |
Esperienza Giove | Invalid magic number 0000 | Hello, thanks for your answer. Unluckily if i try to reset in this way it keeps hanging
musb_write: requested 10, wrote 0, errno -7 (Unknown error 18446744073709551609)
musb_read error 0
musb_write: requested 10, wrote 0, errno -7 (Unknown error 18446744073709551609)
musb_read error 0
Invalid magic number: 0000
musb_write: requested 10, wrote 0, errno -7 (Unknown error 18446744073709551609)
musb_read error 0
musb_write: requested 10, wrote 0, errno -7 (Unknown error 18446744073709551609)
musb_read error 0
I also tried with sudo tee /sys/bus/usb/drivers/usb/unbind and binding again; same thing happens. It seems the board needs to be reset when this happens. Is there a way to do that - to reset the board instead of usb?
Thank you
Stefan Ritt wrote:
|
Under linux, many people observed that the USB connection is unstable to the evaluation board. This must be related to the linux USB stack, since my code runs fine under MacOSX and Windows, where I use the same USB library (libusb-1.0). So I can't do anything from my side. Baybe the linux system has some tools to reset an USB endpoint. I googled it and found some proposals here:
https://askubuntu.com/questions/645/how-do-you-reset-a-usb-device-from-the-command-line
Regards,
Stefan
Esperienza Giove wrote: |
Hello everybody!
After some times i init my board, or if i stop the program during the acquisition, i get the error message "Invalid magic 0000". The only way i can solve this problem is to physically disconnect and plug in again the USB cable.
What's the point? Is there a bash command / code i could use to reset it?
Thank you very much
|
|
|
613
|
Tue May 30 20:45:30 2017 |
Esperienza Giove | Setting input range | Hello,
is it possible to set a completely negative input range like -1 to 0 or -0.95 to 0.05 ? |
615
|
Tue May 30 21:22:10 2017 |
Esperienza Giove | Setting input range | Thank you
Stefan Ritt wrote: |
See elog:531
Esperienza Giove wrote: |
Hello,
is it possible to set a completely negative input range like -1 to 0 or -0.95 to 0.05 ?
|
|
|
621
|
Thu Jul 6 15:10:48 2017 |
Esperienza Giove | Trigger setting (AND AND) OR (AND AND) | Hello there,
is it possible to setup trigger in double AND configuration (a pair in and or other pair in and).
eg (CH 1 AND CH 2 ) OR ( CH 3 AND CH4)
Thank you |
246
|
Tue May 21 12:39:00 2013 |
Enrico Conti | mac osx 10.6 | Hi,
I would like to use the DRS4 with my macbook pro running osx 10.6.8.
I have installed the wxWidgets and the libusb-1.0 libraries and I am using the Linux code vers. 4.0.1. After
compilation, the following errors come out:
ld: warning: in musbstd.o, file was built for unsupported file format which is not the architecture being linked
(i386)
ld: warning: in mxml.o, file was built for unsupported file format which is not the architecture being linked (i386)
....
....
ld: warning: in main.o, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [drsosc] Error 1
Do you have any idea on how to solve the problem ?? or maybe do you have a package working with osx 10.6 ? I
remember to have seen, long time ago, a package that could work with 10.6 (or 10.5 ?), but I cannot find it now
(but maybe I remember wrong).
Thanks for any help,
Enrico |
249
|
Tue May 21 17:45:05 2013 |
Enrico Conti | mac osx 10.6 | >
> Can it be that you have a old PowerPC MAC? I have no experience with that, but probably you have to adjust the Makefile
> ans set some flags correctly for PPC instead of Intel.
>
> /Stefan
No, I have a MacBook Pro 2.8 GHz Intel Core 2 Duo. |
250
|
Tue May 21 17:48:45 2013 |
Enrico Conti | mac osx 10.6 | >
> it looks like 64bit vs 32bit problem, you have to compile all libraries for the same architecture. Maybe, make clean to
> remove all precompiled object files .o and recompile it again. Try to compile first that simple example without wxWidgets.
>
> Martin
Good point, but all libraries are already compiled to 32 bits, since the laptop is running at 32 bits. Unless you mean that I
have to convert to 64 bits, but this means to change all content of the PC, and I don't want to do this. Can the applications
run with 32 bits or do they need 64 ?
Thanks,
Enrico |
252
|
Tue May 21 18:30:11 2013 |
Enrico Conti | mac osx 10.6 | > > >
> > > it looks like 64bit vs 32bit problem, you have to compile all libraries for the same architecture. Maybe, make clean to
> > > remove all precompiled object files .o and recompile it again. Try to compile first that simple example without wxWidgets.
> > >
> > > Martin
> >
> >
> > Good point, but all libraries are already compiled to 32 bits, since the laptop is running at 32 bits. Unless you mean that I
> > have to convert to 64 bits, but this means to change all content of the PC, and I don't want to do this. Can the applications
> > run with 32 bits or do they need 64 ?
> >
> > Thanks,
> > Enrico
>
> There is no specific reason to run it on 64 bits,
Good.
> so just all libraries have to match, that's all. But the original Makefile has been written for 64 bits, so it might need some
> adjustments.
Ok, but I don't understand where is the point to correct. 64 bits do not appear explicitally (at least to me, who am not a drake of programming ...)
neither in the Makefile neither in the (few) source files I have examined.
Thanks again,
Enrico |
253
|
Fri May 24 17:58:07 2013 |
Enrico Conti | mac osx 10.6 | > > >
> > > it looks like 64bit vs 32bit problem, you have to compile all libraries for the same architecture. Maybe, make clean to
> > > remove all precompiled object files .o and recompile it again. Try to compile first that simple example without wxWidgets.
> > >
> > > Martin
> >
> >
> > Good point, but all libraries are already compiled to 32 bits, since the laptop is running at 32 bits. Unless you mean that I
> > have to convert to 64 bits, but this means to change all content of the PC, and I don't want to do this. Can the applications
> > run with 32 bits or do they need 64 ?
> >
> > Thanks,
> > Enrico
>
> There is no specific reason to run it on 64 bits, so just all libraries have to match, that's all. But the original Makefile has been written for 64 bits, so it might need some
> adjustments.
>
> /Stefan
Hi Stefan,
I made some progress. Understood what was wrong in the make phase. You have only to add the option -arch i386 in the CFLAGS line of the makefile.
Then the make is ok, it produces the 3 executables. drs_exam and drscl seem to work correctly.
DRSOsc.app does not work as app, in the sense that if you click it, an error message comes saying "You can't use this version of the application DRSOsc.app with
this version of Mac OS X. You have Mac OSX 10.6.8. The application requires Mac OS X 10.7 or later. "
If you execute drsosc from the terminal, the graphical window pops up, the waveform is displayed, but you don't have access to the graphical interface, no button works, you can't do
anything. To quit the app, you have to kill it from the terminal with the kill command.
But anyway is a progress with respect to yestarday.
Any idea/suggestion to overcome the above problems ? I thought it is a problem with the graphical library (xwWidgets) but I have checked it, it's ok, I have also reinstalled it
(release 2.8.12_3) but nothing changed.
PS. the chip test output (done with the drscl ) is the following (see below). Is it normal or what ? THANKS.
B0> ct
Press 'q' to quit, any other key to repeat test.
Max. frequency is 5.1 GHz
Cell error on channel 1, cell 5: -137.6 mV instead 0 mV
Chip Error!
Max. frequency is 5.1 GHz
Cell error on channel 1, cell 5: -129.4 mV instead 0 mV
Chip Error! |
255
|
Sat May 25 12:45:46 2013 |
Enrico Conti | mac osx 10.6 | > > I made some progress. Understood what was wrong in the make phase. You have only to add the option -arch i386 in the CFLAGS line of the makefile.
> > Then the make is ok, it produces the 3 executables. drs_exam and drscl seem to work correctly.
> > DRSOsc.app does not work as app, in the sense that if you click it, an error message comes saying "You can't use this version of the application DRSOsc.app with
> > this version of Mac OS X. You have Mac OSX 10.6.8. The application requires Mac OS X 10.7 or later. "
> > If you execute drsosc from the terminal, the graphical window pops up, the waveform is displayed, but you don't have access to the graphical interface, no button works, you can't do
> > anything. To quit the app, you have to kill it from the terminal with the kill command.
>
> To run an executable as an app, you have to put it into a certain directory structure. The Makefile has the target "make app" which exactly does that. It executes following code:
>
> DRSOsc.app: drsosc
> -mkdir DRSOsc.app
> -mkdir DRSOsc.app/Contents
> -mkdir DRSOsc.app/Contents/MacOS
> -mkdir DRSOsc.app/Contents/Resources
> -mkdir DRSOsc.app/Contents/Resources/English.lproj
> echo 'APPL????' > DRSOsc.app/Contents/PkgInfo
> cp drsosc.xcodeproj/Info-processed.plist DRSOsc.app/Contents/Info.plist
> cp drsosc DRSOsc.app/Contents/MacOS/DRSOsc
> cp drsosc.xcodeproj/DRSOsc.icns DRSOsc.app/Contents/Resources
>
> You can also do this manually. You will then see the subdirectly DRSOsc.app actually as an App icon (you don't see it as a subdirectory in the Finder). That's the way Apple has chosen to do this.
>
> The chip test facility has been made for a certain test board we use for chip testing. It has a feature that is not present in the evaluation board. I have to disable that command there.
>
> Best regards,
> Stefan
Hi Stefan,
yes, the makefile has already the recipe to create the app. For OSX 10.6 a obvious modification must be done in the info.plist file. Then everything goes right. Now I have the DRSOsc application
running on my mac with 10.6.
Thanks for the help.
Best regards,
Enrico |
|