[etherlab-users] EtherCAT stack for 2.6.24

Sergej Stepanov Sergej.Stepanov at ids.de
Tue Feb 19 15:17:01 CET 2008


Hallo Florian,

i got ethercat stack cross compiled under linux 2.6.24 for powerpc
in the attachment i send you the patch for master-dir.
It has to be platform independent.
 
But i have following notes:
1. Backward compatibility was done with KERNEL_VERSION(..) macro.
2. it was fixed many warnings with EC_WRITE_U16-/EC_WRITE_U32-macro.
3. i found somewhere in internet the equivalent,
   and i had no other idea for cpu_khz-variable
   that is why i did for powerpc following (for a while):
----------------------
Index: master/globals.h
===================================================================
--- master/globals.h	(Revision 28787)
+++ master/globals.h	(Revision 28982)
@@ -45,6 +45,8 @@
 
 #include "../globals.h"
 
+#include <asm/time.h>
+
 /******************************************************************************
  *  EtherCAT master
  *****************************************************************************/
@@ -204,5 +206,7 @@
 typedef struct ec_sdo ec_sdo_t; /**< \see ec_sdo */
 
 /*****************************************************************************/
+//extern unsigned long cpu_khz;
+#define cpu_khz (tb_ticks_per_sec/1000)
 
 #endif
-----------------------

i thought that timeouts issue has to be corrected in some other way.

Please, take a look trough and let me know what do you think about...
whether it could be applied for EtherCAT-stack?

Thank you
Best regards.

-- 
Dipl.-Ing. Sergej Stepanov 
Software-Entwicklung

IDS GmbH 
E-PA  (Entwicklung - Prozess Automatisierung)
Nobelstr. 18, 
D-76275 Ettlingen 
T. (0) 72 43/2 18-615 
F. (0) 72 43/2 18-100 
E. Sergej.Stepanov at ids.de

<http://www.ids.de>
Geschäftsführer: Norbert Wagner, Friedrich Abriß 
Sitz der Gesellschaft: Ettlingen 
Amtsgericht Mannheim HRB 362503 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: master.diff
Type: text/x-patch
Size: 23708 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20080219/5b15103a/attachment-0002.bin>


More information about the Etherlab-users mailing list