Acquisition software SDK support for ARM platforms

Post Reply
AshwinRajesh
Posts: 1
Joined: Thu Sep 14, 2023 2:19 pm

Acquisition software SDK support for ARM platforms

Post by AshwinRajesh »

We are trying to develop a system for processing the EEG signals from the ActiveTwo system in real-time on an FPGA.

We are using the Pynz-Z2 FPGA board with a 32-bit ARM A9 processor. We plan to read data from the USB2 interface using the ARM processor running linux and then stream the EEG signals to our custom logic. Basically we need to interface with the biosemi USB2 receiver from an ARM processor running linux.

The "SDK for making your own acquisition software"https://www.biosemi.com/faq/make_own_ac ... ftware.htm given in the downloads page looks perfect for this. However, it seems the SDK ships with some binary files compiled for the x86 architecture. While compiling using the makefile in the "Linux32" folder, i get the following error:

Code: Select all

xilinx@ramancam:~/biosemi_usb/RingBufferLibrary-Linux/Linux32$ make
make: Warning: File 'ringbuffer.o' has modification time 838 s in the future
rm -f libRingBuffer.so.0
g++ '-mbe32' -o libRingBuffer.so.0.0.1 -fPIC -lc -shared -pthread -lrt -Wl,-soname,libRingBuffer.so.0 \
	ringbuffer.o bsif_libusb.o bsif_inject_socket_samples.o bsif_socket_io.o bsif_tap_usb_samples.o -L./lib -l usb-1.0
/usr/bin/ld: bsif_libusb.o: relocations in generic ELF (EM: 3)
/usr/bin/ld: bsif_libusb.o: relocations in generic ELF (EM: 3)
/usr/bin/ld: bsif_libusb.o: relocations in generic ELF (EM: 3)
/usr/bin/ld: bsif_libusb.o: relocations in generic ELF (EM: 3)
/usr/bin/ld: bsif_libusb.o: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make: *** [Makefile:17: libRingBuffer.so.0.0.1] Error 1
The "file in wrong format" i believe indicates that the binary file was built for another architecture (probably x86 i guess).

The Makefile is as follows. I had modified the "ARCH" variable from "-m32" to "-mbe32" to compile on ARM

Code: Select all

ARCH='-mbe32'

ALL: libRingBuffer.so  RingBuffer_SyncTest

ringbuffer_synctest.o: ringbuffer_synctest.cpp
	$(CXX) $(ARCH) -Wall -c -o $@ $^

RingBuffer_SyncTest: ringbuffer_synctest.o
	$(CXX) $(ARCH) -o $@ $^ -L. -lRingBuffer

ringbuffer.o: ringbuffer.cpp
	$(CXX) $(ARCH) -Wall -fPIC -c -o $@ $^

libRingBuffer.so.0.0.1: ringbuffer.o bsif_libusb.o bsif_inject_socket_samples.o \
	bsif_socket_io.o bsif_tap_usb_samples.o
	rm -f libRingBuffer.so.0
	$(CXX) $(ARCH) -o $@ -fPIC -lc -shared -pthread -lrt -Wl,-soname,libRingBuffer.so.0 \
		$^ -L./lib -l usb-1.0

# make the linker name and soname pointers
libRingBuffer.so: libRingBuffer.so.0.0.1
	ln -sf $^ libRingBuffer.so
	/sbin/ldconfig -n .

clean:
	rm -f ringbuffer.o
	rm -f ringbuffer_synctest.o
	rm -f libRingBuffer.so.0
	rm -f libRingBuffer.so
	rm -f libRingBuffer.so.0.0.0
	rm -f RingBuffer_SyncTest
How can we proceed to develop the pipeline for linux on 32-bit ARM? Is the SDK available with ARM support, or is there any way i can get the required object files (bsif_inject_socket_samples.o, bsif_socket_io.o, bsif_libusb.o, bsif_tap_usb_samples.o) compiled for ARM?

Coen
Site Admin
Posts: 1121
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Re: Acquisition software SDK support for ARM platforms

Post by Coen »

The ARM processor is not supported by BioSemi. The driver source code is proprietary and not made available to BioSemi users.

The best way to proceed is to set up an extra thread in (open source LabVIEW) ActiView to read data from the ringbuffer (example code is available). The extra thread runs parallel to the main display/save thread with faster timing (main while loop reads larger blocks from ringbufer, extra while loop reads smaller blocks at a higher rate). The extra thread then can stream data to the FPGA. Delay and jitter of the FPGA thread in the order of tens of milliseconds should be attainable.

Best regards, Coen (BioSemi)

Post Reply