[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [rtl] Saturday, August 08, 1998 (Weekly Updates) (fwd)



Hi to everyone out there in the wonderful world of RT-Linux....
If i may toruble you all for some advice....
I am a 4th year student at the univeristy of melbourne, and for my 4th year
project, my partners and I are trying to develop an antenna controller so
that we can use a satellite dish to track low orbiting satellites via the
internet.... Info can be found at
http://stargate.ee.mu.oz.au ... its pretty cool if i do say so my self.....
The system was originally developed to be run using 'UNOS' (Univeristy Of
Newcastle Operating System), however, major developments have been hindered
by the lack os sufficient documentation and knoweledge of this 'OS' :(.
	So it is our plan to switch over to RT-Linux, where there is global help
available, and also, the source code is almost reduced by 90%, with UNOS
having close to 1000+ pages or better off 2,500,000 lines of code!!!!! And
only one person was in conatct with the univeristy who truely understood
it.... and he lives/works interstate.... So you can see our reasoning....
	Initially we would simply like to compile this dirty great big state
machine in RT-linux and use it to control some of the low level uNOC
drivers... however, this is where are problem lies.... Using the standard
2tasks example, i modified it by changing the 'fun' function to call out
state machine which needs to run periodically at 15Hz uniterrupted when it
is running.... With the original 2tasks example we simply loaded the
rtporccess.0 module into memory, and ran 'app' however, now rt-process.o
depends on a few other object files... The make file is included below....
I seem to get this error that is as follows.....

If any one could help, it would greatly be appreicated......
Niroshan Rajadurai 

============================================================================
==========

When I run these commands =>

/sbin/insmod /lib/modules/2.0.33/fs/rt_fifo_new.o
/sbin/insmod
/lib/modules/2.0.33/misc/rt_prio_sched.o
/sbin/insmod ./*.o						


I get =>

./error.o: couldn't find the kernel version the module was compiled for <=
THIS IS 
											   THE
											PROBLEM!!!
============================================================================
===========

My makefile is as follows =>

all: rt_process.o app

# the path to the rt-linux kernel 
RTLINUX =
/usr/src/linux
INCLUDE = ${RTLINUX}/include

FLAGS = -O2 -Wall 
CFLAGS =
-O2 -Wall -g  -D__KERNEL__ -D__RT__

OBJ=\
         error.o\

iohw.o\
         packet.o\
         plc.o\
         poscon.o\

sat_data.o\
         sat_track.o\
         startrak.o\
         serial.o\

       user.o\
         utilities.o


app: app.c 
	gcc -I${INCLUDE}
${FLAGS} -o app app.c 
#	gcc -I${INCLUDE} ${CFLAGS} -o app app.c


rt_proc.o: rt_proc.c seq.o
	gcc -I$(INCLUDE) $(CFLAGS)  -c rt_proc.c 
#
gcc -I$(INCLUDE) $(CFLAGS) -D__KERNEL__ -D__RT__  -c rt_proc.c 

seq.o:
seq.c $(OBJ)
	gcc  $(CFLAGS) -c seq.c 
	
clean:
	rm -f app *.o

# DO NOT
DELETE

============================================================================
============

the file rt-process.c is now like this =>

#define MODULE
#include <linux/module.h>
#include <linux/kernel.h>
#include
<linux/version.h>
#include <linux/errno.h>

#include
<linux/rt_sched.h>
#include <linux/rtf.h>
#include "control.h"
#include
"seq.h"			<= contains source for sequnecer_task() &
						init_Sequencer_task().

RT_TASK tasks[1];

static char *data[] =
{"Iteration "};

/* t -- the fifo number */
void fun(int t) {


init_sequencer_task();
	/* initialize sequencer */

	while (1) {

rtf_put(t, data[t - 1], 11);
		sequencer_task();
		rt_task_wait();
	}
}


int my_handler(unsigned int
fifo)
{
	struct my_msg_struct msg;
	int err;
	RTIME now;

	while ((err =
rtf_get(3, &msg, sizeof(msg))) == sizeof(msg)) {
		switch (msg.command) {

	case START_TASK:
				now = rt_get_time();

rt_task_make_periodic(&tasks[msg.task], now, msg.period);
				break;

case STOP_TASK:
				rt_task_suspend(&tasks[msg.task]);
				break;

default:
				return -EINVAL;
		}
	}
	if (err != 0) {
		return -EINVAL;
	}

return 0;
}


int init_module(void)
{
	rtf_create(1, 4000);
	rtf_create(3,
100);		/* input control channel */
	rt_task_init(&tasks[0], fun, 1, 3000,
1);
	rtf_create_handler(3, &my_handler); 
	return 0;
}


void
cleanup_module(void)
{
	rtf_destroy(1);
	rtf_destroy(3);

rt_task_delete(&tasks[0]);
}

============================================================================
==========

Once again thank you for your time inreading to the bottom of this email...
any help you could provide would be greatly appreciated....
Niroshan

--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu


--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu