This is the mail archive of the ecos-discuss@sourceware.org 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: Create a thread (uitron)


On Mon, Apr 30, 2007 at 08:47:09AM -0600, Gary Thomas wrote:
> LONY David wrote:
> >Hi all,
> >
> >I'm trying to create a thread in eCos (uitron interface) but it does not 
> >work. I'm new to eCos and uITRON, so I take a exemple and I'm try to 
> >customize it...
> >Here it my program :
> >
> >#include <cyg/compat/uitron/uit_func.h>
> >#include <stdio.h>
> >
> >void task2(unsigned int a)
> >{
> >
> > printf("In function test()\n");
> >
> >}
> >
> >
> >int main()
> >{
> >
> > ID tid = 2;
> > T_CTSK thread_attr;
> > int retval;
> >
> > printf("In main\n");
> >
> > thread_attr.stksz = CYGNUM_UITRON_STACK_SIZE;
> > thread_attr.task = (FP)&task2;
> >
> > retval = cre_tsk(tid, &thread_attr);
> >
> > if(retval != E_OK)
> >   {
> >     printf("Error %d !!!\n",retval);
> >   }
> > else
> >   {
> >     printf(" Good! \n");
> >   }
> >
> > return 0;
> >
> >}
> >
> >
> >When I'm trying to debug it, I always obtain an error. Someone can help me?
> >PS : Number of task is set to 4 and the number of task which start is 
> >set to 1.
> >I also modify the option Static Initializers to CYG_UIT_TASK_NOEXS for 
> >task 2,3 and 4
> 
> Do you have some compelling reason to use uItron?  There are few,
> if any, eCos maintainers that know much about this anymore.

Awe, c'mon Gary, don't be so pessimistic ;-) eCos maintainers working at
eCosCentric have good knowledge of uITRON, we offer commercial support
to customers for existing uITRON profiles, as well as consultancy &
development around some of the newer profiles that have been published
since the original uITRON port. 

> 
> I'd suggest that you look at a more modern (and certainly
> more supported) API such as POSIX.

Well the great thing about standards is there are so many to choose
from...  There certainly doesn't seem to be as much interest in uITRON
these days, but perhaps that's just because ecos-discuss's window to the
web is focused in English, rather than Japanese?? It would be
interesting to hear of other users (& applications) that have recent
experience of using uITRON with eCos from the community.

 Daniel

%<----------------------------------------------------------------------
  Daniel Morris - Sales & Marketing Director
  eCosCentric - The eCos and RedBoot experts
  Tel: +44 1223 245 571 - info@eCosCentric.com
  DDI: +44 1269 591 171 - danielm@eCosCentric.com



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


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