Fabien Renaud wrote:

Hello !!

I�m still with my problems ;)

Well I don�t think this one is specific to ARM ( I hope, so maybe you�ll be able to help me :) )

So, when I want to run a simple sample to communicate with serial interface ( I have rxtx lib) I have a lot of things on my screen (which seem ok), then this :

RXTX WARNING: This library was compiled to run with OS release 2.4.20_dev and you are currently running OS release 2.4.21-rmk2
-pxa1. In some cases this can be a problem. Try recompiling RXTX if you notice strange behavior. If you just compiled RXTX m
ake sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.


press enter to continue

If I press continue nothing happened.

This is the backtrace :

#0  0x4029939c in *__GI___poll (fds=0xbfffdd28, nfds=1, timeout=-1)
   at ../sysdeps/unix/sysv/linux/poll.c:85
#1  0x400cdc58 in handleIO ()
  from /home/java/kaffe/jre/lib/arm/libkaffevm-1.1.4.so
#2  0x400cd924 in reschedule ()
  from /home/java/kaffe/jre/lib/arm/libkaffevm-1.1.4.so
#3  0x400cb380 in suspendOnQThread ()
  from /home/java/kaffe/jre/lib/arm/libkaffevm-1.1.4.so
#4  0x400ce668 in jcondvar_wait ()

With sablevm the program runs when I press enter.

I attach SimpleWrite.java


Someone have ever run rxtx with kaffe ?

Fabien

------------------------------------------------------------------------

import java.io.*;
import java.util.*;
import gnu.io.*;


public class SimpleWrite { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "Hello, world!\n"; static SerialPort serialPort; static OutputStream outputStream;

public static void main(String[] args) {
portList = CommPortIdentifier.getPortIdentifiers();
while ( portList.hasMoreElements() ) {
portId = (CommPortIdentifier) portList.nextElement();
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
if (portId.getName().equals("/dev/ttyS3")) {
try {
serialPort = (SerialPort)
portId.open("SimpleWriteApp", 2000);
System.out.println("ok");
} catch (PortInUseException e) {
System.out.println("not ok");
}
try {
outputStream = serialPort.getOutputStream();
} catch (IOException e) {}
System.out.println("test 3");
try {
serialPort.setSerialPortParams(9600,
SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);
} catch (UnsupportedCommOperationException e) {}
try {
outputStream.write(messageString.getBytes());
} catch (IOException e) {}
serialPort.close();
}
}
}
}
}



I have now more informations with kaffe-1.1.4:

Program received signal SIGINT, Interrupt.
[Switching to Thread 16384 (LWP 743)]
0x4025c39c in *__GI___poll (fds=0xbfffe054, nfds=1, timeout=-1)
   at ../sysdeps/unix/sysv/linux/poll.c:85
85      ../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
       in ../sysdeps/unix/sysv/linux/poll.c
(gdb) where
#0  0x4025c39c in *__GI___poll (fds=0xbfffe054, nfds=1, timeout=-1)
   at ../sysdeps/unix/sysv/linux/poll.c:85
#1  0x4009217c in handleIO (canSleep=1) at jthread.c:2147
#2  0x40091de4 in reschedule () at jthread.c:2026
#3  0x4008fb78 in suspendOnQThread (jtid=0xc0018, queue=0xc0028, timeout=-1)
   at jthread.c:911
#4  0x40092a34 in jcondvar_wait (cv=0xc0028, lock=0xc0020, timeout=-1)
   at jthread.c:2365

The line in jthread.c is this one :

#if USE_POLL
       r = poll(pollarray, nfd, sleep ? -1 : 0);   <- line 2147
#else


I tried with HEAD too and I have segfault :

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 796)]
callMethodA (meth=0x1b8cb8, func=0x1b8cb8, obj=0x0, args=0xbfffe198,
   ret=0xbfffe964, promoted=1) at support.c:653
653     support.c: No such file or directory.
       in support.c
(gdb) where
#0  callMethodA (meth=0x1b8cb8, func=0x1b8cb8, obj=0x0, args=0xbfffe198,
   ret=0xbfffe964, promoted=1) at support.c:653
#1  0x4006eba8 in virtualMachine (meth=0x1b8cb8, arg=0xbfffe190,
   retval=0xbfffe964, thread_data=0xa902c) at machine.c:137
#2  0x400710a4 in runVirtualMachine (meth=0x1b8e20, lcl=0xbfffe160,
   sp=0xbfffe188, npc=41, retval=0xbfffe964, mjbuf=0xbfffe1e8,
   thread_data=0xa902c) at kaffe.def:2832

Is someone has now an idea :)

Cheers,

Fabien


_______________________________________________ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to