public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Create a thread (uitron)
@ 2007-04-30 14:36 LONY David
  2007-04-30 14:47 ` Gary Thomas
  2007-05-02 13:15 ` LONY David
  0 siblings, 2 replies; 5+ messages in thread
From: LONY David @ 2007-04-30 14:36 UTC (permalink / raw)
  To: ecos-discuss

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

Thank you
Best regards.

David


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

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

end of thread, other threads:[~2007-05-02 13:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-30 14:36 [ECOS] Create a thread (uitron) LONY David
2007-04-30 14:47 ` Gary Thomas
2007-05-01 20:53   ` Daniel Morris
2007-05-02  9:16     ` David LONY
2007-05-02 13:15 ` LONY David

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).