Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems Compiling project with Feb 2011 IDE - usrcode.c
#1
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.

Code:
Please wait while uploading Libraries from Power Pmac.
Libraries Uploaded successfully
Please 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.h
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/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.h
H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.h(1,0): Warning : in file included from  usrcode.h
H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.c
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/signal.h(2,0): Warning :  #warning "You should include <signal.h>. 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.h
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/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.h
H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.h(1,0): Warning : in file included from  usrcode.h
H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.c
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/resource.h(2,0): Warning :  #warning "You should include <sys/resource.h>. 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.h
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/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.h
H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.h(1,0): Warning : in file included from  usrcode.h
H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.c
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/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.h
H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.c
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/module.h(41,0): Error :  field 'attr' has incomplete type
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/module.h(49,0): Error :  field 'kobj' has incomplete type
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/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.h
H:\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.h
H:\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.h
H:\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.h
H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.h(2,0): Warning : in file included from  usrcode.h
H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.c
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/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.h
H:\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.h
H:\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.h
H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.h(2,0): Warning : in file included from  usrcode.h
H:\Shared\Machines\Probe Products\XYOiler2 (101)\XYOilerCode\XYOilerCode\C Language\Realtime Routines\usrcode.c(20,0): Warning : in file included from  usrcode.c
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/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

Code:
//---------------------------------------------------------------------------
//  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 memory
extern volatile unsigned *piom;  // Pointer to I/O memory
extern void              *pushm; // Pointer to user memory

void user_phase(struct MotorData *Mptr)
{
}

double user_pid_ctrl(struct MotorData *Mptr)
{
  return 0;
}


Code:
#include <linux/module.h>
#include <RtGpShm.h>    // Global Rt/Gp Externals and structures
#include <rtpmacapi.h>

double user_pid_ctrl(struct MotorData *Mptr);
EXPORT_SYMBOL(user_pid_ctrl);

void user_phase(struct MotorData *Mptr);
EXPORT_SYMBOL(user_phase);

Any ideas?
Reply
#2
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.
Reply
#3
Am I right, that it is necessary to make a power off/on to reset the c written rti code? Also the C-Variables.

I have got a feeling that the "$$$***" resets only the the Power PMAC Script Language written code.
Reply
#4
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)