public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] Threading on EDB7211
@ 2000-06-16  8:29 Alfredo Knecht
       [not found] ` <XFMail.000616095000.gthomas@redhat.com>
  0 siblings, 1 reply; 17+ messages in thread
From: Alfredo Knecht @ 2000-06-16  8:29 UTC (permalink / raw)
  To: Gary Thomas, Rene.Affourtit, ecos-discuss

>Did anybody solve this?

Hello,
unfortunately, not yet. I have not received a response to my plea for a
working target.ld for the EDB7211, so I am still trying to figure out what
is wrong.
Will let you know when I stumble onto anything.
Cheers,
Alfredo

************************************************************************
Alfredo Knecht       Fax  ++41 91 610 8970          Tel ++41 91 610 8960
SUPSI-ICIMSI         aknecht@cimsi.cim.ch        http://www.cimsi.cim.ch

Istituto CIM della Svizzera italiana              CH-6928 Manno (Lugano)
************************************************************************

^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: [ECOS] Threading on EDB7211
@ 2000-06-19  5:24 Rene.Affourtit
  0 siblings, 0 replies; 17+ messages in thread
From: Rene.Affourtit @ 2000-06-19  5:24 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss, gary

I modified the code to let ecos cooperate with the angel debugger.
this dates back to the time gdb, cygwin and angel didn't cooperate (problem
is fixed in cygwin 1.1, I haven't tested it, but I haven't heard complaints
either).
What I do in the interrupt handler is I check for interupts from uart2 (and
some checks to see if angel is currently running) and let these be handled
by angel.

It turns out angel doesn't acknowledge a transmit interrupt for uart2. So,
once a Tx interupt was set all interupts got handled by angel including the
timer interrupts. Solution? don't let angel handle this interupt or make
sure it is acknowleged.



                                                                                                                     
                    Gary Thomas                                                                                      
                    <gthomas@redhat        To:     Rene.Affourtit@pemstar.nl                                         
                    .com>                  cc:     ecos-discuss@sourceware.cygnus.com                                
                    Sent by:               Subject:     RE: [ECOS] Threading on EDB7211                              
                    gary@ares.chez-                                                                                  
                    thomas.org                                                                                       
                                                                                                                     
                                                                                                                     
                    06/19/00 02:06                                                                                   
                    PM                                                                                               
                                                                                                                     
                                                                                                                     




On 19-Jun-00 Rene.Affourtit@pemstar.nl wrote:
>
> Thanks for the hint,
>
> but as it turned out my problem was caused by a modification I made in
> vectors.s which caused that no interupts were handled by ecos at all.
> It's strange how two very different problems can have the same symptoms.
> Sorry to have bothered you all with something that was entirely my own
> fault.
>

No need to apologize (just don't do it again :-)

This mailing list is supposed to be a forum where ideas and questions can
be posted and hopefully resolved.  Even if the problem was your fault,
asking it here let's everyone who uses eCos about it.  When a solution
is found, we all hear about it as well and can benefit from the experience.

Just for grins - what did you change in vectors.S, why did you do it and
what did you do wrong?  [Just for pedagogic enlightment :-) ]




^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: [ECOS] Threading on EDB7211
@ 2000-06-19  4:42 Rene.Affourtit
  2000-06-19  5:06 ` Gary Thomas
  0 siblings, 1 reply; 17+ messages in thread
From: Rene.Affourtit @ 2000-06-19  4:42 UTC (permalink / raw)
  To: ecos-discuss

Thanks for the hint,

but as it turned out my problem was caused by a modification I made in
vectors.s which caused that no interupts were handled by ecos at all.
It's strange how two very different problems can have the same symptoms.
Sorry to have bothered you all with something that was entirely my own
fault.

Rene




^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: [ECOS] Threading on EDB7211
@ 2000-06-19  0:04 Rene.Affourtit
  2000-06-19  4:11 ` Gary Thomas
  0 siblings, 1 reply; 17+ messages in thread
From: Rene.Affourtit @ 2000-06-19  0:04 UTC (permalink / raw)
  To: Gary Thomas; +Cc: aknecht, ecos-discuss, gary

I'm using the cirrus logic edb7111-2 rev B board.
I think my network problems are related to the timer interrupt problems,
because what I see is
(rougly)
- system initializes,
- networking interface starts the cyg_netint thread.
- cyg_netint waits for netint_flags
- program starts whatever threads it need's
- one by one all threads yield (waiting for IO or somtheing like that)
- system enters Idle thread mode and stays there

 this is a scenario which enters IdleThread mode. Basicly what happens is
that because there are no (or very few) clock interrupts there is only
scheduling when a thread has to wait. Once  a thread starts running that
doesn't have to wait (e.g. IdleThread) the system stays in this thread and
keeps on doing what it thinks is useful work.

Hope this is useful background info,
I'm looking into today, I'll let you all know if I find something

     Rene



                                                                                                                
                    Gary Thomas                                                                                 
                    <gthomas@redhat        To:     Rene.Affourtit@pemstar.nl                                    
                    .com>                  cc:     ecos-discuss@sourceware.cygnus.com, Alfredo Knecht           
                    Sent by:               <aknecht@cimsi.cim.ch>                                               
                    gary@ares.chez-        Subject:     RE: [ECOS] Threading on EDB7211                         
                    thomas.org                                                                                  
                                                                                                                
                                                                                                                
                    06/16/00 04:03                                                                              
                    PM                                                                                          
                                                                                                                
                                                                                                                




On 16-Jun-00 Rene.Affourtit@pemstar.nl wrote:
> Did anybody solve this?
> I didn't notice this before, but in trying to get the networking code to
> run I noticed it.
>

I didn't hear anything back from him.  I'm not sure where to go with it
since
this code works on our boards.

As for your problems with networking; what platform are you trying to use?
Can you provide details as to the problems you are experiencing?

Notice that the Cirrus Logic EDB7209 board requires a hardware modification
for the networking to function.  See the README for details.




^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: [ECOS] Threading on EDB7211
@ 2000-06-16  6:39 Rene.Affourtit
  2000-06-16  7:03 ` Gary Thomas
  0 siblings, 1 reply; 17+ messages in thread
From: Rene.Affourtit @ 2000-06-16  6:39 UTC (permalink / raw)
  To: Alfredo Knecht; +Cc: ecos-discuss

Did anybody solve this?
I didn't notice this before, but in trying to get the networking code to
run I noticed it.

isr is  called sometimes. I tried to time it and got an interrupt about one
and a half minute apart. (weird eh)
I never had a problem with eos 1.2.9 (am currently using cvs version of  2.
may 2000 or couple of days before)
I have the old source tree still lying around so I'll do a diff and look
for changes in relevant code.
But it will have to wait till monday I guess

Rene



                                                                                                                                    
                    Alfredo Knecht                                                                                                  
                    <aknecht@cimsi.cim.ch>                To:     ecos-discuss@sourceware.cygnus.com                                
                    Sent by:                              cc:                                                                       
                    ecos-discuss-owner@sourceware.        Subject:     RE: [ECOS] Threading on EDB7211                              
                    cygnus.com                                                                                                      
                                                                                                                                    
                                                                                                                                    
                    06/12/00 09:54 PM                                                                                               
                                                                                                                                    
                                                                                                                                    



Hello Gary,
thank you for the suggestions, unfortunately the patch confirms that there
are only 2 clock interrupts happening before "single task mode" (see
below). Funny, the timer2 bit is on. Note, I can provoke a BATLOW interrupt
with the switch.
I have tried countless config variants starting from the most standard
ones, to no avail. I have used both the gdb_module and the cyg_mon for
7211. BTW the EVB is just out of the box... 8)
I am now too tired to continue the chase; perhaps somebody on this list
could send me a working target.ld for the EP7211 eval board silkscreened
EDB7111-2 REV B, with the corresponding .ecc file?

Thank you,
Alfredo

P.S.
>Caution: if things are really broken, this may generate
>a number of outputs - you might have to reset the board manually to stop
them.
>
Ah, just call me "the resetter" :-)

====================================================
(gdb) target remote com1
Remote debugging using com1
0xe0006880 in ?? ()

(gdb) load // the lcd_test.exe, that is
Loading section .rom_vectors, size 0x60 lma 0x8000
Loading section .text, size 0x85b0 lma 0x8060
Loading section .rodata, size 0x4ad lma 0x10610
Loading section .data, size 0x734 lma 0x10ac0
Start address 0x8060 , load size 37361
Transfer rate: 27171 bits/sec, 306 bytes/write.

(gdb) cont
Continuing.
Init device '/dev/ttydiag'
Init tty channel: 1119C
Init device '/dev/haldiag'
HAL/diag SERIAL init
Depth: 4, ctl: C014F2BF
IRQ - stat: C000200
LCD test 2 here!
IRQ - stat: A12E0200
firstX=2 firstY=2 lastX=35 lastY=8
lines: X0=16 Y0=16 x1=287 y1=71
firstX=2 firstY=2 lastX=35 lastY=8
firstX=2 firstY=2 lastX=35 lastY=8
================================================
(no more IRQs after this)

At 07:10 12.6.00 -0600, you wrote:
>It looks to me like interrupts are not working properly for you.
>
>Are you using the provided GDB stubs?
>How did you configure your eCos kernel?
>
>=========== code snippet ==============================================
>// Add the following line
>        diag_printf("IRQ - stat: %x\n", stat);
>// Added line
>=========== code snippet ==============================================
>

************************************************************************
Alfredo Knecht       Fax  ++41 91 610 8970          Tel ++41 91 610 8960
SUPSI-ICIMSI         aknecht@cimsi.cim.ch        http://www.cimsi.cim.ch

Istituto CIM della Svizzera italiana              CH-6928 Manno (Lugano)
************************************************************************




^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: [ECOS] Threading on EDB7211
@ 2000-06-12 12:51 Alfredo Knecht
  0 siblings, 0 replies; 17+ messages in thread
From: Alfredo Knecht @ 2000-06-12 12:51 UTC (permalink / raw)
  To: ecos-discuss

Hello Gary,
thank you for the suggestions, unfortunately the patch confirms that there
are only 2 clock interrupts happening before "single task mode" (see
below). Funny, the timer2 bit is on. Note, I can provoke a BATLOW interrupt
with the switch.
I have tried countless config variants starting from the most standard
ones, to no avail. I have used both the gdb_module and the cyg_mon for
7211. BTW the EVB is just out of the box... 8)
I am now too tired to continue the chase; perhaps somebody on this list
could send me a working target.ld for the EP7211 eval board silkscreened
EDB7111-2 REV B, with the corresponding .ecc file?

Thank you,
Alfredo

P.S.
>Caution: if things are really broken, this may generate
>a number of outputs - you might have to reset the board manually to stop
them.
>
Ah, just call me "the resetter" :-)
 
====================================================
(gdb) target remote com1
Remote debugging using com1
0xe0006880 in ?? ()

(gdb) load // the lcd_test.exe, that is
Loading section .rom_vectors, size 0x60 lma 0x8000
Loading section .text, size 0x85b0 lma 0x8060
Loading section .rodata, size 0x4ad lma 0x10610
Loading section .data, size 0x734 lma 0x10ac0
Start address 0x8060 , load size 37361
Transfer rate: 27171 bits/sec, 306 bytes/write.

(gdb) cont
Continuing.
Init device '/dev/ttydiag'
Init tty channel: 1119C
Init device '/dev/haldiag'
HAL/diag SERIAL init
Depth: 4, ctl: C014F2BF
IRQ - stat: C000200
LCD test 2 here!
IRQ - stat: A12E0200
firstX=2 firstY=2 lastX=35 lastY=8
lines: X0=16 Y0=16 x1=287 y1=71
firstX=2 firstY=2 lastX=35 lastY=8
firstX=2 firstY=2 lastX=35 lastY=8
================================================
(no more IRQs after this)

At 07:10 12.6.00 -0600, you wrote:
>It looks to me like interrupts are not working properly for you.
>
>Are you using the provided GDB stubs?
>How did you configure your eCos kernel?
>
>=========== code snippet ==============================================
>// Add the following line
>        diag_printf("IRQ - stat: %x\n", stat);
>// Added line
>=========== code snippet ==============================================
>

************************************************************************
Alfredo Knecht       Fax  ++41 91 610 8970          Tel ++41 91 610 8960
SUPSI-ICIMSI         aknecht@cimsi.cim.ch        http://www.cimsi.cim.ch

Istituto CIM della Svizzera italiana              CH-6928 Manno (Lugano)
************************************************************************

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [ECOS] Threading on EDB7211
@ 2000-06-10 19:55 Alfredo Knecht
  2000-06-11  4:38 ` Gary Thomas
  0 siblings, 1 reply; 17+ messages in thread
From: Alfredo Knecht @ 2000-06-10 19:55 UTC (permalink / raw)
  To: ecos-discuss

Dear All,

Thread switching is not working.
I am using an off-the-shelf configuration for ARM EDB7111-2, with the
GDB_module stub on the board.
Specifically, I tested with lcd_test.c, and kthread1.c.
Only the first thread (in cyg_thread_create() calling order) is ever executed.
A call to cyg_thread_delay() blocks, and cyg_thread_yield() does not cause
rescheduling.
Fidgeting with priorities does not help, either.
Generally, single-thread code works.
Must be that thread switching stays disabled in eCos, but since I am using
a "standard" configuration, I would like to have a second opinion before
embarking on a deep dive.

Thank you,
Alfredo

************************************************************************
Alfredo Knecht       Fax  ++41 91 610 8970          Tel ++41 91 610 8960
SUPSI-ICIMSI         aknecht@cimsi.cim.ch        http://www.cimsi.cim.ch

Istituto CIM della Svizzera italiana              CH-6928 Manno (Lugano)
************************************************************************

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2000-06-19 13:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-16  8:29 [ECOS] Threading on EDB7211 Alfredo Knecht
     [not found] ` <XFMail.000616095000.gthomas@redhat.com>
2000-06-16 12:29   ` Alfredo Knecht
2000-06-16 13:34     ` Gary Thomas
  -- strict thread matches above, loose matches on Subject: below --
2000-06-19  5:24 Rene.Affourtit
2000-06-19  4:42 Rene.Affourtit
2000-06-19  5:06 ` Gary Thomas
2000-06-19 11:55   ` Alfredo Knecht
2000-06-19 13:22     ` Gary Thomas
2000-06-19  0:04 Rene.Affourtit
2000-06-19  4:11 ` Gary Thomas
2000-06-16  6:39 Rene.Affourtit
2000-06-16  7:03 ` Gary Thomas
2000-06-12 12:51 Alfredo Knecht
2000-06-10 19:55 Alfredo Knecht
2000-06-11  4:38 ` Gary Thomas
2000-06-12  1:19   ` Alfredo Knecht
2000-06-12  6:10     ` Gary Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).