RTDM cannot open device
I am trying to write a simple driver using the RTDM. I have based my driver on the examples at http://www.captain.at and at
http://stud3.tuwien.ac.at/~e0226686/xenomai/source_code.
The call to rt_dev_open() returns -1 (Operation not permitted).
The program is running as root, and I am able to run the 'latency' test program.
What am I doing wrong?
I include some diagnostics, below...
Thanks,
Richard
--------------------------------------------------------------------
Richard Cochran (Mr), Software Development
OMICRON electronics GmbH, Oberes Ried 1, A-6833 Klaus / Austria
http://www.omicron.at/
--------------------------------------------------------------------
[email protected]:~# /usr/xenomai/bin/xeno-info If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes.
BusyBox v1.01 (2007.01.31-09:53+0000) multi-call binary Linux nslu2 2.6.19omicron-g103dbcb5 #27 Fri Apr 6 09:57:25 CEST 2007 armv5teb un
module-init-tools 3.2.2
Modules Loaded rt_miccpt
***
[email protected]:~# find /proc/xenomai -type f -print -exec cat {} \; -exec echo \; /proc/xenomai/rtdm/rt_miccpt/information driver: rt_miccpt version: 0.0.0 peripheral: micdev provider: - class: 224 sub-class: 0 flags: NAMED_DEVICE lock count: 0
/proc/xenomai/rtdm/fildes
total=128:open=0:free=128
/proc/xenomai/rtdm/open_fildes
Index Locked Device
/proc/xenomai/rtdm/protocol_devices
Hash ProtocolFamily:SocketType Driver /proc
/proc/xenomai/rtdm/named_devices
Hash Name Driver /proc A8 micdev0 rt_miccpt rt_miccpt
/proc/xenomai/interfaces/rtdm
0
/proc/xenomai/interfaces/posix
0
/proc/xenomai/interfaces/native
0
/proc/xenomai/interfaces/sys
0
/proc/xenomai/heap
size=130560:used=64:pagesz=512
/proc/xenomai/irq
IRQ CPU0
5: 9611 [timer]
34: 0 [virtual]
/proc/xenomai/timer status=oneshot:setup=15:tickval=1:jiffies=100286782221
/proc/xenomai/version
2.3.1
/proc/xenomai/latency
9495
/proc/xenomai/stat
CPU PID MSW CSW PF STAT %CPU NAME 0 0 0 0 0 00400080 99.9 ROOT 0 0 0 9619 0 00000000 0.0 IRQ5: [timer]
/proc/xenomai/sched
CPU PID PRI PERIOD TIMEOUT STAT NAME 0 0 -1 0 0 R ROOT
/proc/xenomai/apc
APC CPU0
0: 0 (pipe_wakeup) 1: 0 (lostage_handler) 2: 0 (registry_export) 3: 0 (posix_signals_handler)
/proc/xenomai/faults
TRAP CPU0
0: 0 (Data or instruction access) 1: 0 (Section fault) 2: 0 (Generic data abort) 3: 0 (Unknown exception) 4: 0 (Instruction breakpoint) 5: 0 (Floating point exception) 6: 0 (VFP Floating point exception) 7: 0 (Undefined instruction)
/proc/xenomai/hal
1.6-04
Quoted 10 lines · Richard Cochran
I am trying to write a simple driver using the RTDM. I have based my driver on the examples at http://www.captain.at and at
http://stud3.tuwien.ac.at/~e0226686/xenomai/source_code.The call to
rt_dev_open()returns -1 (Operation not permitted).The program is running as root, and I am able to run the 'latency' test program.
What am I doing wrong?
Maybe you only defined the open_rt callback for your driver and are trying to open the driver from a non realt-time thread ?
Signature · 1 line
Gilles Chanteperdrix
Quoted 5 lines
From: Gilles Chanteperdrix
Quoted 1 line
What am I doing wrong?
Maybe you only defined the
open_rtcallback for your driver and are trying to open the driver from a non realt-time thread ?
Thanks, that was it.
Richard