Error that i am getting: Error: insmod: error inserting './radaradc.ko': -1 Unknown symbol in module radaradc.c: #include #include #include #include #include "../common.h" //PORT definition #define TASK_PRIO 99 // Highest RT priority #define TASK_MODE 0 // No flags #define TASK_STKSZ 0 // default Stack size #define MS 1000000 //1000000 ns = 1 ms //In some systems, Timer Base or Task Period less than 10 micro seconds //causes system to freeze #define TIMER_BASE MS/100 //TIMER_BASE = 10 micro sec #define TASK_BASE_PERIOD MS/1000 // 1 micro sec #define TASK_DEFAULT_PERIOD 2500 // 2500 micro seconds int sampleTime = TASK_DEFAULT_PERIOD; //in micro sec. by default 2.5 ms. MODULE_PARM(sampleTime, "i"); //read integer module parameter "sampleTime" MODULE_LICENSE("GPL"); static RT_TASK td_adc; //Real time task pointer int TASK_PERIOD; //TASK_BASE_PERIOD * sampleTime (micro sec) void adc (void *arg) { unsigned char pos=0, count=0, mov=1, fix=0x18, out; printk(KERN_ALERT "\nRadar adc running\n"); rt_task_set_periodic(NULL, TM_NOW, rt_timer_ns2ticks(TASK_PERIOD)); //set period for (;;) { rt_task_wait_period(); //deschedule until next period //generate moving target position if (count==0) { if (pos<7) mov*=2; else mov/=2; ++pos; if (pos>13) pos=0; } //generate target signals if (count>169 && count<200) out=255; //fixed target in bottom 3 screen lines else switch(count) { //moving target around fixed target case 64 : case 74 : case 84 : case 104 : case 114 : case 124 : out=fix; break; case 94 : out=fix | mov; break; default : out=0; } //send signal to port outb (out, DATAPORT); //outb takes aprox. 1 Micro sec. outb (count, COUNTPORT); //outb takes aprox. 1 Micro sec. //printk(KERN_ALERT "%d ", count); //check with dmesg ++count; if (count==200) count=0; } //for } int init_module(void) { //Set Task Period TASK_PERIOD=TASK_BASE_PERIOD*sampleTime; printk("\nRadar adc sucessfully loaded with\n"); printk(KERN_ALERT "sampleTime = %d (micro secs)\n", sampleTime); rt_timer_start(TIMER_BASE); // Start timer base rt_task_spawn(&td_adc, "adc", TASK_STKSZ, TASK_PRIO, TASK_MODE, &adc, NULL); //retorna 0 se OK ou <0 se erro return 0; } void cleanup_module(void) { rt_task_delete(&td_adc); rt_timer_stop(); printk("\nradar adc unloaded\n"); } *************************************************************************** Makefile: #Simple Xenomai module makefile #had Nov 2006 # obj-m := radaradc.o KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) EXTRA_CFLAGS := -I/usr/lib/xenomai/include -I/usr/include/ default: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules clean: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean