Hello Richard,

thanks for the quick reply. The output of `nm ecrt_support.o` showed a
potential reason: It is empty and the underlying file
rtw/blocks/EtherCAT/ecrt_support.c in the Matlab directory is also empty
(0 bytes).
It seems, as if the file should be used from
/usr/local/share/etherlab/src with 44kB, but Matlab takes the wrong
file. Matlab R2018b also has the empty file, but seems to not take it.
I installed Etherlab for both R2018b and R2019a in the same way, using
install.sh and setup_etherlab.m:
https://github.com/SchapplM/etherlab-examples/blob/master/SETUP_ETHERCAT.MD#entwpc
Perhaps setting up the directories for linking the Simulink project has
changed in R2019a, or I messed up the Matlab path without having noticed.
I re-tested on a different machine this time, though.

This duplicate 0B-file was already introduced in hg-commit 1146
(2018-02-08).
When I overwrite the 0B file with the full version in the Matlab dir, I
get similar errors. Instead of
>     new_2019a.o: In Funktion »new_2019a_step«:
>     new_2019a.c:(.text+0x15): Warnung: undefinierter Verweis auf
> »ecs_receive«
I get something like
>     ecrt_support.o: In Funktion »ecs_receive«:
>     ecrt_support.c:(.text+0xa0b): Warnung: undefinierter Verweis auf
> »ecrt_domain_process«
The output of  nm ecrt_support.o` now gives for R2018b and R2019a
>                  U calloc
>                  U clock_gettime
>                 [...]
>                  U ecrt_domain_data
>                 [...]
So the symbols are undefined ("U") also in the previous version R2018b.
Is it possible that the linker/compiler since R2019a is "stricter" and
now raises an error for the undefined references?

As for manually running the g++ command: Building fails with the same
error in R2019a and R2018b.
Therefore the path configuration only seems to work from within Matlab
(R2018b).
Up to now, the only manual adaptation to making the build process work
was symbolically linking the shared libraries in /usr/local/lib/ with
> $ ll /usr/local/lib/
> lrwxrwxrwx  1 root root    44 Apr  6 14:54 libethercat.so ->
> /usr/local/share/etherlab/lib/libethercat.so*
> lrwxrwxrwx  1 root root    42 Apr  6 14:56 libpdserv.so ->
> /usr/local/share/etherlab/lib/libpdserv.so
I attached the detailed logs.

In matlab-mex of the setup_etherlab.m I got the warnings
> Warning: You are using gcc version '7.5.0'. The version of gcc is not
> supported. The
> version currently supported with MEX is '6.3.x'. For a list of
> currently supported
> compilers see:
> https://www.mathworks.com/support/compilers/current_release.
which could also be related to handling of warnings/errors, but did not
pose a problem in R2018b for instance.

Thanks already for looking into this.

Viele Grüße
Moritz Schappler


On 06.04.20 13:18, Richard Hacker wrote:
> Hi Moritz
>
> I do not have Matlab > 2017 available to test, but I do not see a
> reason that ecs_*() symbols are not be found. They are defined in
> ecrt_support.c which is compiled and linked.
>
> Please go into the directory and supply me with the output of:
> cd /home/schappler/IMES/REPO/ethercat/etherlab-slaves/ixxa
> /new_2019a_etl_hrt
> nm ecrt_support.o
>
> Maybe try to compile the executable with (I just moved new_2019a.o
> forward):
> g++ -o ../new_2019a new_2019a_capi.o new_2019a.o new_2019a_data.o
> new_2019a_header.o rtGetInf.o rtGetNaN.o rt_nonfinite.o ecrt_support.o
> hrt_main.o -L/usr/local/lib  -lm -lpdserv -ldl -lrt -pthread
>
> Mit freundlichem Gruß
>
> Richard Hacker
>

-- 
__________________________________________________________
M. Sc. Moritz Schappler
Wissenschaftlicher Mitarbeiter und Gruppenleiter
Robotik & autonome Systeme

Gottfried Wilhelm Leibniz Universität Hannover
Institut für Mechatronische Systeme
An der Universität 1, Gebäude 8142 (Etage 1, Raum 108)
30823 Garbsen

Fon: +49 (0)511 762-4116
Fax: +49 (0)511 762-19976

# For 2018b

## Simulink Compilation Output

    new_2018b 
     Model Save  Clear
    02:52 PM Elapsed: 0.58 sec
     Model Save  Clear
    02:52 PM Elapsed: 2 sec
     Build  4  4  1 Clear
    02:53 PM Elapsed: 24 sec
     Build  4  4  1 Clear
    02:54 PM Elapsed: 8 sec
     Build  4  4 Clear
    02:56 PM Elapsed: 7 sec
    ### Starting build procedure for model: new_2018b
    ### Generating code and artifacts to 'Model specific' folder structure
     Code Generation  2  4
    Elapsed: 6 sec
    ### Generating code into build folder: /mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2018b_etl_hrt
    Input port 4 of 'new_2018b/ETCio 100' is not connected. [3 similar]
    Component:Simulink | Category:Block warning
    Source 'new_2018b/Pulse Generator' specifies that its sample time (-1) is back-inherited. You should explicitly specify the sample time of sources. You can disable this diagnostic by setting the 'Source block specifies -1 sample time' diagnostic to 'none' in the Sample Time group on the Diagnostics pane of the Configuration Parameters dialog box.
    Component:Simulink | Category:Block warning
    ### Invoking Target Language Compiler on new_2018b.rtw
    ### Using System Target File: /mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/etherlab/etherlab.tlc
    ### Loading TLC function libraries
    ### Initial pass through model to cache user defined code
    ### Caching model source code
    ### Generating TLC interface API.
    ### Writing source file new_2018b_capi.c
    ### Writing header file new_2018b_capi.h
    ### Writing header file new_2018b_types.h
    ### Writing source file new_2018b.c
    ### Writing header file new_2018b.h
    ### Writing header file rtwtypes.h
    ### Writing header file builtin_typeid_types.h
    .
    ### Writing header file multiword_types.h
    ### Writing header file rt_nonfinite.h
    ### Writing source file rt_nonfinite.c
    ### Writing header file rtGetInf.h
    ### Writing source file rtGetInf.c
    ### Writing header file rtGetNaN.h
    .
    ### Writing source file rtGetNaN.c
    ### Writing header file new_2018b_private.h
    ### Writing header file rtmodel.h
    ### Writing source file new_2018b_data.c
    ### TLC code generation complete.
    .
    ### Processing Template Makefile: /mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/etherlab/etherlab_hrt.tmf
    ### new_2018b.mk which is generated from /mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/etherlab/etherlab_hrt.tmf is up to date
    ### Building new_2018b: /mnt/FP500/usr/local/MATLAB/R2018b/bin/glnxa64/gmake -f new_2018b.mk  INCLUDE_MDL_TERMINATE_FCN=1 ISPROTECTINGMODEL=NOTPROTECTING
	    CC  new_2018b_capi.o
	    CC  new_2018b_data.o
	    CC  new_2018b_header.o
	    CC  rtGetInf.o
	    CC  rtGetNaN.o
	    CC  rt_nonfinite.o
	    CC  new_2018b.o
	    CC  hrt_main.o
    g++      -o ../new_2018b new_2018b_capi.o new_2018b_data.o new_2018b_header.o rtGetInf.o rtGetNaN.o rt_nonfinite.o ecrt_support.o new_2018b.o hrt_main.o          -L/usr/local/lib  -lm -lpdserv -ldl -lrt -pthread -lethercat
    ### Created executable: ../new_2018b
    ### Successful completion of build procedure for model: new_2018b
    Build process completed successfully

## Other Diagnostics

cd /home/moritz/IMES_REPO/ethercat/etherlab-examples/build_test_officialetherlab/2018b/new_2018b_etl_hrt
$ nm ecrt_support.o 
                 U calloc
                 U clock_gettime
0000000000000180 d convert_funcs.4576
0000000000000160 d convert_funcs.4578
00000000000000e0 d convert_funcs.4580
00000000000000a0 d convert_funcs.4588
0000000000000080 d convert_funcs.4590
0000000000000000 d convert_funcs.4592
0000000000000000 d ecat_data
                 U ecrt_domain_data
                 U ecrt_domain_process
                 U ecrt_domain_queue
                 U ecrt_domain_state
                 U ecrt_master_activate
                 U ecrt_master_application_time
                 U ecrt_master_create_domain
                 U ecrt_master_receive
                 U ecrt_master_send
                 U ecrt_master_slave_config
                 U ecrt_master_state
                 U ecrt_master_sync_reference_clock_to
                 U ecrt_master_sync_slave_clocks
                 U ecrt_request_master
                 U ecrt_slave_config_complete_sdo
                 U ecrt_slave_config_create_sdo_request
                 U ecrt_slave_config_dc
                 U ecrt_slave_config_idn
                 U ecrt_slave_config_pdos
                 U ecrt_slave_config_reg_pdo_entry
                 U ecrt_slave_config_sdo
                 U ecrt_write_lreal
                 U ecrt_write_real
0000000000000000 t ecs_copy_uint8
0000000000001520 T ecs_end
00000000000015a0 T ecs_get_domain_ptr
0000000000000c60 T ecs_init
0000000000000030 D ec_slave_sdo_head
0000000000000800 t ecs_read_be_double
00000000000008b0 t ecs_read_be_single
0000000000000920 t ecs_read_be_uint16
0000000000000990 t ecs_read_be_uint24
00000000000008a0 t ecs_read_be_uint32
00000000000008e0 t ecs_read_be_uint40
0000000000000960 t ecs_read_be_uint48
0000000000000930 t ecs_read_be_uint56
00000000000007f0 t ecs_read_be_uint64
00000000000003f0 t ecs_read_le_double
00000000000003e0 t ecs_read_le_single
0000000000000320 t ecs_read_le_uint16
0000000000000330 t ecs_read_le_uint24
0000000000000350 t ecs_read_le_uint32
0000000000000360 t ecs_read_le_uint40
0000000000000380 t ecs_read_le_uint48
00000000000003a0 t ecs_read_le_uint56
00000000000003d0 t ecs_read_le_uint64
0000000000000240 t ecs_read_uint1
0000000000000260 t ecs_read_uint2
0000000000000280 t ecs_read_uint3
00000000000002a0 t ecs_read_uint4
00000000000002c0 t ecs_read_uint5
00000000000002e0 t ecs_read_uint6
0000000000000300 t ecs_read_uint7
00000000000009b0 T ecs_receive
0000000000000bf0 T ecs_sdo_handler
0000000000000aa0 T ecs_send
0000000000001530 T ecs_setup_master
0000000000000c80 T ecs_start_slaves
00000000000007e0 t ecs_write_be_double
0000000000000890 t ecs_write_be_single
0000000000000900 t ecs_write_be_uint16
00000000000008c0 t ecs_write_be_uint24
0000000000000880 t ecs_write_be_uint32
0000000000000860 t ecs_write_be_uint40
0000000000000840 t ecs_write_be_uint48
0000000000000810 t ecs_write_be_uint56
00000000000007c0 t ecs_write_be_uint64
0000000000000230 t ecs_write_le_double
0000000000000220 t ecs_write_le_single
0000000000000160 t ecs_write_le_uint16
0000000000000170 t ecs_write_le_uint24
0000000000000190 t ecs_write_le_uint32
00000000000001a0 t ecs_write_le_uint40
00000000000001c0 t ecs_write_le_uint48
00000000000001e0 t ecs_write_le_uint56
0000000000000210 t ecs_write_le_uint64
0000000000000010 t ecs_write_uint1
0000000000000040 t ecs_write_uint2
0000000000000070 t ecs_write_uint3
00000000000000a0 t ecs_write_uint4
00000000000000d0 t ecs_write_uint5
0000000000000100 t ecs_write_uint6
0000000000000130 t ecs_write_uint7
0000000000000100 C errbuf
                 U ETL_is_major_step
0000000000000510 t get_domain
0000000000000400 t get_master
                 U _GLOBAL_OFFSET_TABLE_
0000000000000000 r .LC0
0000000000000020 r .LC1
00000000000000b8 r .LC10
0000000000000000 r .LC11
00000000000000f8 r .LC12
0000000000000069 r .LC13
0000000000000050 r .LC2
0000000000000000 r .LC3
0000000000000070 r .LC4
000000000000000d r .LC5
0000000000000026 r .LC6
000000000000003d r .LC7
0000000000000098 r .LC8
0000000000000053 r .LC9
                 U malloc
                 U monotonic_time_key
0000000000000040 D no_mem_msg
                 U pthread_getspecific
0000000000000640 t register_pdos
                 U __snprintf_chk
                 U __stack_chk_fail

# Manual Compilation

cd /home/moritz/IMES_REPO/ethercat/etherlab-examples/build_test_officialetherlab/2018b/new_2018b_etl_hrt
g++ -o ../new_2018b new_2018b_capi.o new_2018b.o new_2018b_data.o new_2018b_header.o rtGetInf.o rtGetNaN.o rt_nonfinite.o ecrt_support.o hrt_main.o -L/usr/local/lib  -lm -lpdserv -ldl -lrt -pthread 
ecrt_support.o: In Funktion »get_master«:
ecrt_support.c:(.text+0x499): Warnung: undefinierter Verweis auf »ecrt_request_master«
ecrt_support.o: In Funktion »get_domain«:
ecrt_support.c:(.text+0x5e5): Warnung: undefinierter Verweis auf »ecrt_master_create_domain«
ecrt_support.o: In Funktion »register_pdos«:
ecrt_support.c:(.text+0x6d9): Warnung: undefinierter Verweis auf »ecrt_slave_config_reg_pdo_entry«
ecrt_support.o: In Funktion »ecs_receive«:
ecrt_support.c:(.text+0xa0b): Warnung: undefinierter Verweis auf »ecrt_domain_process«
ecrt_support.c:(.text+0xa18): Warnung: undefinierter Verweis auf »ecrt_domain_state«
ecrt_support.c:(.text+0xa7c): Warnung: undefinierter Verweis auf »ecrt_master_application_time«
ecrt_support.c:(.text+0xa86): Warnung: undefinierter Verweis auf »ecrt_master_receive«
ecrt_support.c:(.text+0xa95): Warnung: undefinierter Verweis auf »ecrt_master_state«
ecrt_support.o: In Funktion »ecs_send«:
ecrt_support.c:(.text+0xb05): Warnung: undefinierter Verweis auf »ecrt_domain_queue«
ecrt_support.c:(.text+0xb7a): Warnung: undefinierter Verweis auf »ecrt_master_sync_slave_clocks«
ecrt_support.c:(.text+0xb84): Warnung: undefinierter Verweis auf »ecrt_master_send«
ecrt_support.c:(.text+0xbd8): Warnung: undefinierter Verweis auf »ecrt_master_sync_reference_clock_to«
ecrt_support.o: In Funktion »ecs_start_slaves«:
ecrt_support.c:(.text+0xcf0): Warnung: undefinierter Verweis auf »ecrt_master_slave_config«
ecrt_support.c:(.text+0xd0d): Warnung: undefinierter Verweis auf »ecrt_slave_config_pdos«
ecrt_support.c:(.text+0xde5): Warnung: undefinierter Verweis auf »ecrt_master_activate«
ecrt_support.c:(.text+0xe05): Warnung: undefinierter Verweis auf »ecrt_domain_data«
ecrt_support.c:(.text+0x108c): Warnung: undefinierter Verweis auf »ecrt_slave_config_sdo«
ecrt_support.c:(.text+0x10fe): Warnung: undefinierter Verweis auf »ecrt_slave_config_complete_sdo«
ecrt_support.c:(.text+0x119c): Warnung: undefinierter Verweis auf »ecrt_slave_config_sdo«
ecrt_support.c:(.text+0x123b): Warnung: undefinierter Verweis auf »ecrt_write_lreal«
ecrt_support.c:(.text+0x1307): Warnung: undefinierter Verweis auf »ecrt_slave_config_create_sdo_request«
ecrt_support.c:(.text+0x1364): Warnung: undefinierter Verweis auf »ecrt_slave_config_idn«
ecrt_support.c:(.text+0x13c7): Warnung: undefinierter Verweis auf »ecrt_write_real«
ecrt_support.c:(.text+0x14b3): Warnung: undefinierter Verweis auf »ecrt_slave_config_dc«
collect2: error: ld returned 1 exit status


Result: Does not work either from outside Matlab
# For 2019a

## Try 1: Simulink Compilation Output


    ### Generating code into build folder: /mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt
    Input port 4 of 'new_2019a/ETCio 100' is not connected. [3 similar]
    Component:Simulink | Category:Block warning
    Source 'new_2019a/Pulse Generator' specifies that its sample time (-1) is back-inherited. You should explicitly specify the sample time of sources. You can disable this diagnostic by setting the 'Source block specifies -1 sample time' diagnostic to 'none' in the Sample Time group on the Diagnostics pane of the Configuration Parameters dialog box.
    Component:Simulink | Category:Block warning
    ### Invoking Target Language Compiler on new_2019a.rtw
    ### Using System Target File: /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab.tlc
    ### Loading TLC function libraries
    ### Initial pass through model to cache user defined code
    ### Caching model source code
    ### Generating TLC interface API.
    ### Writing source file new_2019a_capi.c
    ### Writing header file new_2019a_capi.h
    ### Writing header file new_2019a_types.h
    .
    ### Writing source file new_2019a.c
    ### Writing header file new_2019a.h
    ### Writing header file rtwtypes.h
    ### Writing header file builtin_typeid_types.h
    ### Writing header file multiword_types.h
    ### Writing header file rt_nonfinite.h
    .
    ### Writing source file rt_nonfinite.c
    ### Writing header file rtGetInf.h
    ### Writing source file rtGetInf.c
    ### Writing header file rtGetNaN.h
    ### Writing source file rtGetNaN.c
    ### Writing header file new_2019a_private.h
    .
    ### Writing header file rtmodel.h
    ### Writing source file new_2019a_data.c
    ### TLC code generation complete.
    .
    ### Processing Template Makefile: /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab_hrt.tmf
    Found legacy make variables |>START_MDLREFINC_EXPAND_INCLUDES<|, |>END_MDLREFINC_EXPAND_INCLUDES<|, |>MODELREF_INC_PATH<| in the template makefile /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab_hrt.tmf. The variables are no longer required. You can remove the variables. [3 similar]
    Component:Simulink | Category:Model warning
    ### Creating /mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt/new_2019a.mk from /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab_hrt.tmf
    ### Building new_2019a: /mnt/FP500/usr/local/MATLAB/R2019a/bin/glnxa64/gmake -f new_2019a.mk  INCLUDE_MDL_TERMINATE_FCN=1 ISPROTECTINGMODEL=NOTPROTECTING
    ln -s new_2019a.mk Makefile
	    CC  new_2019a_capi.o
	    CC  new_2019a_data.o
	    CC  new_2019a_header.o
	    CC  rtGetInf.o
	    CC  rtGetNaN.o
	    CC  rt_nonfinite.o
	    CC  ecrt_support.o
	    CC  new_2019a.o
	    CC  hrt_main.o
    g++      -o ../new_2019a new_2019a_capi.o new_2019a_data.o new_2019a_header.o rtGetInf.o rtGetNaN.o rt_nonfinite.o ecrt_support.o new_2019a.o hrt_main.o          -L/usr/local/lib  -lm -lpdserv -ldl -lrt -pthread
    new_2019a.o: In Funktion »new_2019a_step«:
    new_2019a.c:(.text+0x15): Warnung: undefinierter Verweis auf »ecs_receive«
    new_2019a.o: In Funktion »new_2019a_initialize«:
    new_2019a.c:(.text+0x3ab): Warnung: undefinierter Verweis auf »ecs_init«
    new_2019a.c:(.text+0x408): Warnung: undefinierter Verweis auf »ecs_start_slaves«
    new_2019a.o: In Funktion »new_2019a_step«:
    new_2019a.c:(.text+0x224): Warnung: undefinierter Verweis auf »ecs_send«
    new_2019a.o: In Funktion »new_2019a_terminate«:
    new_2019a.c:(.text+0x446): Warnung: undefinierter Verweis auf »ecs_end«
    collect2: error: ld returned 1 exit status
    gmake: *** [../new_2019a] Error 1
    ### Build procedure for model: 'new_2019a' aborted due to an error.

## Try 1: Other Diagnostics

cd /home/moritz/IMES_REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt
$ nm ecrt_support.o 
$ ll ecrt_support.o
-rw-rw-r-- 1 moritz moritz 944 Apr  6 15:55 ecrt_support.o

(no output)

ecrt.c has 0 Bytes
--> already in Folder /usr/local/share/etherlab/blocks/EtherCAT
commit 1146 (2018-02.08): empty file rtw/blocks/EtherCAT/ecrt_support.c added

try fixing:
sudo cp /usr/local/share/etherlab/src/ecrt_support.c /usr/local/MATLAB/R2019a/rtw/c/etherlab/blocks/EtherCAT/ecrt_support.c

## Try 2: Simulink compiling/


After copying the ecrt_support.c from usr/local/share/etherlab/src to matlab install dir (see above)

    ### Starting build procedure for model: new_2019a
    ### Generating code and artifacts to 'Model specific' folder structure
     Code Generation  3  7
    Elapsed: 8 sec
    ### Generating code into build folder: /mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt
    Input port 4 of 'new_2019a/ETCio 100' is not connected. [3 similar]
    Component:Simulink | Category:Block warning
    Source 'new_2019a/Pulse Generator' specifies that its sample time (-1) is back-inherited. You should explicitly specify the sample time of sources. You can disable this diagnostic by setting the 'Source block specifies -1 sample time' diagnostic to 'none' in the Sample Time group on the Diagnostics pane of the Configuration Parameters dialog box.
    Component:Simulink | Category:Block warning
    ### Invoking Target Language Compiler on new_2019a.rtw
    ### Using System Target File: /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab.tlc
    ### Loading TLC function libraries
    ### Initial pass through model to cache user defined code
    ### Caching model source code
    ### Generating TLC interface API.
    ### Writing source file new_2019a_capi.c
    ### Writing header file new_2019a_capi.h
    ### Writing header file new_2019a_types.h
    .
    ### Writing source file new_2019a.c
    ### Writing header file new_2019a.h
    ### Writing header file rtwtypes.h
    ### Writing header file builtin_typeid_types.h
    ### Writing header file multiword_types.h
    ### Writing header file rt_nonfinite.h
    .
    ### Writing source file rt_nonfinite.c
    ### Writing header file rtGetInf.h
    ### Writing source file rtGetInf.c
    ### Writing header file rtGetNaN.h
    ### Writing source file rtGetNaN.c
    ### Writing header file new_2019a_private.h
    .
    ### Writing header file rtmodel.h
    ### Writing source file new_2019a_data.c
    ### TLC code generation complete.
    .
    ### Processing Template Makefile: /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab_hrt.tmf
    Found legacy make variables |>START_MDLREFINC_EXPAND_INCLUDES<|, |>END_MDLREFINC_EXPAND_INCLUDES<|, |>MODELREF_INC_PATH<| in the template makefile /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab_hrt.tmf. The variables are no longer required. You can remove the variables. [3 similar]
    Component:Simulink | Category:Model warning
    ### /mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt/new_2019a.mk which is generated from /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab_hrt.tmf is up to date
    ### Building new_2019a: /mnt/FP500/usr/local/MATLAB/R2019a/bin/glnxa64/gmake -f new_2019a.mk  INCLUDE_MDL_TERMINATE_FCN=1 ISPROTECTINGMODEL=NOTPROTECTING
	    CC  new_2019a_capi.o
	    CC  new_2019a_data.o
	    CC  new_2019a_header.o
	    CC  rtGetInf.o
	    CC  rtGetNaN.o
	    CC  rt_nonfinite.o
	    CC  ecrt_support.o
	    CC  new_2019a.o
	    CC  hrt_main.o
    g++      -o ../new_2019a new_2019a_capi.o new_2019a_data.o new_2019a_header.o rtGetInf.o rtGetNaN.o rt_nonfinite.o ecrt_support.o new_2019a.o hrt_main.o          -L/usr/local/lib  -lm -lpdserv -ldl -lrt -pthread
    ecrt_support.o: In Funktion »get_master«:
    ecrt_support.c:(.text+0x499): Warnung: undefinierter Verweis auf »ecrt_request_master«
    ecrt_support.o: In Funktion »get_domain«:
    ecrt_support.c:(.text+0x5e5): Warnung: undefinierter Verweis auf »ecrt_master_create_domain«
    ecrt_support.o: In Funktion »register_pdos«:
    ecrt_support.c:(.text+0x6d9): Warnung: undefinierter Verweis auf »ecrt_slave_config_reg_pdo_entry«
    ecrt_support.o: In Funktion »ecs_receive«:
    ecrt_support.c:(.text+0xa0b): Warnung: undefinierter Verweis auf »ecrt_domain_process«
    ecrt_support.c:(.text+0xa18): Warnung: undefinierter Verweis auf »ecrt_domain_state«
    ecrt_support.c:(.text+0xa7c): Warnung: undefinierter Verweis auf »ecrt_master_application_time«
    ecrt_support.c:(.text+0xa86): Warnung: undefinierter Verweis auf »ecrt_master_receive«
    ecrt_support.c:(.text+0xa95): Warnung: undefinierter Verweis auf »ecrt_master_state«
    ecrt_support.o: In Funktion »ecs_send«:
    ecrt_support.c:(.text+0xb05): Warnung: undefinierter Verweis auf »ecrt_domain_queue«
    ecrt_support.c:(.text+0xb7a): Warnung: undefinierter Verweis auf »ecrt_master_sync_slave_clocks«
    ecrt_support.c:(.text+0xb84): Warnung: undefinierter Verweis auf »ecrt_master_send«
    ecrt_support.c:(.text+0xbd8): Warnung: undefinierter Verweis auf »ecrt_master_sync_reference_clock_to«
    ecrt_support.o: In Funktion »ecs_start_slaves«:
    ecrt_support.c:(.text+0xcf0): Warnung: undefinierter Verweis auf »ecrt_master_slave_config«
    ecrt_support.c:(.text+0xd0d): Warnung: undefinierter Verweis auf »ecrt_slave_config_pdos«
    ecrt_support.c:(.text+0xde5): Warnung: undefinierter Verweis auf »ecrt_master_activate«
    ecrt_support.c:(.text+0xe05): Warnung: undefinierter Verweis auf »ecrt_domain_data«
    ecrt_support.c:(.text+0x108c): Warnung: undefinierter Verweis auf »ecrt_slave_config_sdo«
    ecrt_support.c:(.text+0x10fe): Warnung: undefinierter Verweis auf »ecrt_slave_config_complete_sdo«
    ecrt_support.c:(.text+0x119c): Warnung: undefinierter Verweis auf »ecrt_slave_config_sdo«
    ecrt_support.c:(.text+0x123b): Warnung: undefinierter Verweis auf »ecrt_write_lreal«
    ecrt_support.c:(.text+0x1307): Warnung: undefinierter Verweis auf »ecrt_slave_config_create_sdo_request«
    ecrt_support.c:(.text+0x1364): Warnung: undefinierter Verweis auf »ecrt_slave_config_idn«
    ecrt_support.c:(.text+0x13c7): Warnung: undefinierter Verweis auf »ecrt_write_real«
    ecrt_support.c:(.text+0x14b3): Warnung: undefinierter Verweis auf »ecrt_slave_config_dc«
    collect2: error: ld returned 1 exit status
    gmake: *** [../new_2019a] Error 1
    ### Build procedure for model: 'new_2019a' aborted due to an error.
    Error(s) encountered while building "new_2019a"

## Try 2: Other

cd /home/moritz/IMES_REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt
$ nm ecrt_support.o 
                 U calloc
                 U clock_gettime
0000000000000180 d convert_funcs.4576
0000000000000160 d convert_funcs.4578
00000000000000e0 d convert_funcs.4580
00000000000000a0 d convert_funcs.4588
0000000000000080 d convert_funcs.4590
0000000000000000 d convert_funcs.4592
0000000000000000 d ecat_data
                 U ecrt_domain_data
                 U ecrt_domain_process
                 U ecrt_domain_queue
                 U ecrt_domain_state
                 U ecrt_master_activate
                 U ecrt_master_application_time
                 U ecrt_master_create_domain
                 U ecrt_master_receive
                 U ecrt_master_send
                 U ecrt_master_slave_config
                 U ecrt_master_state
                 U ecrt_master_sync_reference_clock_to
                 U ecrt_master_sync_slave_clocks
                 U ecrt_request_master
                 U ecrt_slave_config_complete_sdo
                 U ecrt_slave_config_create_sdo_request
                 U ecrt_slave_config_dc
                 U ecrt_slave_config_idn
                 U ecrt_slave_config_pdos
                 U ecrt_slave_config_reg_pdo_entry
                 U ecrt_slave_config_sdo
                 U ecrt_write_lreal
                 U ecrt_write_real
0000000000000000 t ecs_copy_uint8
0000000000001520 T ecs_end
00000000000015a0 T ecs_get_domain_ptr
0000000000000c60 T ecs_init
0000000000000030 D ec_slave_sdo_head
0000000000000800 t ecs_read_be_double
00000000000008b0 t ecs_read_be_single
0000000000000920 t ecs_read_be_uint16
0000000000000990 t ecs_read_be_uint24
00000000000008a0 t ecs_read_be_uint32
00000000000008e0 t ecs_read_be_uint40
0000000000000960 t ecs_read_be_uint48
0000000000000930 t ecs_read_be_uint56
00000000000007f0 t ecs_read_be_uint64
00000000000003f0 t ecs_read_le_double
00000000000003e0 t ecs_read_le_single
0000000000000320 t ecs_read_le_uint16
0000000000000330 t ecs_read_le_uint24
0000000000000350 t ecs_read_le_uint32
0000000000000360 t ecs_read_le_uint40
0000000000000380 t ecs_read_le_uint48
00000000000003a0 t ecs_read_le_uint56
00000000000003d0 t ecs_read_le_uint64
0000000000000240 t ecs_read_uint1
0000000000000260 t ecs_read_uint2
0000000000000280 t ecs_read_uint3
00000000000002a0 t ecs_read_uint4
00000000000002c0 t ecs_read_uint5
00000000000002e0 t ecs_read_uint6
0000000000000300 t ecs_read_uint7
00000000000009b0 T ecs_receive
0000000000000bf0 T ecs_sdo_handler
0000000000000aa0 T ecs_send
0000000000001530 T ecs_setup_master
0000000000000c80 T ecs_start_slaves
00000000000007e0 t ecs_write_be_double
0000000000000890 t ecs_write_be_single
0000000000000900 t ecs_write_be_uint16
00000000000008c0 t ecs_write_be_uint24
0000000000000880 t ecs_write_be_uint32
0000000000000860 t ecs_write_be_uint40
0000000000000840 t ecs_write_be_uint48
0000000000000810 t ecs_write_be_uint56
00000000000007c0 t ecs_write_be_uint64
0000000000000230 t ecs_write_le_double
0000000000000220 t ecs_write_le_single
0000000000000160 t ecs_write_le_uint16
0000000000000170 t ecs_write_le_uint24
0000000000000190 t ecs_write_le_uint32
00000000000001a0 t ecs_write_le_uint40
00000000000001c0 t ecs_write_le_uint48
00000000000001e0 t ecs_write_le_uint56
0000000000000210 t ecs_write_le_uint64
0000000000000010 t ecs_write_uint1
0000000000000040 t ecs_write_uint2
0000000000000070 t ecs_write_uint3
00000000000000a0 t ecs_write_uint4
00000000000000d0 t ecs_write_uint5
0000000000000100 t ecs_write_uint6
0000000000000130 t ecs_write_uint7
0000000000000100 C errbuf
                 U ETL_is_major_step
0000000000000510 t get_domain
0000000000000400 t get_master
                 U _GLOBAL_OFFSET_TABLE_
0000000000000000 r .LC0
0000000000000020 r .LC1
00000000000000b8 r .LC10
0000000000000000 r .LC11
00000000000000f8 r .LC12
0000000000000069 r .LC13
0000000000000050 r .LC2
0000000000000000 r .LC3
0000000000000070 r .LC4
000000000000000d r .LC5
0000000000000026 r .LC6
000000000000003d r .LC7
0000000000000098 r .LC8
0000000000000053 r .LC9
                 U malloc
                 U monotonic_time_key
0000000000000040 D no_mem_msg
                 U pthread_getspecific
0000000000000640 t register_pdos
                 U __snprintf_chk
                 U __stack_chk_fail

## Try 3: Manual compilation

cd /home/moritz/IMES_REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt
g++ -o ../new_2019a new_2019a_capi.o new_2019a.o new_2019a_data.o new_2019a_header.o rtGetInf.o rtGetNaN.o rt_nonfinite.o ecrt_support.o hrt_main.o -L/usr/local/lib  -lm -lpdserv -ldl -lrt -pthread 
ecrt_support.o: In Funktion »get_master«:
ecrt_support.c:(.text+0x499): Warnung: undefinierter Verweis auf »ecrt_request_master«
ecrt_support.o: In Funktion »get_domain«:
ecrt_support.c:(.text+0x5e5): Warnung: undefinierter Verweis auf »ecrt_master_create_domain«
ecrt_support.o: In Funktion »register_pdos«:
ecrt_support.c:(.text+0x6d9): Warnung: undefinierter Verweis auf »ecrt_slave_config_reg_pdo_entry«
ecrt_support.o: In Funktion »ecs_receive«:
ecrt_support.c:(.text+0xa0b): Warnung: undefinierter Verweis auf »ecrt_domain_process«
ecrt_support.c:(.text+0xa18): Warnung: undefinierter Verweis auf »ecrt_domain_state«
ecrt_support.c:(.text+0xa7c): Warnung: undefinierter Verweis auf »ecrt_master_application_time«
ecrt_support.c:(.text+0xa86): Warnung: undefinierter Verweis auf »ecrt_master_receive«
ecrt_support.c:(.text+0xa95): Warnung: undefinierter Verweis auf »ecrt_master_state«
ecrt_support.o: In Funktion »ecs_send«:
ecrt_support.c:(.text+0xb05): Warnung: undefinierter Verweis auf »ecrt_domain_queue«
ecrt_support.c:(.text+0xb7a): Warnung: undefinierter Verweis auf »ecrt_master_sync_slave_clocks«
ecrt_support.c:(.text+0xb84): Warnung: undefinierter Verweis auf »ecrt_master_send«
ecrt_support.c:(.text+0xbd8): Warnung: undefinierter Verweis auf »ecrt_master_sync_reference_clock_to«
ecrt_support.o: In Funktion »ecs_start_slaves«:
ecrt_support.c:(.text+0xcf0): Warnung: undefinierter Verweis auf »ecrt_master_slave_config«
ecrt_support.c:(.text+0xd0d): Warnung: undefinierter Verweis auf »ecrt_slave_config_pdos«
ecrt_support.c:(.text+0xde5): Warnung: undefinierter Verweis auf »ecrt_master_activate«
ecrt_support.c:(.text+0xe05): Warnung: undefinierter Verweis auf »ecrt_domain_data«
ecrt_support.c:(.text+0x108c): Warnung: undefinierter Verweis auf »ecrt_slave_config_sdo«
ecrt_support.c:(.text+0x10fe): Warnung: undefinierter Verweis auf »ecrt_slave_config_complete_sdo«
ecrt_support.c:(.text+0x119c): Warnung: undefinierter Verweis auf »ecrt_slave_config_sdo«
ecrt_support.c:(.text+0x123b): Warnung: undefinierter Verweis auf »ecrt_write_lreal«
ecrt_support.c:(.text+0x1307): Warnung: undefinierter Verweis auf »ecrt_slave_config_create_sdo_request«
ecrt_support.c:(.text+0x1364): Warnung: undefinierter Verweis auf »ecrt_slave_config_idn«
ecrt_support.c:(.text+0x13c7): Warnung: undefinierter Verweis auf »ecrt_write_real«
ecrt_support.c:(.text+0x14b3): Warnung: undefinierter Verweis auf »ecrt_slave_config_dc«
collect2: error: ld returned 1 exit status

_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to