Error: cannot open device.

I am using ubuntu 8.0.4 and my cfg file is as follows

------start------------------

# port configurations
telnet_port 4444
gdb_port 3333

# cpu configuration
source [find target/lpc2148.cfg]

# interface configuration
source [find interface/parport.cfg]

--------end-----------------

$ openocd -f test.cfg

I get the following error

Open On-Chip Debugger 0.4.0 (2010-05-18-16:24)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.berlios.de/doc/doxygen/bugs.html

RCLK - adaptive

jtag_nsrst_delay: 200

jtag_ntrst_delay: 200

trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain

parport port = 0x378

Error: cannot open device. check it exists and that user read and write rights are set. errno=2

Command handler execution failed

I checked in /dev directory and /dev/parport0 exists

and i even changed the permissions

by using

$ sudo chmod 777 /dev/parport0

and i disabled lp by adding the following line

blacklist lp to
/etc/modprobe.d/blacklist

and i still get this stupid error.

Module Size Used by

rfcomm 41744 2

l2cap 25728 13 rfcomm

bluetooth 61028 4 rfcomm,l2cap

ppdev 10372 0

vmnet 50112 16

vmblock 16672 1

vsock 46368 0

vmci 59608 1 vsock

vmmon 79020 0

acpi_cpufreq 10796 1

cpufreq_stats 7104 0

cpufreq_userspace 5284 0

cpufreq_conservative 8712 0

cpufreq_ondemand 9740 1

freq_table 5536 3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand

cpufreq_powersave 2688 0

ac 6916 0

container 5632 0

video 19856 0

output 4736 1 video

sbs 15112 0

sbshc 7680 1 sbs

dock 11280 0

battery 14212 0

iptable_filter 3840 0

ip_tables 14820 1 iptable_filter

x_tables 16132 1 ip_tables

sbp2 24072 0

lp 12324 0

ipv6 268036 24

snd_usb_audio 83936 0

snd_hda_intel 346264 1

snd_pcm_oss 42144 0

snd_mixer_oss 17920 1 snd_pcm_oss

uvcvideo 58244 0

snd_pcm 78724 3 snd_usb_audio,snd_hda_intel,snd_pcm_oss

snd_seq_dummy 4868 0

compat_ioctl32 2304 1 uvcvideo

snd_seq_oss 35584 0

snd_page_alloc 11400 2 snd_hda_intel,snd_pcm

videodev 29440 1 uvcvideo

snd_usb_lib 18560 1 snd_usb_audio

v4l1_compat 15492 2 uvcvideo,videodev

snd_seq_midi 9376 0

snd_seq_midi_event 8320 2 snd_seq_oss,snd_seq_midi

nvidia 7825536 34

v4l2_common 18304 2 uvcvideo,videodev

snd_rawmidi 25760 2 snd_usb_lib,snd_seq_midi

snd_seq 54224 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event

snd_hwdep 10500 2 snd_usb_audio,snd_hda_intel

i2c_core 24832 1 nvidia

sky2 47620 0

snd_timer 24836 2 snd_pcm,snd_seq

snd_seq_device 9612 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq

snd 56996 15 snd_usb_audio,snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_dummy,snd_seq_oss,snd_usb_lib,snd_rawmidi,snd_seq,snd_hwdep,snd_timer,snd_seq_device

evdev 13056 3

intel_agp 25492 0

pcspkr 4224 0

button 9232 0

parport_pc 36260 1

parport 37832 3 ppdev,lp,parport_pc

iTCO_wdt 13092 0

iTCO_vendor_support 4868 1 iTCO_wdt

shpchp 34452 0

pci_hotplug 30880 1 shpchp

agpgart 34760 2 nvidia,intel_agp

soundcore 8800 1 snd

ext3 136968 1

jbd 48404 1 ext3

mbcache 9600 1 ext3

loop 18948 2

usbhid 32128 0

hid 38784 1 usbhid

sg 36880 0

sr_mod 17956 0

cdrom 37408 1 sr_mod

sd_mod 30720 3

8139cp 24704 0

ata_piix 19588 2

pata_jmicron 7040 1

pata_acpi 8320 0

ohci1394 33584 0

ieee1394 93752 2 sbp2,ohci1394

8139too 27648 0

mii 6400 2 8139cp,8139too

ata_generic 8324 0

libata 159728 4 ata_piix,pata_jmicron,pata_acpi,ata_generic

scsi_mod 151692 5 sbp2,sg,sr_mod,sd_mod,libata

ehci_hcd 37900 0

uhci_hcd 27024 0

usbcore 146412 7 snd_usb_audio,uvcvideo,snd_usb_lib,usbhid,ehci_hcd,uhci_hcd

thermal 16796 0

processor 36616 2 acpi_cpufreq,thermal

fan 5636 0

fbcon 42912 0

tileblit 3584 1 fbcon

font 9472 1 fbcon

bitblit 6784 1 fbcon

softcursor 3072 1 bitblit

fuse 50708 5

Hi,

I have encounter the things, don’t open device parport0. I don’t known whether you have solved it. Can you tell me if you have solved it.

If you look at the parport.cfg you will see that by default it tries to open address 0x378 - this is the default normally in windows.

Newer versions of the script have a PARPORTADDR var that can be overridden to suit your local setup.

# interface configuration
set PARPORTADDR /dev/parport0
source [find interface/parport.cfg]

Cheers

Spen