0

Since this was more of a software/driver issue I posted the question on SuperUser rather than EE Exchange.

I searched around on the net a bit and found a very useful USART to USB converter bridge. The CP2102 is a programmable device with many settings insofar as the data framing is concerned. As such, a driver for the device must be used to interface and modify these parameters.

On the Silabs website I found this driver for linux (kernel 3.14.4-1 on Arch Linux). The problem is that this driver is just a single C program with zero documentation. An include make file is about as useful considering it has a single line in it that fails (for me) at run-time.

obj-m = cp210x.o
KVERSION = $(shell uname -r)
all:
    make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
clean:
    make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean

The driver source can be found here.

Where my make error is

make -C /lib/modules/3.14.4-1-ARCH/build M=/home/branden/Desktop/Linux_3.x.x_VCP_Driver_Source modules

make[ 1 ]: Entering directory '/usr/lib/modules/3.14.4-1-ARCH/build'

make[ 1 ]: *** No rule to make target 'modules. Stop.

make[ 1 ]: Leaving directory '/usr/lib/modules/3.14.4-1-ARCH/build'

Makefile:4: recipe for target 'all' failed

make: *** [all] Error 2

There is no documentation aside from:

  1. make ( your cp210x driver )
  2. cp cp210x.ko to /lib/modules//kernel/drivers/usb/serial
  3. insmod /lib/modules/
  4. insmod cp210x.ko

Which is actually directed to Ubuntu. The OS I use is Arch Linux, so I realize there may be some discrepancies, but I am unable to resolve them.

Can anyone provide some guidance on the steps to install this driver (or at least where to look) and why there is such a lack of documentation? Are there assumptions here that I am not aware of? How is anyone suppose to use this? If you look in the source there are structures being used as arguments to functions that are never defined as far as I can tell. Perhaps they are part of the header files included at the top, but I could not find some of those on my machine either.

1

You just haven't loaded the linux headers:

 sudo pacman -S linux-headers

solves your problem. Your error message states there is no rule in /linux/modules/$(uname -r)/build to make modules. If you look inside that directory at this time, you will find either nothing or perhaps a vmlinux file. After updating with the command above, you will find all the modules you need.

This isssue is not specific to Arch, it is common to all Linux distros.

  • I will try that now. I looked in that directory a while back and only found, as you said, vmlinux. – sherrellbc May 26 '14 at 17:31
0

I had same issue when installed linux-headers. pacman installed a package from a newer kernel. I solved my problem by recompiling the module right after update all:

pacman -Syu && pacman -S linux-headers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.