Re: [uCsimm] URGENCY--HELP NEEDED FOR REAL-TIME FIFO

From: David McCullough (davidm@lineo.com)
Date: Mon Jan 29 2001 - 17:49:51 EST


Peng,

Firstly, I have had very little to do with real-time uclinux, but I
can see some things that may help you :-)

Jivin Peng Li lays it down ...
> Hi, all,
>
> PLEASE DO READ THIS E-MAIL AND HELP ME.
>
> The problem is I want to measure the execution time of real-time tasks
> in the kernel,using realitme fifo. My platforms are:
> 1. uCsimm
> 2. Linux kernel: linux-2.0.38 from
> ftp://ftp.kernel.org/pub/linux/kernel/v2.0/linux-2.0.38.tar.gz
> 3. real-time patches: uClinux-2.0.38.1pre7.diff from
> http://www.uClinux.org/pub/uClinux/uClinux-2.0.x/uClinux-2.0.38.1pre7.diff.gz
>
> and RTL0.9J-uClinux1pre7.diff
>
> In my program, there's only one real-time task running in the kernel. It
>
> will call rtf_put() to send one time-stamped message to a user
> application before its excution and send another time-stamped message
> after its excution. So, the user application can compute the execution
> time of that task. Two fifo's are used for communication. One is data
> channel, which carries messages to user application, and the other is
> control channel, which takes commands to rt-task. The program is pretty
> much the same as frank example in the rt patches. Bu both my program and
>
> the frank can't work.
>
> The frank even can't be successfully compiled in my machine.
> First, rtl/rtl_fifo.h and asm/rt_time.h can't be found when compiling
> frank_app.c. I changed it to absolute path.
> Then, here is another error:
> m68k-pic-coff-gcc -02 -fomit-frame-pointer -Wall -o frank_app
> frank_app.c
> frank_app.c: In function 'main':
> frank_app.c:58: unknown register name 'di' in 'asm'
> frank_app.c:58: unknown register name 'cx' in 'asm'
> frank_app.c:58: inconsistant operand constraints in an 'asm'
> frank_app.c:66: inconsistant operand constraints in an 'asm'
> frank_app.c:72: inconsistant operand constraints in an 'asm'
> frank_app.c:58: inconsistant operand constraints in an 'asm'
>
> make: *** [frank_app] Error 1
>
> I changed nothing of the frank, except add it to the Makefile at
> .../rtl/Makefile.
> O_OBJS := exampls/frank_module.o

For some reason this appears to be using x86 assembler. Is there a config
file for frank that has x86 settings in it or similar ? Check frank_app.c,
line 58 and see if it's asm or a macro and work out why it isn't the m68k
version.

> In my case, the program can be compiled (use cross compiler). And then I
>
> manually created two fifo devices at:/opt/uClinux/dev.
> #mknod rtf1 c 150 1
>
> Unfortunately, when I tried to run the application after new kernel
> boots, it says " Error opening /dev/rtf1". That's the error message I
> put in the code. I tried major number 63, it still didn't work. If I use
>
> " mknod rtf1 p 150 1", the shell says:
> mknod : major and minor device number may not be specified for fifo
> files
> Try 'mknod --help' for more information.
>
> So, I ignored the device number,just typed:
> #mknod rtf1

I think you want 'mknod rtf1 p' unless that is the default when you have no
type, I don't think it is. run 'ls -al rtf1' to make sure it is a named
pipe.

> Then I remove old Makefile at uClinux working dir:
> %rm Makefile
> %buildenv
> %make image.bin
>
> This time, the user application hangs at "fd0 = open("/dev/rtf1",
> O_RDONLY)".

Cheers,
Davidm

-- 
David McCullough:  Ph: +61 7 3435 2815  Lineo (The Embedded Solutions Company)
davidm@lineo.com   Fx: +61 7 3891 3630  PO Box 925, Kenmore QLD 4069, Australia
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:40 EST