Российский производитель и разработчик сертифицированного измерительного оборудования с 1987 года


RaspberyPi Debian12 E14-440 ошибка при запуске test

Вы не вошли.

 Поиск | Регистрация | Вход 

15.09.2025 22:11:06
#1

Участник
Здесь с 15.09.2025
Сообщений: 2

RaspberyPi Debian12 E14-440 ошибка при запуске test

Приветствую, уважаемые разработчики!
Имеем следующее железо
Linux raspberrypi 6.12.34+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux
и E14-440 подключенное через usb.
После безуспешных попыток компиляции из исходников https://www.lcard.ru/download/lcomp_linux.tgz. По инструкции
https://www.lcard.ru/download/lcard_lin … utions.pdf был установлен репозитории основанный на Debian: из этой ветки: https://download.opensuse.org/repositor … spbian_12/

Успешно были установлены пакеты:
Уже установлен пакет ltrd самой новой версии (2.1.8.13).
Уже установлен пакет ltrmanager самой новой версии (1.5.6).
Уже установлен пакет libltrapi1-dev самой новой версии (1.32.40).
Уже установлен пакет lcomp-dkms самой новой версии (1.58.5).
Уже установлен пакет liblcomp1-dev самой новой версии (1.58.2).

из lcomp_linux.tgz был собран test
запускаем ./test 0 e440
после any key выходит ошибка, в файл ничего не пишется

./test 0 e440
0
Get IDaqLDevice interface
IDaqLDevice get success
Free IUnknown
OpenLDevice Handle3

Slot parameters
Base    0
BaseL   0
Mem     0
MemL    0
Type    1e
DSPType 889
Irq     0
Load Bios 2
Plata Test 0

Read FLASH
SerNum       9D771840
BrdName      E440
Rev          G
DspType      2185
IsDacPresent
Quartz       24000000

Press any key
 alloc size 131072
Buffer size(word): 131072
Pages:             32
IrqStep:           4096
FIFO:              4096
Rate:              100
Ошибка сегментирования

Помогите, в чем может быть проблема?

15.09.2025 22:19:23
#2

Участник
Здесь с 15.09.2025
Сообщений: 2

Re: RaspberyPi Debian12 E14-440 ошибка при запуске test

Да, test собирался с ворнингами:

make
g++ test.cpp -D_REENTERANT -DLCOMP_LINUX=1 -rdynamic -O0 -Wall -I/include -L/lib -I../include -I/usr/include/nptl -L/usr/lib/nptl -ldl -lpthread -o test
test.cpp: In function ‘void* thread_func(void*)’:
test.cpp:127:17: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
  127 |    fl1=fl2= (*pp<=halfbuffer) ? 0:1;
      |              ~~~^~~~~~~~~~~~
test.cpp:131:33: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
  131 |       while(fl2==fl1) { fl2=(*pp<=halfbuffer) ? 0:1; if(ctrlc) break; usleep(10);}
      |                              ~~~^~~~~~~~~~~~
test.cpp:136:15: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
  136 |       fl1=(*pp<=halfbuffer)? 0:1;
      |            ~~~^~~~~~~~~~~~
test.cpp:119:17: warning: unused variable ‘tmp’ [-Wunused-variable]
  119 | unsigned short *tmp, *tmp1;
      |                 ^~~
test.cpp:141:1: warning: no return statement in function returning non-void [-Wreturn-type]
  141 | }
      | ^
test.cpp: In function ‘void* thread_func791(void*)’:
test.cpp:155:38: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
  155 |    fl1=fl2= (pp[I_ADC_PCI_COUNT_L791]<=halfbuffer) ? 0:1;
      |              ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
test.cpp:159:54: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
  159 |       while(fl2==fl1) { fl2=(pp[I_ADC_PCI_COUNT_L791]<=halfbuffer) ? 0:1; usleep(10);}
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
test.cpp:163:36: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
  163 |       fl1=(pp[I_ADC_PCI_COUNT_L791]<=halfbuffer)? 0:1;
      |            ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
test.cpp:147:15: warning: unused variable ‘tmp’ [-Wunused-variable]
  147 | unsigned int *tmp, *tmp1;
      |               ^~~
test.cpp:168:1: warning: no return statement in function returning non-void [-Wreturn-type]
  168 | }
      | ^
test.cpp: In function ‘int main(int, char**)’:
test.cpp:179:9: warning: unused variable ‘dacPar’ [-Wunused-variable]
  179 | DAC_PAR dacPar;
      |         ^~~~~~
test.cpp:181:14: warning: unused variable ‘ibuf’ [-Wunused-variable]
  181 | IOCTL_BUFFER ibuf;
      |              ^~~~
In file included from test.cpp:89:
../include/stubs.h: At global scope:
../include/stubs.h:160:28: warning: ‘void atomic_dec(atomic_t*)’ defined but not used [-Wunused-function]
  160 | static /*__inline__*/ void atomic_dec(atomic_t *v)
      |                            ^~~~~~~~~~
../include/stubs.h:144:28: warning: ‘void atomic_inc(atomic_t*)’ defined but not used [-Wunused-function]
  144 | static /*__inline__*/ void atomic_inc(atomic_t *v)
      |                            ^~~~~~~~~~
Вчера 18:25:18
#3

Сотрудник "Л Кард"
Здесь с 17.04.2014
Сообщений: 1,338

Re: RaspberyPi Debian12 E14-440 ошибка при запуске test

Здравствуйте.
Во-первых, т.к. в Linux регистр в названии файлов важен, то имя файла прошивки нужно писать с его учетом (сами файлы прошивок ставятся в /usr/share/lcomp/firmware/, имя пишется без расширения), для E440 имя файла с большой буквы, т.е. правильно запускать
./test 0 E440

Во-вторых, лучше взять последнюю версию этого примера из исходников библиотеки: https://gitlab.com/l-card/acq/devices/e … type=heads

Тогда проверьте на этой версии и с правильным регистром в имени файла прошивки (E440) заработает или все равно будет ошибка сегментирования