[etherlab-users] rtdm compile error

Ravi Chemudugunta chemuduguntar at gmail.com
Wed May 4 07:22:32 CEST 2011


> For RTDM usage please try revision 2026:ab0b96ac18bb.
>
> The last merge in the repository did some incompatibilities.
>

Hi Andreas,

Thanks for the reply.

I could not somehow get it going with 2026, I probably should be
looking at why it didn't work.
But after a couple of reboots from kernel crashes, I thought I was
better off with the newer version.

Below is my effort so far.  I disabled application_callbacks because
it seems that with that on,
the system would freeze after the application had finished a given
cycle, but the system appears to
still be processing in the background, because the link light flashes.

With the changes below, the cycle works (and the system does not
freeze), and I get sensible time measurements
for e.g. time spent in ecrt_rtdm_master_recieve(),

however I do not seem to be able to exchange any domain data in both
directions (it is zero all the time).

I had a brief look at how the domain calls (queque, process) are being
shuttled between RTDM,
and it appears to be correct - afaics...


diff -r bdd6a7285460 rtdm/module.c
--- a/rtdm/module.c	Mon May 02 12:47:31 2011 +1200
+++ b/rtdm/module.c	Wed May 04 17:15:09 2011 +1200
@@ -166,6 +166,7 @@
 /**********************************************************/

 /*            DRIVER sendcallback                         */

 /**********************************************************/

+/*

 void send_callback(void *cb_data)

 {

     EC_RTDM_DRV_STRUCT * pdrvstruc;

@@ -174,13 +175,14 @@
     if (pdrvstruc->master)

         {

             my_mutex_acquire(&pdrvstruc->masterlock,TM_INFINITE);

-            ecrt_master_send_ext(pdrvstruc->master);

+            //ecrt_master_send_ext(pdrvstruc->master);

             my_mutex_release(&pdrvstruc->masterlock);

       }

 }

+*/



 /*****************************************************************************/

-

+ /*

 void receive_callback(void *cb_data)

 {

     EC_RTDM_DRV_STRUCT * pdrvstruc;

@@ -193,7 +195,7 @@
           my_mutex_release(&pdrvstruc->masterlock);

     }

 }

-

+*/







@@ -561,7 +563,7 @@

EC_RTDM_INFO(pdrvstruc->masterno,"Creating Master mutex
%s!\n",&pdrvstruc->mutexname[0]);


my_mutex_create(&pdrvstruc->masterlock,&pdrvstruc->mutexname[0]);

                                 //ecrt_release_master(mstr);

-
ecrt_master_callbacks(pdrvstruc->master, send_callback,
receive_callback, pdrvstruc);

+
//ecrt_master_callbacks(pdrvstruc->master, send_callback,
receive_callback, pdrvstruc);


EC_RTDM_INFO(pdrvstruc->masterno,"MSTR ATTACH done
domain=%u!\n",(unsigned int)pdrvstruc->domain);

                                 pdrvstruc->isattached=1;

                                 ret = 0;



More information about the Etherlab-users mailing list