Missing header file compiling PEAK Linux driver 8.1

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
skllrn
Posts: 2
Joined: Wed 7. Sep 2016, 09:40

Missing header file compiling PEAK Linux driver 8.1

Post by skllrn » Wed 7. Sep 2016, 10:29

Hi,
I am having an issue comiling the PEAK Linux driver 8.1 with CAN FD support.
The device I want the driver to run on is a armv7 (beaglebone) with newest debian jessie image.

Thus I followed the documentation and installed the necessary packages (kernel headers, libpopt-dev),
I get the warning that some functions are declared implicit.
Those warnings are treated as errors and compilation stops.

Do I have to change some settings to ignore those warnings because maybe the header (/linux/pci.h) gets included afterwards or am I missing something else here?


Thats the output make gives me in ~/peak-linux-driver-8.1/driver:

Code: Select all

root@beaglebone:~/peak-linux-driver-8.1/driver# make
***
*** Host machine kernel version=4.4.9-ti-r25
*** Driver kernel version=4.4.9
*** Path to kernel sources=/lib/modules/4.4.9-ti-r25/build
*** use KBUILD=yes
*** cc version=4.9.2
***
make -C /lib/modules/4.4.9-ti-r25/build SUBDIRS=/root/peak-linux-driver-8.1/driver        EXTRA_CFLAGS="-DFIX_PCIENABLEMSIRANGE -I/root/peak-linux-driver-8.1/driver        -DNO_DEBUG -DMODVERSIONS -DPARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DDONGLE_SUPPORT -DPCCARD_SUPPORT -DNO_NETDEV_SUPPORT	 -DNO_RT  -Wno-date-time" V=0 modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.9-ti-r25'
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcan_main.o
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcan_fops.o
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcan_fifo.o
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcan_filter.o
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcan_parse.o
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcan_sja1000.o
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcan_common.o
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcan_timing.o
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcanfd_core.o
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcanfd_ucan.o
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcan_pci.o
  CC [M]  /root/peak-linux-driver-8.1/driver/src/pcanfd_pci.o
/root/peak-linux-driver-8.1/driver/src/pcanfd_pci.c: In function 'pcan_pci_ucan_probe':
/root/peak-linux-driver-8.1/driver/src/pcanfd_pci.c:1943:2: error: implicit declaration of function 'pci_enable_msi_range' [-Werror=implicit-function-declaration]
  ucan_adapter->msi_count = pci_enable_msi_range(dev, 1, can_count);
  ^
/root/peak-linux-driver-8.1/driver/src/pcanfd_pci.c:2049:2: error: implicit declaration of function 'pci_disable_msi' [-Werror=implicit-function-declaration]
  pci_disable_msi(dev);
  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/root/peak-linux-driver-8.1/driver/src/pcanfd_pci.o' failed
make[2]: *** [/root/peak-linux-driver-8.1/driver/src/pcanfd_pci.o] Error 1
Makefile:1387: recipe for target '_module_/root/peak-linux-driver-8.1/driver' failed
make[1]: *** [_module_/root/peak-linux-driver-8.1/driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.9-ti-r25'
Makefile:382: recipe for target 'all' failed
make: *** [all] Error 2
root@beaglebone:~/peak-linux-driver-8.1/driver# 
Thanks in advance

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

Re: Missing header file compiling PEAK Linux driver 8.1

Post by S.Grosjean » Fri 9. Sep 2016, 14:41

Hi,

Function "pci_enable_msi_range()" is always present in mainline Kernel 4.x.
I suppose that CONFIG_PCI isnot defined in your specific one...

Could you please check this?

Code: Select all

$ grep CONFIG_PCI= /boot/config-`uname -r`
Which kind of PEAK-System hardware do you want to use? If it's not a PCI one, try to compile the driver without any PCI support, like this:

Code: Select all

$ make PCI=NO_PCI_SUPPORT
Regards,

Stéphane
— Stéphane

skllrn
Posts: 2
Joined: Wed 7. Sep 2016, 09:40

Re: Missing header file compiling PEAK Linux driver 8.1

Post by skllrn » Mon 12. Sep 2016, 10:09

First of all thank you for your help and time Stéphane.

You are right, the PCI_CONFIG flasgs are indeed not set.
I am using an PCAN-USB FD adapter, so to exclude the PCI support solves my problem.

Regards,

Skllrn

Post Reply