Skip navigation.
Home
The QNX Community Portal

View topic - serial

serial

Isn't the name clear?

serial

Postby swethasom » Tue Dec 09, 2008 11:50 am

Hi Sir/Madam,

I have created an photon application, where data can be recieved. the procedure is 6 bytes of hex data is writen to serial port and immediately the serial port acts as reciever. the data recieved is show as a tabler format in this reciever GUI application. This application is working fine on x86 but the program is not working when built for ppc core ml403 board and is giving error. The program is running on ppc but when it is trying to read from serial port it is giving error and terminating

Below is the part of the reciever program and the error it is givin.



fd = open("/dev/ser1", O_RDWR | O_NOCTTY | O_NDELAY);//we are opening the serial port as above
write(fd,&value,len);// writing buffer to serial port
read(fd, sResult, n); // reading from the serial port to buffer

The error coming for ppc core board is:

Process 114705 (receive) terminated SIGS EGV code= 2fltno=11
ip= fe35833c mapaddr= 0005833c .ref=48040000..

Memory fault...

Please help us to resolve this error.

Thanks and regards
Swetha
swethasom
Active Member
 
Posts: 13
Joined: Tue Dec 09, 2008 11:20 am

RE: serial

Postby micro » Tue Dec 09, 2008 1:25 pm

i do not know O_NDELAY within my documentation this may be new (we have 6.3.2). Does O_NDELAY make you not anymore require to flush streams? Oh wait, we have a file ^^
Last edited by micro on Tue Dec 09, 2008 1:32 pm, edited 1 time in total.
micro
Senior Member
 
Posts: 458
Joined: Thu Jul 22, 2004 8:41 pm

RE: serial

Postby micro » Tue Dec 09, 2008 1:29 pm

with the SIG SEGV information you could just open your executable in your debugger and check what is running @ that address. if really the corresponding part you posted is running there also may be invalid values.

For example is sResult of type "char * sResult"? And is there also space allocated? Otherwise you just wrote anywhere ;P
micro
Senior Member
 
Posts: 458
Joined: Thu Jul 22, 2004 8:41 pm

RE: serial

Postby mario » Tue Dec 09, 2008 1:59 pm

Your code is doing something illegal, post complete source.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 1 guest