moktar_bouain | 12 Apr 2011 23:25
Picon
Favicon

I have a problem with the priority of ecos


Hello ,
I have a problem  with  the priority of ecos.
 I have the following configuration:

#include <cyg/kernel/kapi.h>

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
cyg_thread thread_s[2];		
char stack[2][4096]; 
cyg_handle_t simple_threadA, simple_threadB;
cyg_mutex_t cliblock;
void taska(cyg_addrword_t data)
{
printf("TASKA \n");
  }
void taskb(cyg_addrword_t data)
{
printf("TASKB \n");

}

void cyg_user_start(void)
{
  printf("Entering twothreads' cyg_user_start() function\n");

  cyg_mutex_init(&cliblock);

(Continue reading)

Gary Thomas | 12 Apr 2011 23:33
Favicon

Re: I have a problem with the priority of ecos

On 04/12/2011 03:25 PM, moktar_bouain wrote:
>
> Hello ,
> I have a problem  with  the priority of ecos.
>   I have the following configuration:
>
> #include<cyg/kernel/kapi.h>
>
> #include<stdio.h>
> #include<math.h>
> #include<stdlib.h>
> cyg_thread thread_s[2];		
> char stack[2][4096];
> cyg_handle_t simple_threadA, simple_threadB;
> cyg_mutex_t cliblock;
> void taska(cyg_addrword_t data)
> {
> printf("TASKA \n");
>    }
> void taskb(cyg_addrword_t data)
> {
> printf("TASKB \n");
>
> }
>
> void cyg_user_start(void)
> {
>    printf("Entering twothreads' cyg_user_start() function\n");
>
>    cyg_mutex_init(&cliblock);
(Continue reading)

moktar_bouain | 13 Apr 2011 01:02
Picon
Favicon

Re: I have a problem with the priority of ecos


Hi Thomas,
I use bitmap scheduling  with 31 level for priority(by default).
I tried with diag_printf() but the  same  thing.

--

-- 
View this message in context: http://old.nabble.com/I-have-a-problem--with--the-priority-of-ecos-tp31383032p31383526.html
Sent from the Sourceware - ecos-devel mailing list archive at Nabble.com.

Gary Thomas | 13 Apr 2011 02:02
Favicon

Re: I have a problem with the priority of ecos

On 04/12/2011 05:02 PM, moktar_bouain wrote:
>
> Hi Thomas,
> I use bitmap scheduling  with 31 level for priority(by default).
> I tried with diag_printf() but the  same  thing.

What else is configured in your system (what template did you build from)?
My guess is that there is another thread already at priority 10.

I still don't know why you think that the threads should yield to each
other after each printf().

Note: it's polite to quote at least part of the message you are replying
to so that it's easier to understand the context of your comments.

--

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

moktar_bouain | 13 Apr 2011 02:36
Picon
Favicon

Re: I have a problem with the priority of ecos


On 04/12/2011 05:02 PM, moktar_bouain wrote:
>
> Hi Thomas,
> I use bitmap scheduling  with 31 level for priority(by default).
> I tried with diag_printf() but the  same  thing.

>What else is configured in your system (what template did you build from)?
>My guess is that there is another thread already at priority 10.

>I still don't know why you think that the threads should yield to each
>other after each printf().

I used eCos for Leon3 (architecture SPARC) with  the  simulator Tsim.
I created  this simple program that uses 2 threads.
The problem if there a difference of 10 between two levels of priority, the
program it works(5 and  15 or 10 and 20). But if less than 10 it does not
work

--

-- 
View this message in context: http://old.nabble.com/I-have-a-problem--with--the-priority-of-ecos-tp31383032p31383910.html
Sent from the Sourceware - ecos-devel mailing list archive at Nabble.com.

moktar_bouain | 14 Apr 2011 00:56
Picon
Favicon

thread with float


Hello,

I created an application with eCos.
When i use the float number,the thread can not execute(example float a ;).
I used  the  following  library:
#include <cyg/kernel/kapi.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>

Any help?

--

-- 
View this message in context: http://old.nabble.com/thread-with-float-tp31392619p31392619.html
Sent from the Sourceware - ecos-devel mailing list archive at Nabble.com.

mlazcoz | 14 Apr 2011 12:59
Favicon

RE: Re: STM32F107 on STM3210C-EVAL


Hi Qber,

I'm porting eCos to an STM3210C-eval fake board. I have started with system
clocks until I've realized that all the job is already done by you! If you
dont mind, could you send me a patch? 
Thanks a lot,

mlazcoz

qber_ wrote:
> 
> Hi
> 
> W dniu 2011-03-26 12:07:30 użytkownik Ilija Kocho <ilijak <at> siva.com.mk>
> napisał:
>> On 23.03.2011 11:50, John Dallaway wrote:
>> > Hi Gian Maria
>> >
>> > Gian Maria wrote:
>> >
>> >> I'm porting eCos to STM3210C and I find a logical error on the
>> >> implementation of CYGPKG_HAL_CORTEXM_STM32.
>> >> CYGPKG_HAL_CORTEXM_STM32 must be the base of all STM32 uP and so is
>> not
>> >> correct for me to use
>> >>
>> >>     cdl_option CYGHWR_HAL_CORTEXM_STM32 {
>> >>         display          "STM32 variant in use"
>> >>         flavor           data
(Continue reading)

Jürgen Lambrecht | 20 Apr 2011 10:40
Favicon

Re: I have a problem with the priority of ecos

(this email failed to be delivered - because of html contents - I set 
sourceware.org as text domain now (instead of sources.redhat.com) - (i 
must say, i prefer html for tables ;-))

On 04/13/2011 02:36 AM, moktar_bouain wrote:
> On 04/12/2011 05:02 PM, moktar_bouain wrote:
>> Hi Thomas,
>> I use bitmap scheduling  with 31 level for priority(by default).
>> I tried with diag_printf() but the  same  thing.
better use cyg_thread_delay(1). (not with 0 delay, this does nothing; 
also cyg_thread_yield only switches between 2 threads with the same 
priority)
>> What else is configured in your system (what template did you build from)?
>> My guess is that there is another thread already at priority 10.
Indeed. Here my list of default eCos thread priorities:

Priorities go from 0 to CYGNUM_KERNEL_SCHED_PRIORITIES-1. By default, 
CYGNUM_KERNEL_SCHED_PRIORITIES=32.
So by default priorities go from 0 to 31.
priority name                       default stack name               
        default size
CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_
   INVERSION_PROTOCOL_DEFAULT_PRIORITY   0
_POSIX_THREAD_PRIORITY_SCHEDULING       1 _POSIX_THREAD_ATTR_STACKSIZE 
     1 posix unit
CYGPKG_NET_FAST_THREAD_PRIORITY         6
CYGPKG_NET_THREAD_PRIORITY              7
CYGPKG_NET_DHCP_THREAD_PRIORITY         8
CYGINT_NET_IPV6_ROUTING_THREAD_PRIORITY 8
CYGNUM_LIBC_MAIN_THREAD_PRIORITY       10 
(Continue reading)

kiron | 22 Apr 2011 04:51
Picon

[ECOS] Miss calling ASR in sched.cxx

Hi All,

I' am new to this mail list. If I have something wrong, correct me.

I debug my application on MPC8313 platform. It has some pthreads. one
of them use the posix timer
(packages/compat/posix/current/src/time.cxx) to drive a status
machine.
When the pthread running a few minuters, the timer was disarmed.

I tracked code path, found that code clips of
Cyg_Scheduler::unlock_inner in
packages/kernel/current/src/sched/sched.cxx :

-------------------------------------------------------------------------------------------------------------------------------------------
    do {

        CYG_PRECONDITION( new_lock==0 ? get_sched_lock() == 1 :
                          ((get_sched_lock() == new_lock) ||
(get_sched_lock() == new_lock+1)),
                          "sched_lock not at expected value" );

#ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS

        // Call any pending DSRs. Do this here to ensure that any
        // threads that get awakened are properly scheduled.

        if( new_lock == 0 && Cyg_Interrupt::DSRs_pending() )
            Cyg_Interrupt::call_pending_DSRs();
#endif
(Continue reading)

Guilherme | 29 Apr 2011 01:30
Picon

Missing includes in arpa/inet.h

Hi!

I'm working on ecos and realized that arpa/inet.h does not include
header files that define the data structures used. eg: struct in_addr.

I was wondering if this was by-design or wether it is just oversight.

I'd like to fix these since i need a proper include chain for my 
current toolchain.

Other files where this is the case:

sys/endian.h
arpa/nameser.h
bootp.h

Best Regards,
Guilherme


Gmane