Jump to content
OMRON Forums

Problems Compiling project with Feb 2011 IDE - usrcode.c


KEJR

Recommended Posts

I am having difficulties after installing the Feb 2011 IDE and 1.3.0.0 firmware.

 

I get a ton of warnings from the header files included from usrcode.h I'm not even using this feature, it just won't let me delete it from the project. the code is stock, I haven't modified it to the best of my knowledge.

 

 

Please wait while uploading Libraries from Power Pmac.Libraries Uploaded successfullyPlease wait while mapping Power PMAC variables.End of syncing the database.PMAC variables are mapped successfully.	Build Process For XYOilerMain.out has started.	Build Process For XYOilerMain.out has ended.	Build Process For usralgo.ko has started.	Build Process For usralgo.ko has ended.	Build Process For XYOilerMain.out has started.	Build Process For XYOilerMain.out has ended.	Build Process For librtiplcc.so has started.	Build Process For librtiplcc.so has ended.	Build Process For libplcc.so has started.	Build Process For libplcc.so has ended.	Build Process For usralgo.so has started.H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.h(16,0): Warning : in file included from  /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h(9,0): Warning : in file included from  /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.h(1,0): Warning : in file included from  usrcode.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.cH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/signal.h(2,0): Warning :  #warning "You should include . This time I will do it for you."H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.h(79,0): Warning : in file included from  /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h(9,0): Warning : in file included from  /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.h(1,0): Warning : in file included from  usrcode.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.cH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/resource.h(2,0): Warning :  #warning "You should include . This time I will do it for you."H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.h(10,0): Warning : in file included from  /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h(9,0): Warning : in file included from  /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.h(1,0): Warning : in file included from  usrcode.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.cH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/rbtree.h(128,0): Error :  expected ',' or '...' before 'new'H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.h(1,0): Warning : in file included from  usrcode.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.cH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h(41,0): Error :  field 'attr' has incomplete typeH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/module.h(49,0): Error :  field 'kobj' has incomplete typeH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/sched.h(32,0): Warning : in file included from  /usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/sched.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include/posix/sched.h(58,0): Warning : in file included from  /opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include/posix/sched.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include/posix/pthread.h(147,0): Warning : in file included from  /opt/eldk-4.2/debian_rootfs/usr/local/xenomai/include/posix/pthread.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/RtGpShm.h(21,0): Warning : in file included from  /opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/RtGpShm.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.h(2,0): Warning : in file included from  usrcode.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.cH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/bits/sched.h(62,0): Error :  redefinition of 'struct sched_param'H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/linux/sched.h(109,0): Error :  previous definition of 'struct sched_param'H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/ecrt.h(95,0): Warning : in file included from  /opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/ecrt.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/ethercat.h(2,0): Warning : in file included from  /opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/ethercat.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/RtGpShm.h(23,0): Warning : in file included from  /opt/eldk-4.2/debian_rootfs/opt/ppmac/rtpmac/RtGpShm.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.h(2,0): Warning : in file included from  usrcode.hH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.cH:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\/usr/local/bin/../lib/gcc/powerpc-405-linux-gnu/4.2.2/../../../../powerpc-405-linux-gnu/sys-include/stdlib.h(536,0): Error :  declaration does not declare anything	Build Process For usralgo.so has ended.Done building project "XYOilerCode.ppproj" -- FAILED.Build FAILED.

 

 

And here is my contents of usrcode.c/h

 

 

//---------------------------------------------------------------------------//  Project PowerPMAC Firmware//  Delta Tau Data Systems, Inc.//  Copyright  2007. All Rights Reserved.////  SUBSYSTEM:			User Servo Driver//  FILE:         		usrcode.c//  TEMPLATE AUTHOR:		Henry Bausley////  OVERVIEW//  ~~~~~~~~//  This file is where exportable user code can be placed.//  To make a function callable as a user servo do three steps////  1.)  Prototye the function user_func(void ,void );//  2.)  Export the function  EXPORT_SYMBOL(user_func);//  3.)  Make sure useralgo.ko has been loaded with projpp.ini////--------------------------------------------------------------------------------#include "usrcode.h"#include "../Include/pp_proj.h"extern struct SHM        *pshm;  // Pointer to shared memoryextern volatile unsigned *piom;  // Pointer to I/O memoryextern void              *pushm; // Pointer to user memoryvoid user_phase(struct MotorData *Mptr){}double user_pid_ctrl(struct MotorData *Mptr){ return 0;}

 

 

 

 

#include #include 	// Global Rt/Gp Externals and structures#include double user_pid_ctrl(struct MotorData *Mptr);EXPORT_SYMBOL(user_pid_ctrl);void user_phase(struct MotorData *Mptr);EXPORT_SYMBOL(user_phase);

 

 

Any ideas?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

In the new release there were new header information required for some new features. Just open a new project and copy the usercode.c and .h files then paste them into your existing project. Should be easy to do since you do not use the feature.

 

Also if you go to the property page you can set the properties of the usercode to not compile and this will speed up your build and also remove the problem.

Link to comment
Share on other sites

  • 2 weeks later...
No. For the RTICPLC all you need to do is disable it then re-enable it. This is done with the on-line command "enable rticplc" and "disable rticplc". Or you can use the DT Task Manager (under IDE Tools menu) to view the plc list under the PLC tab, click on the CPLC rticplc item in the list and select the start button. Or you can set the structure "UserAlgo.RtiCplc=1 or 0" to enable and disable.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...