Message-Id: <200710020904.l9294G6p027811@domain.hid> From: "Patrick" Date: Tue, 2 Oct 2007 11:04:19 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_002A_01C804E3.FB53A770" In-Reply-To: <6EB3AFE7F3632E4BA457E506E6DAF4F61451A2@domain.hid> Subject: [Xenomai-help] rt_task crash kernel List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org This is a multi-part message in MIME format. ------=_NextPart_000_002A_01C804E3.FB53A770 Content-Type: multipart/alternative; boundary="----=_NextPart_001_002B_01C804E3.FB53A770" ------=_NextPart_001_002B_01C804E3.FB53A770 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I'm using Xenomai 2.3.4 with 2.6.20 kernel on an ARM PXA270 board. The installation was executed successfully. Now I'm trying to insert a small test module (source code is attached) but the kernel crashes on rt_task_start(). I have tried the same module on another x86 machine and there is no problem. I have tried with or without rt_task_set_periodic in aperiodic and periodic timer mode but the result is the same. Do you have an idea? Regards This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. ------=_NextPart_001_002B_01C804E3.FB53A770 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable RE: [Xenomai-core] crashing 2.6.22

Hi,

 =

I’m using = Xenomai 2.3.4 with 2.6.20 kernel on an ARM PXA270 = board.

The installation = was executed successfully.

 =

Now I’m = trying to insert a small test module (source code is attached) but the kernel = crashes on rt_task_start().=

I have tried the = same module on another x86 machine and there is no problem. =

I have tried = with or without rt_task_set_periodic in aperiodic and periodic timer mode but the result is the = same.

 =

Do you have an = idea?

 =

Regards

 =

This message = contains information that may be privileged or confidential and is the = property of the Capgemini Group. It is intended only for the person to = whom it is addressed. If you are not the intended recipient, you are = not authorized to read, print, retain, copy, disseminate, distribute, = or use this message or any part thereof. If you receive this message in = error, please notify the sender immediately and delete all copies of = this message.

------=_NextPart_001_002B_01C804E3.FB53A770-- ------=_NextPart_000_002A_01C804E3.FB53A770 Content-Type: text/plain; name="myModule_m.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="myModule_m.c" /******************************************************************* * isrtimer_m.c=20 *******************************************************************/ #include #include #include #define STACK_SIZE 8192 /* Taille de la pile par d=E9faut = */ #define MS 1000000 /* 1 ms exprim=E9 en ns */ #define TIMER_PERIODIC 1 /* 1: timer p=E9riodique, 0: = timer ap=E9riodique */ RT_TASK myTask; RT_ALARM myAlarm; int err; /* stockage du code d'erreur */ /* cleanup_module() */ void __exit cleanup_module (void) { printk("#irqtimer: cleanup\n"); rt_task_delete(&myTask); printk("Bye bye!\n"); } /* T=E2che p=E9riodique */ void periodic(void *cookie) { while(1) { printk("debut 20ms\n"); rt_timer_spin(20 * MS); printk("fin 20ms\n"); rt_task_wait_period(NULL); } } /* init_module() */ int __init init_module (void) { printk("#module de test: starting...\n"); =20 /* Timer initialization */ if (TIMER_PERIODIC) err =3D rt_timer_set_mode(MS); /* periodic mode, one tick will be = equal to 1 ms */=20 else err =3D rt_timer_set_mode(TM_ONESHOT); if (err !=3D 0) { printk("Error timer: %d\n", err); return -1; } /*Cr=E9ation de la tache*/ rt_task_create(&myTask, "taskCharge", STACK_SIZE, 10, 0); //rt_task_set_periodic(&myTask,TM_NOW,50*(TIMER_PERIODIC?1:MS)); rt_task_start(&myTask, periodic, NULL); return 0; } MODULE_LICENSE("GPL"); ------=_NextPart_000_002A_01C804E3.FB53A770--