Jump to content
OMRON Forums

RtGpShm.h and ethercat.h error without changing the files


maartenvervelde

Recommended Posts

Hi,

 

Yesterday when I was working with the Power Brick LV, suddenly my own servo loops wouldn't compile anymore. The errors are in files which I did nothing to, namely: RtGpShm.h and ethercat.h. I don't even use EtherCAT.

 

I tried to make new servo loop model in Simulink to see if the error was in my model. The model I have now is very simple, as you can see in the attachment.

 

The errors I get are:

 

------ Build started: Project: AnalogSensor2(192.168.0.200:PowerPC,460EX), Configuration: Debug Any CPU ------
Please wait while uploading Libraries from Power Pmac.
Libraries Uploaded successfully
Please wait while Executing Project Script.
Please wait while mapping Power PMAC variables.
End of syncing the database.
PMAC variables are mapped successfully.
	Build Process For capp1.out has started.
	Build Process For capp1.out has ended.

	Build Process For libplcc1.so has started.
	Build Process For libplcc1.so has ended.

	Build Process For usralgo.ko has started.
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(42,0): Warning : in file included from  /usr/local/dtlibs/rtpmac/RtGpShm.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\test.h(27,0): Warning : in file included from  /cygdrive/c/Projects/PMAC_P~1/ANALOG~2/ANALOG~1/CLANGU~1/REALTI~1/test.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\test.c(25,0): Warning : in file included from  /cygdrive/c/Projects/PMAC_P~1/ANALOG~2/ANALOG~1/CLANGU~1/REALTI~1/test.c
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\ethercat.h(111,0): Error :  expected identifier or '(' before numeric constant
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\ethercat.h(112,0): Error :  expected ';' before 'ec_slave_config_t'
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\test.h(27,0): Warning : in file included from  /cygdrive/c/Projects/PMAC_P~1/ANALOG~2/ANALOG~1/CLANGU~1/REALTI~1/test.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\test.c(25,0): Warning : in file included from  /cygdrive/c/Projects/PMAC_P~1/ANALOG~2/ANALOG~1/CLANGU~1/REALTI~1/test.c
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2201,0): Error :  expected identifier or '(' before numeric constant
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2202,0): Error :  expected ';' before 'short'
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2635,0): Error :  expected identifier or '(' before numeric constant
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2636,0): Error :  expected ';' before 'enum'
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2653,0): Error :  expected identifier or '(' before numeric constant
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2654,0): Error :  expected ';' before 'int'
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2833,0): Error :  expected identifier or '(' before numeric constant
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2834,0): Error :  expected ';' before 'unsigned'
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\powerpc-405-linux-gnu\include\string.h(26,0): Warning : in file included from  /usr/local/powerpc-405-linux-gnu/include/string.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\test.h(34,0): Warning : in file included from  /cygdrive/c/Projects/PMAC_P~1/ANALOG~2/ANALOG~1/CLANGU~1/REALTI~1/test.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\test.c(25,0): Warning : in file included from  /cygdrive/c/Projects/PMAC_P~1/ANALOG~2/ANALOG~1/CLANGU~1/REALTI~1/test.c
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\powerpc-405-linux-gnu\include\features.h(265,0): Warning :  "_FORTIFY_SOURCE" is not defined
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\powerpc-405-linux-gnu\include\string.h(417,0): Warning : in file included from  /usr/local/powerpc-405-linux-gnu/include/string.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\test.h(34,0): Warning : in file included from  /cygdrive/c/Projects/PMAC_P~1/ANALOG~2/ANALOG~1/CLANGU~1/REALTI~1/test.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\test.c(25,0): Warning : in file included from  /cygdrive/c/Projects/PMAC_P~1/ANALOG~2/ANALOG~1/CLANGU~1/REALTI~1/test.c
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\powerpc-405-linux-gnu\include\bits\string2.h(50,0): Warning :  "_STRING_ARCH_unaligned" is not defined
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\test.h(34,0): Warning : in file included from  /cygdrive/c/Projects/PMAC_P~1/ANALOG~2/ANALOG~1/CLANGU~1/REALTI~1/test.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\test.c(25,0): Warning : in file included from  /cygdrive/c/Projects/PMAC_P~1/ANALOG~2/ANALOG~1/CLANGU~1/REALTI~1/test.c
C:\Projects\PMAC_P~1\ANALOG~2\ANALOG~1\CLANGU~1\REALTI~1\\\usr\local\powerpc-405-linux-gnu\include\string.h(420,0): Warning :  "__USE_FORTIFY_LEVEL" is not defined
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\test.c(137,0): Error :  too few arguments to function 'test_step'
	Build Process For usralgo.ko has ended.

	Build Process For usralgo.so has started.
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\rtpmac\RtGpShm.h(42,0): Warning : in file included from  /usr/local/dtlibs/rtpmac/RtGpShm.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\libppmac\gplib.h(31,0): Warning : in file included from  /usr/local/dtlibs/libppmac/gplib.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\test.h(24,0): Warning : in file included from  test.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\test.c(25,0): Warning : in file included from  test.c
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\rtpmac\ethercat.h(111,0): Error :  expected identifier or '(' before numeric constant
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\rtpmac\ethercat.h(112,0): Error :  expected ';' before 'ec_slave_config_t'
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\libppmac\gplib.h(31,0): Warning : in file included from  /usr/local/dtlibs/libppmac/gplib.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\test.h(24,0): Warning : in file included from  test.h
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\test.c(25,0): Warning : in file included from  test.c
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2201,0): Error :  expected identifier or '(' before numeric constant
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2202,0): Error :  expected ';' before 'short'
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2635,0): Error :  expected identifier or '(' before numeric constant
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2636,0): Error :  expected ';' before 'enum'
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2653,0): Error :  expected identifier or '(' before numeric constant
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2654,0): Error :  expected ';' before 'int'
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2833,0): Error :  expected identifier or '(' before numeric constant
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\\usr\local\dtlibs\rtpmac\RtGpShm.h(2834,0): Error :  expected ';' before 'unsigned'
C:\Projects\Pmac_Projects\AnalogSensor2\AnalogSensor2\C Language\Realtime Routines\\test.c(137,0): Error :  too few arguments to function 'test_step'
	Build Process For usralgo.so has ended.

Done building project "AnalogSensor2.ppproj" -- FAILED.

Build FAILED.
Project Building and Mapping total time = 11.544 sec
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

 

I have an old project in which I use the same include and that project builds correctly so the file is not corrupted. What could be the problem?

Screenshot_1.png.f337df0c1c7183103e827958fefba897.png

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

It doesn't work if I replace #include with #include

 

The include part of the file is this:

 

//===========================FOR Power PMAC======================================
#ifdef __KERNEL__
#include 
#else
#define EXPORT_SYMBOL(x)                                         // x
#define KERN_ALERT
#define printk                         printf
#include 
#endif

#include                    // Global Rt/Gp Externals and structures
#include 
#include "../Include/pp_proj.h"

//================================================================================
#ifndef RTW_HEADER_Controlloopdt_Analog_h_
#define RTW_HEADER_Controlloopdt_Analog_h_
#include 
#ifndef Controlloopdt_Analog_COMMON_INCLUDES_
# define Controlloopdt_Analog_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif                                 /* Controlloopdt_Analog_COMMON_INCLUDES_ */

#include "Controlloopdt_Analog_types.h"

 

If I build it like that with the #include there, I get 33 errors and 18 warnings.

 

When I replace #include with #include , I get 136 errors and 564 warnings.

 

A lot of the errors are in types.h and RtGpShm.h

 

The files that create only a couple errors are:

- ethercat.h

- in.h

- int-ll64.h

- ipc.h

- pthread.h

- pthreadtypes.h

- stat.h

- stdint.h

Link to comment
Share on other sites

I have figured out what the error was. In the global defenition file I made a global variable named state. This wasn't allowed apparently, so it gave those errors.

 

I tried the different models of the servo loop in the same project so the global variable remained there. That is also why the old projects worked, but the new project I tried it on didn't, because I copied the list directly.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...