[ECOS]Init-problem with ecos.

Nick Garnett nickg@ecoscentric.com
Mon Apr 6 15:21:00 GMT 2009


Robert Brusa <bob.brusa@gmail.com> writes:

> Hi
> I encountered problems running my app on my at91sam7x512-based board
> and  the problem seems to be somewhere in the initialization of
> ecos. I then  have written a little app which essentially consists of
> 
> #include <cyg/infra/diag.h>// no other includes
> void cyg_user_start(void)
> {
>      diag_printf("\n%s started\n", thisprog);
>      myjob(); // consider this a dummy routine for now
>      diag_printf("\ncmyjob done\n");
> }
> 
> When running this app, I get the following output:
> ��Init device '/dev/ser0'
> AT91 SERIAL init - dev: fffc0000.6
> Set output buffer - buf: 0x00202c80 len: 128
> Set input buffer - buf: 0x00202d00 len: 128
> Init device '/dev/ser1'
> AT91 SERIAL init - dev: fffc4000.7
> Set output buffer - buf: 0x00202d80 len: 128
> Set input buffer - buf: 0x00202e00 len:
> 128פԕ���������Ɂ��ͅ��ɕ�5)55)5)��������Ɂ�'AT91 SERIAL init - dev:
> fffc0000.6
> Set output buffer - buf: 0x00202c80 len: 128
> Set input buffer - buf: 0x00202d00 len: 128
> Init device '/dev/ser1'
> AT91 SERIAL init - dev: fffc4000.7<cut>.... and it repeats this
> 
> When setting a breakpoint at the call myjob() it is reached, but now
> output appears on ser1. But debugging this application is tricky,
> because  it does not show reproducible behaviour. What's going on here?

AT91 serial devices cannot be shared between diagnostics and the
serial device driver. Both use DMA and once the device driver starts
it points the DMA engine at its own buffers. The diagnostic code
doesn't know this and gets thoroughly confused.

You must disable the serial driver completely on the device you want
to use for diagnostics in the configuration.


-- 
Nick Garnett                                       eCos Kernel Architect
eCosCentric Limited    http://www.eCosCentric.com       The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223 245571
Registered in England and Wales:                         Reg No: 4422071


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



More information about the Ecos-discuss mailing list