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: Problem with serial setup


Daniel Lidsten wrote:
Yes, I have done this successfully on the PowerPC (QUICC) hardware that you are using. Be sure and get up-to-date sources, as I fixed a bug in the HAL/QUICC serial serial drivers about a month ago.


When you use the two serial drivers together, how have you setup all
options in the configTool?

I think trying to do both is a recipe for confusion. You say you set:
HAL/diag serial device driver: /dev/ser1
but assuming you are referring to CYGDAT_IO_SERIAL_TTY_CONSOLE, this is just the name of the device that the io/serial layer _exports_ as a tty device based on top of haldiag. It doesn't actually change anything about where haldiag goes *to*.


Instead this option should be left as /dev/ttydiag, otherwise you will get two entries in the device table that claim to be /dev/ser1 which would be bad.

But even then haldiag isn't really intended to be used with the interrupt-driven serial drivers. You can maybe let it share the same device but with haldiag still using its own driver in the HAL - that might not be too bad, although obviously output may overlap. You'll also probably get bogus tx complete interrupts, although hopefully whatever serial driver you are using should ignore those.

If you really want to use the interrupt-driven driver for diagnostic output, you could try editting infra/current/src/diag.cxx, specifically diag_write_char, to do this. Although some care is needed - you will have to eliminate anything that tries to do any diag output before the serial driver is initialized and interrupts enabled, otherwise it may jam waiting for an interrupt that never happens, or if the driver isn't initialized yet, it may do who knows what depending on what your hardware requires to be set up (you could of course cheat by just testing in your serial driver if the device has been initialized and interrupts enabled).

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


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


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