public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* 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 11:55   ` Alfredo Knecht
@ 2000-06-19 13:22     ` Gary Thomas
  0 siblings, 0 replies; 17+ messages in thread
From: Gary Thomas @ 2000-06-19 13:22 UTC (permalink / raw)
  To: Alfredo Knecht; +Cc: ecos-discuss

I built a EDB7211 install/build tree & put the whole thing at:
  ftp://ftp.chez-thomas.org/pub/eCos/edb7211/

Pick and choose.  Let me know what happens.

Also, if you had a chance, perhaps you could try an older binutils snapshot.
The one that I know works is from 000321 (I also put this file under /eCos)

Note: ftp.chez-thomas.org is a new address.  If this doesn't work, try
hermes.chez-thomas.org.

On 19-Jun-00 Alfredo Knecht wrote:
> Hi All,
> I sure am glad for Rene, though I think he was asking for trouble...
> As for my problems, they are still here even after installing binutils
> 2.10rc3.
> Innocent as a lamb, still investigating on this strange behaviour. :)
> I will let you know as soon as I find something;
> In the meantime, would anybody bother to send me known working objects
> under the /install/lib/ for an EDB-7111-2, no matter which configuration?
> just to narrow the quest a little.
> Thank you,
> Alfredo
> 
> At 06:06 19.6.00 -0600, you wrote:
>>
>>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 :-) ]
>>
>>
> ************************************************************************
> 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:06 ` Gary Thomas
@ 2000-06-19 11:55   ` Alfredo Knecht
  2000-06-19 13:22     ` Gary Thomas
  0 siblings, 1 reply; 17+ messages in thread
From: Alfredo Knecht @ 2000-06-19 11:55 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

Hi All,
I sure am glad for Rene, though I think he was asking for trouble...
As for my problems, they are still here even after installing binutils
2.10rc3.
Innocent as a lamb, still investigating on this strange behaviour. :)
I will let you know as soon as I find something;
In the meantime, would anybody bother to send me known working objects
under the /install/lib/ for an EDB-7111-2, no matter which configuration?
just to narrow the quest a little.
Thank you,
Alfredo

At 06:06 19.6.00 -0600, you wrote:
>
>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 :-) ]
>
>
************************************************************************
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  4:42 Rene.Affourtit
@ 2000-06-19  5:06 ` Gary Thomas
  2000-06-19 11:55   ` Alfredo Knecht
  0 siblings, 1 reply; 17+ messages in thread
From: Gary Thomas @ 2000-06-19  5:06 UTC (permalink / raw)
  To: Rene.Affourtit; +Cc: ecos-discuss

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, 0 replies; 17+ messages in thread
From: Gary Thomas @ 2000-06-19  4:11 UTC (permalink / raw)
  To: Rene.Affourtit; +Cc: ecos-discuss, aknecht

The very first thing to look at is the tools you are using to build eCos.
The sourceware 'binutils' package _was_ broken.  Any snapshots from late
May through early June will not build a running eCos on ARM platforms.

On 19-Jun-00 Rene.Affourtit@pemstar.nl wrote:
> 
> 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-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 12:29   ` Alfredo Knecht
@ 2000-06-16 13:34     ` Gary Thomas
  0 siblings, 0 replies; 17+ messages in thread
From: Gary Thomas @ 2000-06-16 13:34 UTC (permalink / raw)
  To: Alfredo Knecht; +Cc: ecos-discuss

On 16-Jun-00 Alfredo Knecht wrote:
> Thanks Gary, for the one step forward.
> - your binary bin-sem2 works.
> could i narrow it further, using known good libraries (libextras.a,
> libtarget.a and others that get linked in)?
> the configurer complains when loading your .ecc file (version errors), so i
> cannot duplicate your exact configuration.
> Anyway we now know that it must be a build problem.
> 
> About my installation:
> on winnt 4.0, I am using:
> cygwin 1.1.2
> binutils-000531
  ^^^^^^^^^^^^^^^

This is known to have problems on the ARM.  Get a newer (probably the latest)
binutils snapshot.

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

* RE: [ECOS] Threading on EDB7211
       [not found] ` <XFMail.000616095000.gthomas@redhat.com>
@ 2000-06-16 12:29   ` Alfredo Knecht
  2000-06-16 13:34     ` Gary Thomas
  0 siblings, 1 reply; 17+ messages in thread
From: Alfredo Knecht @ 2000-06-16 12:29 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

Thanks Gary, for the one step forward.
- your binary bin-sem2 works.
could i narrow it further, using known good libraries (libextras.a,
libtarget.a and others that get linked in)?
the configurer complains when loading your .ecc file (version errors), so i
cannot duplicate your exact configuration.
Anyway we now know that it must be a build problem.

About my installation:
on winnt 4.0, I am using:
cygwin 1.1.2
binutils-000531
gcc-2.95.2
ecos 1.3.1
ecos-gcc-2952.pat
insight-5.0
all downloaded on 31 may 00, installed ok.

Thanks,
Alfredo


At 09:50 16.6.00 -0600, you wrote:
>
>On 16-Jun-00 Alfredo Knecht wrote:
>>>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.
>
>Try the files from:
>  ftp://hermes.chez-thomas.org/pub/eCos/edb7211
>
>I put a working test - the dining philosopher's demo - there.  This should
>run.  If it does not, then you have a hardware problem.  If it does run, then
>something is wrong with your build environment.
>
>Let me know what happens.
>
>
************************************************************************
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-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-16  6:39 Rene.Affourtit
@ 2000-06-16  7:03 ` Gary Thomas
  0 siblings, 0 replies; 17+ messages in thread
From: Gary Thomas @ 2000-06-16  7:03 UTC (permalink / raw)
  To: Rene.Affourtit; +Cc: ecos-discuss, Alfredo Knecht

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

* RE: [ECOS] Threading on EDB7211
  2000-06-12  1:19   ` Alfredo Knecht
@ 2000-06-12  6:10     ` Gary Thomas
  0 siblings, 0 replies; 17+ messages in thread
From: Gary Thomas @ 2000-06-12  6:10 UTC (permalink / raw)
  To: Alfredo Knecht; +Cc: ecos-discuss

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?

You could try and get a little more information.  In the file
  .../ecc/hal/arm/edb72xx/<VERSION>/src/edb72xx_misc.c
add some debug info as follows:

=========== code snippet ==============================================
int hal_IRQ_handler(void)
{
    struct regmap *map = hal_interrupt_status_regmap;
    cyg_uint32 stat;
    int vector;
    while (map->first_int) {
        stat = *(volatile cyg_uint32 *)map->stat_reg & *(volatile cyg_uint32 *)map->mask_reg;
// Add the following line
        diag_printf("IRQ - stat: %x\n", stat);
// Added line
        for (vector = map->first_int;  vector <= map->last_int;  vector++) {
            if (stat & hal_interrupt_bitmap[vector]) return vector;
        }
        map++;  // Next interrupt status register
    }
    hal_spurious_ints++;
    return CYGNUM_HAL_INTERRUPT_unused; // This shouldn't happen!
}
=========== code snippet ==============================================

This will tell you if a) you're getting any interrupts at all, and b) what
interrupts are present.  Caution: if things are really broken, this may generate
a number of outputs - you might have to reset the board manually to stop them.

On 12-Jun-00 Alfredo Knecht wrote:
> Dear list,
> 
> At 05:38 11.6.00 -0600, you wrote:
>>
>>On 11-Jun-00 Alfredo Knecht wrote:
>>> 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.
>>> 
>>
>>Thread switching should work on this and all platforms.
>>
>>Have you tried any of the standard tests and/or examples?  A good one to
>>try is the 'bin_sem2' test in the kernel.  This is an adaptation of the
>>classic dining philosophers and definitely relies on thread switching to
>>work properly.  On Linux, one would build/run this test like this:
>>
>>  # ecosconfig new edb7211
>>  # ecosconfig tree
>>  # make tests
>>  # arm-elf-gdb install/tests/kernel/VERSION/tests/bin_sem2
>>     ... etc.
>>
>>
> 
> I am puzzled, and probably doing something wrong. bin_sem2 hangs (see
> below), as do the simpler standard tests like kthread1.
> After deselecting RTC support, I compiled intr.c (which attaches its own
> rtc handler), but this one hangs, too.
> In lcd_test (a single-thread test) the cyg_thread_delay() call never
> returns; commenting out the calls to cyg_thread_delay() helps, but this
> amounts to not using ecos threading services at all.
> The counter/timer 2 is working, its interrupt unmasked. Counting all
> interrupts (in hal_IRQ_handler()) consistently brings a grand total of 2
> before the board freezes.
> Thanks for your help.
> Alfredo
> ----------------------
> Working directory /j/p1_install/tests/kernel/v1_3_1/tests.
> 
> (gdb) target remote com1
> Remote debugging using com1
> 0xe0001750 in ?? ()
> 
> (gdb) load bin_sem2.exe
> Loading section .rom_vectors, size 0x60 lma 0x8000
> Loading section .text, size 0x96a8 lma 0x8060
> Loading section .rodata, size 0x1bc3 lma 0x11708
> Loading section .data, size 0x418 lma 0x132cc
> Start address 0x8060 , load size 46819
> Transfer rate: 26753 bits/sec, 302 bytes/write.
> 
> (gdb) cont
> Continuing.
> 
> --------------------------
> 
> ************************************************************************
> 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-11  4:38 ` Gary Thomas
@ 2000-06-12  1:19   ` Alfredo Knecht
  2000-06-12  6:10     ` Gary Thomas
  0 siblings, 1 reply; 17+ messages in thread
From: Alfredo Knecht @ 2000-06-12  1:19 UTC (permalink / raw)
  To: ecos-discuss

Dear list,

At 05:38 11.6.00 -0600, you wrote:
>
>On 11-Jun-00 Alfredo Knecht wrote:
>> 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.
>> 
>
>Thread switching should work on this and all platforms.
>
>Have you tried any of the standard tests and/or examples?  A good one to
>try is the 'bin_sem2' test in the kernel.  This is an adaptation of the
>classic dining philosophers and definitely relies on thread switching to
>work properly.  On Linux, one would build/run this test like this:
>
>  # ecosconfig new edb7211
>  # ecosconfig tree
>  # make tests
>  # arm-elf-gdb install/tests/kernel/VERSION/tests/bin_sem2
>     ... etc.
>
>

I am puzzled, and probably doing something wrong. bin_sem2 hangs (see
below), as do the simpler standard tests like kthread1.
After deselecting RTC support, I compiled intr.c (which attaches its own
rtc handler), but this one hangs, too.
In lcd_test (a single-thread test) the cyg_thread_delay() call never
returns; commenting out the calls to cyg_thread_delay() helps, but this
amounts to not using ecos threading services at all.
The counter/timer 2 is working, its interrupt unmasked. Counting all
interrupts (in hal_IRQ_handler()) consistently brings a grand total of 2
before the board freezes.
Thanks for your help.
Alfredo
----------------------
Working directory /j/p1_install/tests/kernel/v1_3_1/tests.

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

(gdb) load bin_sem2.exe
Loading section .rom_vectors, size 0x60 lma 0x8000
Loading section .text, size 0x96a8 lma 0x8060
Loading section .rodata, size 0x1bc3 lma 0x11708
Loading section .data, size 0x418 lma 0x132cc
Start address 0x8060 , load size 46819
Transfer rate: 26753 bits/sec, 302 bytes/write.

(gdb) cont
Continuing.

--------------------------

************************************************************************
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-10 19:55 Alfredo Knecht
@ 2000-06-11  4:38 ` Gary Thomas
  2000-06-12  1:19   ` Alfredo Knecht
  0 siblings, 1 reply; 17+ messages in thread
From: Gary Thomas @ 2000-06-11  4:38 UTC (permalink / raw)
  To: Alfredo Knecht; +Cc: ecos-discuss

On 11-Jun-00 Alfredo Knecht wrote:
> 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.
> 

Thread switching should work on this and all platforms.

Have you tried any of the standard tests and/or examples?  A good one to
try is the 'bin_sem2' test in the kernel.  This is an adaptation of the
classic dining philosophers and definitely relies on thread switching to
work properly.  On Linux, one would build/run this test like this:

  # ecosconfig new edb7211
  # ecosconfig tree
  # make tests
  # arm-elf-gdb install/tests/kernel/VERSION/tests/bin_sem2
     ... etc.

^ 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-19  5:24 [ECOS] Threading on EDB7211 Rene.Affourtit
  -- strict thread matches above, loose matches on Subject: below --
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  8:29 Alfredo Knecht
     [not found] ` <XFMail.000616095000.gthomas@redhat.com>
2000-06-16 12:29   ` Alfredo Knecht
2000-06-16 13:34     ` 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).