This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Serial Port Configuration


Ali Rodgo wrote:
Jonathan, what do you mean with "configuration is consistent"?I have checked the libraries and all of those are created, fcntl.h, termios.h etc.I have programmed:

Something like "ecosconfig check" on the command line, or checking there are no conflicts if using the graphical eCos configuration tool (View->Conflicts I think).


fd=open("/dev/termios1", O_RDWR | O_NOCTTY) /* suppose to open the termios1  driver associate to the harrware serial driver /dev/ser1.
read(fd,buf,1)

I am really confused

open() comes from the fileio package. If it says it can't find open(), then something is wrong with the way the fileio package was added, or eCos was rebuilt.


Jifl

Thanks in advance

Jonathan Larmour <jifl@eCosCentric.com> schrieb am 12.02.04 15:26:24:

Ali Rodgo wrote:

Thank you very much, i have made the following configuration:

CYGPKG_IO_SERIAL_TERMIOS=enable CYGPKG_IO_SERIAL_TERMIOS_TERMIOS0=enable
CYGPKG_IO_SERIAL_TERMIOS_TERMIOS1=enable GYGDAT_IO_SERIAL_TERMIOS_TERMIOS1_DEV="/dev/ser1" GYGDAT_IO_SERIAL_TERMIOS_TERMIOS0_DEV="/dev/ser0"



CYGPKG_IO_SERIAL_DEVICE=enable CYGPKG_IO_SERIAL_ARM_AT91_SERIAL1_NAME="/dev/ser1" CYGPKG_IO_SERIAL_ARM_AT91_SERIAL0_NAME="/dev/ser0"


and the code you can see in the file serial.c. When compiling i receive
two errors in the open function:undefined reference to "open".

open() should come from the FILEIO package which CYGPKG_IO_SERIAL_TERMIOS requires. Are you sure your configuration is consistent?



I f i want to make a printf should now open the device(SERIAL A)
"/dev/termios0" and call the write function or call easy the printf
function as before(/dev/ttydiag)

Assuming you aren't running GDB on the same port, it's probably best to use /dev/termios0, or /dev/tty0 should work too.


You can't use /dev/ttydiag on the same port as you're running the "full" serial driver on.

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
Visit us at Embedded World 2004, Nürnberg, Germany, 17-19 Feb, Stand 12-449
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss




______________________________________________________________________________
Nachrichten, Musik und Spiele schnell und einfach per Quickstart im WEB.DE Screensaver - Gratis downloaden: http://screensaver.web.de/?mc=021110





--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
Visit us at Embedded World 2004, Nürnberg, Germany, 17-19 Feb, Stand 12-449
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]