PEAK-Linux Driver on Raspberry Pi

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
User avatar
S.Grosjean
Software Development
Software Development
Posts: 302
Joined: Wed 4. Jul 2012, 17:02

Re: PEAK-Linux Driver on Raspberry Pi

Post by S.Grosjean » Tue 3. Sep 2013, 09:46

Hi,

There is a problem in your configuration and I confirm that your Kernel binaries don't match your Kernel sources:

*** Host machine kernel version=3.6.11+
*** Driver kernel version=3.6.11

1st line equals `uname -r` (so the running Kernel version) while second one looks into kernel-headers for Kernel sources version. Even if sometimes we can suppose that such heterogeneous configuration could be ok, we can't be sure. Moreover, pcan Makefile is made for cross-compiling too, so it won't stop when it finds such different Kernel versions.

Regards,

Stéphane
— Stéphane

ckeydel
Posts: 26
Joined: Thu 4. Nov 2010, 16:06

Re: PEAK-Linux Driver on Raspberry Pi

Post by ckeydel » Tue 3. Sep 2013, 14:20

S.Grosjean wrote:I confirm that your Kernel binaries don't match your Kernel sources:
*** Host machine kernel version=3.6.11+
*** Driver kernel version=3.6.11
Hi Stephanie,

No, that's not it. Look at the log from Michael's (successful) build and it's what you see when you follow the recommended instructions.

Regards,
Chris

User avatar
S.Grosjean
Software Development
Software Development
Posts: 302
Joined: Wed 4. Jul 2012, 17:02

Re: PEAK-Linux Driver on Raspberry Pi

Post by S.Grosjean » Thu 5. Sep 2013, 09:50

Hi Chris,

Thx for having refreshed our memory. So, we have to verify this issue in our own labs.
We will give here any feedback asap.

Best regards,

Stéphane
— Stéphane

User avatar
S.Grosjean
Software Development
Software Development
Posts: 302
Joined: Wed 4. Jul 2012, 17:02

Re: PEAK-Linux Driver on Raspberry Pi

Post by S.Grosjean » Mon 23. Sep 2013, 11:46

Hi,

So here is the last status we've got about this issue:

"pcan" driver loading works on Michael's RPi. This RPi runs a Linux Kernel 3.6.11+ built on Feb 7 3013, which uname -a gives:

Linux raspberrypi 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l GNU/Linux

But building and loading the "pcan" driver on some more recent 3.6.11+ (!) Kernels does not work. For example, following the same steps on a Jun 13 2013 3.6.11+ Kernel does not work, because of module_layout problem.

Linux PEAK-Pi-01 3.6.11+ #474 PREEMPT Thu Jun 13 17:14:42 BST 2013 armv6l GNU/Linux

So, at the moment, and until someone is able to find any corresponding linux-headers, we aren't able to give any positive fix to this issue.

Regards,

Stéphane
— Stéphane

Stanislav
Posts: 1
Joined: Fri 7. Feb 2014, 20:30

Re: PEAK-Linux Driver on Raspberry Pi

Post by Stanislav » Fri 7. Feb 2014, 20:48

Hi Michael,

Am new here, but I have finally my peak pcan-usb interface working on raspberry. There were some strange issues. Hope it helps with further driver development.

I use already peak-linux-driver-7.8 on xubuntu desktop with kernel (3.2.0-57-generic) without any problem, so I wasn't expecting any troubles on raspberry.

My raspberry comes with raspbian (uname -r => 3.10.25+ ) but there are no linux-headers for this kernel,
which cause that the make was unable to locate the version.h file.

I updated linux-image and linux-headers to version 3.10-3-rpi. After that I get strange error from make file:
arithmetic expression: expecting EOF: "3*10000+3.10-3-rpi*100+3.10-3-rpi"

Code: Select all

make clean

/bin/sh: 1: arithmetic expression: expecting EOF: "3*10000+3.10-3-rpi*100+3.10-3-rpi"
make[1]: Entering directory `/home/pi/Downloads/peak-linux-driver-7.10/driver'
rm -f src/*o src/*~ src/.*cmd *o *ko *~ .*cmd  pcan.mod.c
make[1]: Leaving directory `/home/pi/Downloads/peak-linux-driver-7.10/driver'
make[1]: Entering directory `/home/pi/Downloads/peak-linux-driver-7.10/lib'
rm -f src/*~ src/*.o *~ *.so.*
make[1]: Leaving directory `/home/pi/Downloads/peak-linux-driver-7.10/lib'
make[1]: Entering directory `/home/pi/Downloads/peak-linux-driver-7.10/test'
rm -f src/*~ src/*.o *~ receivetest transmitest bitratetest filtertest pcan-settings
make[1]: Leaving directory `/home/pi/Downloads/peak-linux-driver-7.10/test'

Code: Select all

make NET=NO PCI=NO PAR=NO ISA=NO PCC=NO DNG=NO DBG=DEBUG

/bin/sh: 1: arithmetic expression: expecting EOF: "3*10000+3.10-3-rpi*100+3.10-3-rpi"
make[1]: Entering directory `/home/pi/Downloads/peak-linux-driver-7.10/driver'
make[1]: *** No rule to make target `depend'.  Stop.
make[1]: Leaving directory `/home/pi/Downloads/peak-linux-driver-7.10/driver'
/bin/sh: 1: arithmetic expression: expecting EOF: "3*10000+3.10-3-rpi*100+3.10-3-rpi"
make[1]: Entering directory `/home/pi/Downloads/peak-linux-driver-7.10/driver'
***
*** Host machine kernel version=3.10-3-rpi
*** Driver kernel version=3.10-3-rpi
*** Path to kernel sources=/lib/modules/3.10-3-rpi/build
*** use KBUILD=yes
***
make -C /lib/modules/3.10-3-rpi/build SUBDIRS=/home/pi/Downloads/peak-linux-driver-7.10/driver        EXTRA_CFLAGS="-I/home/pi/Downloads/peak-linux-driver-7.10/driver        -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT " V=1 modules
make[2]: Entering directory `/usr/src/linux-headers-3.10-3-rpi'
make -C /usr/src/linux-headers-3.10-3-rpi \
	KBUILD_SRC=/usr/src/linux-headers-3.10-3-common \
	KBUILD_EXTMOD="/home/pi/Downloads/peak-linux-driver-7.10/driver" -f /usr/src/linux-headers-3.10-3-common/Makefile \
	modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (	\
	echo >&2;							\
	echo >&2 "  ERROR: Kernel configuration is invalid.";		\
	echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
	echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
	echo >&2 ;							\
	/bin/false)
mkdir -p /home/pi/Downloads/peak-linux-driver-7.10/driver/.tmp_versions ; rm -f /home/pi/Downloads/peak-linux-driver-7.10/driver/.tmp_versions/*
make -f /usr/src/linux-headers-3.10-3-common/scripts/Makefile.build obj=/home/pi/Downloads/peak-linux-driver-7.10/driver
/bin/sh: 1: arithmetic expression: expecting EOF: "3*10000+3.10-3-rpi*100+3.10-3-rpi"
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/src/.pcan_main.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_main)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/.tmp_pcan_main.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_main.c
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/src/.pcan_fops.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_fops)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/.tmp_pcan_fops.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_fops.c
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/src/.pcan_fifo.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_fifo)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/.tmp_pcan_fifo.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_fifo.c
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/src/.pcan_filter.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_filter)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/.tmp_pcan_filter.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_filter.c
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/src/.pcan_parse.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_parse)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/.tmp_pcan_parse.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_parse.c
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/src/.pcan_sja1000.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_sja1000)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/.tmp_pcan_sja1000.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_sja1000.c
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/src/.pcan_common.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_common)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/.tmp_pcan_common.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_common.c
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/src/.pcan_usb_core.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_usb_core)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/.tmp_pcan_usb_core.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_usb_core.c
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/src/.pcan_usb.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_usb)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/.tmp_pcan_usb.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_usb.c
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/src/.pcan_usbpro.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_usbpro)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/.tmp_pcan_usbpro.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_usbpro.c
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/src/.pcan_timing.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan_timing)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/.tmp_pcan_timing.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_timing.c
  ld -EL    -r -o /home/pi/Downloads/peak-linux-driver-7.10/driver/pcan.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_main.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_fops.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_fifo.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_filter.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_parse.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_sja1000.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_common.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_usb_core.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_usb.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_usbpro.o /home/pi/Downloads/peak-linux-driver-7.10/driver/src/pcan_timing.o 
(cat /dev/null;   echo kernel//home/pi/Downloads/peak-linux-driver-7.10/driver/pcan.ko;) > /home/pi/Downloads/peak-linux-driver-7.10/driver/modules.order
make -f /usr/src/linux-headers-3.10-3-common/scripts/Makefile.modpost
/bin/sh: 1: arithmetic expression: expecting EOF: "3*10000+3.10-3-rpi*100+3.10-3-rpi"
  find /home/pi/Downloads/peak-linux-driver-7.10/driver/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -m  -i /usr/src/linux-headers-3.10-3-rpi/Module.symvers -I /home/pi/Downloads/peak-linux-driver-7.10/driver/Module.symvers  -o /home/pi/Downloads/peak-linux-driver-7.10/driver/Module.symvers -S -w -s -T -
   gcc-4.7 -Wp,-MD,/home/pi/Downloads/peak-linux-driver-7.10/driver/.pcan.mod.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/src/linux-headers-3.10-3-common/arch/arm/include -Iarch/arm/include/generated  -I/usr/src/linux-headers-3.10-3-common/include -Iinclude -I/usr/src/linux-headers-3.10-3-common/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/usr/src/linux-headers-3.10-3-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.10-3-common/include/linux/kconfig.h   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -D__KERNEL__ -mlittle-endian   -I/usr/src/linux-headers-3.10-3-common/arch/arm/mach-bcm2708/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6 -mtune=arm1136j-s -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/home/pi/Downloads/peak-linux-driver-7.10/driver -DDEBUG -DMODVERSIONS -DNO -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO -DNO_RT  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pcan.mod)"  -D"KBUILD_MODNAME=KBUILD_STR(pcan)" -DMODULE  -c -o /home/pi/Downloads/peak-linux-driver-7.10/driver/pcan.mod.o /home/pi/Downloads/peak-linux-driver-7.10/driver/pcan.mod.c
  ld -EL -r  -T /usr/src/linux-headers-3.10-3-common/scripts/module-common.lds --build-id  -o /home/pi/Downloads/peak-linux-driver-7.10/driver/pcan.ko /home/pi/Downloads/peak-linux-driver-7.10/driver/pcan.o /home/pi/Downloads/peak-linux-driver-7.10/driver/pcan.mod.o
make[2]: Leaving directory `/usr/src/linux-headers-3.10-3-rpi'
make[1]: Leaving directory `/home/pi/Downloads/peak-linux-driver-7.10/driver'
make[1]: Entering directory `/home/pi/Downloads/peak-linux-driver-7.10/lib'
# ln -sf ../driver/pcan.h pcan.h
cc src/libpcan.c -fPIC -shared -O2 -Wall -Wl,-soname,libpcan.so.0 -lc -I. -I../driver -DNO_RT -o libpcan.so.0.6
ln -sf libpcan.so.0.6 libpcan.so
make[1]: Leaving directory `/home/pi/Downloads/peak-linux-driver-7.10/lib'
make[1]: Entering directory `/home/pi/Downloads/peak-linux-driver-7.10/test'
cc src/receivetest.c src/common.c -g -I. -I../lib -I../driver -L../lib -L/lib -L/usr/lib -L/usr/local/lib -o receivetest   -lpcan -DNO_RT
cc src/transmitest.cpp src/common.c src/parser.cpp -g -I. -I../lib -I../driver -L../lib -L/lib -L/usr/lib -L/usr/local/lib -o transmitest   -lpcan -lstdc++ -DNO_RT
cc src/bitratetest.c src/common.c -g -I. -I../lib -I../driver -L../lib -L/lib -L/usr/lib -L/usr/local/lib -o bitratetest   -lpcan -DNO_RT
cc src/filtertest.cpp src/common.c -g -I. -I../lib -I../driver -L../lib -L/lib -L/usr/lib -L/usr/local/lib -o filtertest   -lpcan -lstdc++ -DNO_RT
cc src/pcan-settings.c -g -I. -I../lib -I../driver -L../lib -L/lib -L/usr/lib -L/usr/local/lib -o pcan-settings   -lpopt -g
make[1]: Leaving directory `/home/pi/Downloads/peak-linux-driver-7.10/test'
make install works without error but the device not.

As a final experiment I downloaded kernel 3.2.0-4-rpi (linux-image-3.2.0-4-rpi @ linux-headers-3.2.0-4-rpi),
after that the installation of peak-pcan-driver works without any problems (I tried both 7.8. and 7.10).

I gues there can be a problem with the kernel name ?
It is possible that the make file is wrong when to try to parse the kernel version from name 3.10-3-rpi ?
(in comparison with 3.2.0-4-rpi)

Anyway, pcan-usb is a great device (I use also win version, it is great too), thank you that you develop it:-)

Regards,

Stan

M.Maidhof
Support
Support
Posts: 1320
Joined: Wed 22. Sep 2010, 14:00

Re: PEAK-Linux Driver on Raspberry Pi

Post by M.Maidhof » Mon 10. Feb 2014, 10:29

Hi Stan,

thanks for the info. Yes, you are right. This is an issue of our makefile, when there is a kernel version which will not have the standard enumeration 3.x.x-x, but 3.x-x only (here 3.2.0-4-rpi to 3.10-3-rpi).

As a workaround with the latest 7.10 driver, you can modify the makefile in the driver directory:

makefile line 134, set a # in front of the following line:

# KVERNUM := $(shell echo $$(($(KVERSION)*10000+$(KPATCHLEVEL)*100+$(SUBLEVEL))))

makefile line 434, set a # in front of the following line:

# kvernum=$$(($(KVERSION)*10000+$(KPATCHLEVEL)*100+$(SUBLEVEL)));\
and put the following in the next line:
kvernum= 31000

than rebuild and reinstall the driver again.

Note: this workaround will only work on a 3.10 kernel version.

We will take care for that issue and change our makefiles in one of our next releases

regards

Michael

steffen.h
Posts: 1
Joined: Thu 20. Mar 2014, 08:13

Re: PEAK-Linux Driver on Raspberry Pi

Post by steffen.h » Thu 20. Mar 2014, 11:09

S.Grosjean wrote:Hi,

So here is the last status we've got about this issue:

"pcan" driver loading works on Michael's RPi. This RPi runs a Linux Kernel 3.6.11+ built on Feb 7 3013, which uname -a gives:

Linux raspberrypi 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l GNU/Linux

But building and loading the "pcan" driver on some more recent 3.6.11+ (!) Kernels does not work. For example, following the same steps on a Jun 13 2013 3.6.11+ Kernel does not work, because of module_layout problem.

Linux PEAK-Pi-01 3.6.11+ #474 PREEMPT Thu Jun 13 17:14:42 BST 2013 armv6l GNU/Linux

So, at the moment, and until someone is able to find any corresponding linux-headers, we aren't able to give any positive fix to this issue.

Regards,

Stéphane
Hi,

Is there any new information or solution about this issue?

Regards,

steffen

M.Maidhof
Support
Support
Posts: 1320
Joined: Wed 22. Sep 2010, 14:00

Re: PEAK-Linux Driver on Raspberry Pi

Post by M.Maidhof » Thu 20. Mar 2014, 11:55

Hi Steffen,

are there newer kernel headers available? If yes, simply make a test on your system. You could also use a different distribution for your Raspberry PI, for which suitable kernel headers are available.

This is not a PEAK driver issue, it is just a missing kernel header problem of the used linux distribution.

regards

Michael

M.Maidhof
Support
Support
Posts: 1320
Joined: Wed 22. Sep 2010, 14:00

Re: PEAK-Linux Driver on Raspberry Pi

Post by M.Maidhof » Fri 4. Apr 2014, 16:07

Hi,

just did some tests again regarding the missing kernel headers for the raspberry pi foundation kernel, and found a workaround, similar to the solution chris has used in an earlier post, but with a newer kernel. Simply install a raspbian kernel 3.10-3, for which suitable kernel headers exists, and which has already activated the socketCAN driver in the kernel:

Please use the 2014-01-07-wheezy-raspbian.img and boot your system once.

next steps:
sudo apt-get update
sudo apt-get install linux-image-rpi-rpfv


sudo nano /boot/config.txt
post those two lines at the end of the file:

kernel=vmlinuz-3.10-3-rpi
initramfs initrd.img-3.10-3-rpi followkernel

save it and reboot the system.

after reboot:
sudo apt-get update
sudo apt-get install linux-headers-3.10-3-rpi

now you have kernel headers available which will fit to your installed kernel version.

When you want to use the Netdev Interface (SocketCAN), you can directly use our PCAN-USB on the Raspberry PI now. It is listed as can0 when you call ifconfig -a, see also:
http://en.wikipedia.org/wiki/SocketCAN
for more details about configuration and tools for the SocketCAN interface.

When you like to use the chardev driver, you can compile our driver as written earlier in that thread, take care that you have to patch the Makefile due to the different kernel enumeration with 3.10-3, see http://www.peak-system.com/forum/viewto ... t=40#p2673 for more details.

regards

Michael

M.Maidhof
Support
Support
Posts: 1320
Joined: Wed 22. Sep 2010, 14:00

Re: PEAK-Linux Driver on Raspberry Pi

Post by M.Maidhof » Mon 5. May 2014, 17:16

Hi,

with the latest peak-linux-driver-7.11 the chardev driver could be installed on the Raspberry Pi with kernel 3.10-3 without problems (no makefile patch necessary anymore). You could download that driver from our Linux driver website:

http://www.peak-system.com/fileadmin/me ... .11.tar.gz

regards

Michael

Post Reply