SPI_slave_driver_implementation icon indicating copy to clipboard operation
SPI_slave_driver_implementation copied to clipboard

Compile Problem

Open ghost opened this issue 8 years ago • 1 comments

First I wanted to thank you. i have a problem while compiling your driver i edit the make file with my kernel version

ARCH := arm
COMPILER := /home/circle/Desktop/spi_proj/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
COMPILER_V := gcc
PWD := $(shell pwd)
KERN_V=3.8.13
BUILD_V=-bone79
SOURCE=linux-stable-rcn-ee
SUBDIRS=firmware/

KDIR := $(PWD)/$(SOURCE)-$(KERN_V)$(BUILD_V)

obj-m+= driver/spi-slave-core.o driver/spi-slave-debug.o driver/spi-slave-dev.o driver/spi-mcspi-slave.o 

all:
	$(MAKE) -C $(KDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(COMPILER) modules
	$(COMPILER)$(COMPILER_V) -o slave_app/slave_app slave_app/slave_app.c

clean:
	$(MAKE) -C $(KDIR) M=$(PWD) ARCH=$(ARCH) clean

when i try to compile i get a lot of error: implicit declaration of function from each c file i try to add the prototype of function for each error from here http://elixir.free-electrons.com/linux/latest/ident/ didnt help and also try to include all the header file where the function is first Defined still didnt mange to compile it any ideas?

ghost avatar May 10 '17 07:05 ghost

Just ran into something similar for 4.13.2, try adding <linux/sched/signal.h>

diff --git a/driver/spi-slave-dev.c b/driver/spi-slave-dev.c index 13027b2..70e75dd 100644 --- a/driver/spi-slave-dev.c +++ b/driver/spi-slave-dev.c @@ -23,6 +23,9 @@ #include <linux/poll.h> #include <asm/current.h>

+// needed for kernel > 4.4.54 (4.13.2) +#include <linux/sched/signal.h> + #include "spi-slave-dev.h" #include "spi-slave-core.h"

niallp avatar Sep 25 '17 18:09 niallp