This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Mixed Language Makefile for Syslink example



Hi, I am currently using syslink_2_21_03_11 example 4, the exact file name is ex04_sharedregion.

This concerns the DSP portion of this example. I have made modifications to the Server.c file in order to implement additional code written in c++, so what I did is added extern "C" infront of all the originating C functions, and added the calls to my c++ functions and changed the filename to Server.cpp. Now the problem is, I don't know how to modify the makefile in order for this to compile. Here is the makefile (the only thing I changed is Server.c to Server.cpp):

#
#  ======== makefile ========
#

EXBASE = ..
include ../products.mak

srcs = main_dsp.c Server.cpp
objs = $(addprefix bin/$(PROFILE)/obj/,$(patsubst %.c,%.oe674,$(srcs)))
libs = configuro/linker.cmd

all: configuro/linker.cmd
	$(MAKE) PROFILE=debug server_dsp.x
	$(MAKE) PROFILE=release server_dsp.x

server_dsp.x: bin/$(PROFILE)/server_dsp.xe674
bin/$(PROFILE)/server_dsp.xe674: $(objs) $(libs)
	@$(ECHO) "#"
	@$(ECHO) "# Making $@ ..."
	$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)

bin/$(PROFILE)/obj/%.oe674: %.h
bin/$(PROFILE)/obj/%.oe674: %.c
	@$(ECHO) "#"
	@$(ECHO) "# Making $@ ..."
	$(CC) $(CPPFLAGS) $(CFLAGS) --output_file=$@ -fc $<

configuro/linker.cmd: Dsp.cfg ../shared/config.bld
	@$(ECHO) "#"
	@$(ECHO) "# Making $@ ..."
	$(XDC_INSTALL_DIR)/xs --xdcpath="$(subst +,;,$(PKGPATH))" \
            xdc.tools.configuro -o configuro \
            -t ti.targets.elf.C674 -c $(CGT_C674_ELF_INSTALL_DIR) \
            -p ti.platforms.evmOMAPL138:dsp -b ../shared/config.bld \
            -r release Dsp.cfg

install:
	@$(ECHO) "#"
	@$(ECHO) "# Making $@ ..."
	@$(MKDIR) $(EXEC_DIR)/debug
	$(CP) bin/debug/server_dsp.xe674 $(EXEC_DIR)/debug
	@$(MKDIR) $(EXEC_DIR)/release
	$(CP) bin/release/server_dsp.xe674 $(EXEC_DIR)/release

help:
	@$(ECHO) "make                   # build executable"
	@$(ECHO) "make clean             # clean everything"

clean::
	$(RMDIR) configuro bin

PKGPATH := $(SYSLINK_INSTALL_DIR)/packages
PKGPATH := $(PKGPATH)+$(BIOS_INSTALL_DIR)/packages
PKGPATH := $(PKGPATH)+$(IPC_INSTALL_DIR)/packages
PKGPATH := $(PKGPATH)+$(XDC_INSTALL_DIR)/packages

#  ======== install validation ========
ifeq (install,$(MAKECMDGOALS))
ifeq (,$(EXEC_DIR))
$(error must specify EXEC_DIR)
endif
endif

#  ======== toolchain macros ========
CGTOOLS = $(CGT_C674_ELF_INSTALL_DIR)

CC = $(CGTOOLS)/bin/cl6x -c
AR = $(CGTOOLS)/bin/ar6x rq
LD = $(CGTOOLS)/bin/lnk6x --abi=eabi
ST = $(CGTOOLS)/bin/strip6x

CPPFLAGS =
CFLAGS = -qq $(CCPROFILE_$(PROFILE)) -I. $(COMPILER_OPTS)

LDFLAGS = -w -q -c -m $(@D)/obj/$(@F).map
LDLIBS = -l $(CGTOOLS)/lib/rts6740_elf.lib

CCPROFILE_debug = -D_DEBUG_=1 --symdebug:dwarf
CCPROFILE_release = -O2
COMPILER_OPTS = $(shell cat configuro/compiler.opt)

#  ======== standard macros ========
ifneq (,$(wildcard $(XDC_INSTALL_DIR)/bin/echo.exe))
    # use these on Windows
    CP      = $(XDC_INSTALL_DIR)/bin/cp
    ECHO    = $(XDC_INSTALL_DIR)/bin/echo
    MKDIR   = $(XDC_INSTALL_DIR)/bin/mkdir -p
    RM      = $(XDC_INSTALL_DIR)/bin/rm -f
    RMDIR   = $(XDC_INSTALL_DIR)/bin/rm -rf
else
    # use these on Linux
    CP      = cp
    ECHO    = echo
    MKDIR   = mkdir -p
    RM      = rm -f
    RMDIR   = rm -rf
endif

#  ======== create output directories ========
ifneq (clean,$(MAKECMDGOALS))
ifneq (,$(PROFILE))
ifeq (,$(wildcard bin/$(PROFILE)/obj))
    $(shell $(MKDIR) -p bin/$(PROFILE)/obj)
endif
endif
endif

  • Hi Usman,
    I hope, that Server.cpp change is sufficient.
    Also, please look into this post where the same questions were asked.

    e2e.ti.com/.../166071

    Did you get any error while compiling the syslink ex04 ?

    Attach the build error log if any.

    If possible, attach or send that file via private chat, let me try.
  • So this is my attempt at modifying the makefile:

    #
    #  Copyright (c) 2012, Texas Instruments Incorporated
    #  All rights reserved.
    #
    #  Redistribution and use in source and binary forms, with or without
    #  modification, are permitted provided that the following conditions
    #  are met:
    #
    #  *  Redistributions of source code must retain the above copyright
    #     notice, this list of conditions and the following disclaimer.
    #
    #  *  Redistributions in binary form must reproduce the above copyright
    #     notice, this list of conditions and the following disclaimer in the
    #     documentation and/or other materials provided with the distribution.
    #
    #  *  Neither the name of Texas Instruments Incorporated nor the names of
    #     its contributors may be used to endorse or promote products derived
    #     from this software without specific prior written permission.
    #
    #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    #  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    #  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    #  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    #  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    #  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    #  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    #  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    #  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    #  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    #  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    
    #
    #  ======== makefile ========
    #
    
    EXBASE = ..
    include ../products.mak
    
    srcsC = main_dsp.c OMAPL1x_common.c
    srcsCPP = Server.cpp delay.cpp global.cpp TECData.cpp TECMath.cpp TECProcess.cpp
    objs = $(addprefix bin/$(PROFILE)/obj/,$(patsubst %.c,%.oe674,$(srcsC)))
    objs2 = $(addprefix bin/$(PROFILE)/obj/,$(patsubst %.cpp,%.oe674,$(srcsCPP)))
    libs = configuro/linker.cmd
    
    all: configuro/linker.cmd
    	$(MAKE) PROFILE=debug server_dsp.x
    	$(MAKE) PROFILE=release server_dsp.x
    
    server_dsp.x: bin/$(PROFILE)/server_dsp.xe674
    bin/$(PROFILE)/server_dsp.xe674: $(objs) $(objs2) $(libs)
    	@$(ECHO) "#"
    	@$(ECHO) "# Making $@ ..."
    	$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
    
    bin/$(PROFILE)/obj/%.oe674: %.h
    bin/$(PROFILE)/obj/%.oe674: %.c
    	@$(ECHO) "#"
    	@$(ECHO) "# Making $@ ..."
    	$(CC) $(CPPFLAGS) $(CFLAGS) --output_file=$@ -fc $<
    bin/$(PROFILE)/obj/%.oe674: %.cpp
    	@$(ECHO) "#"
    	@$(ECHO) "# Making $@ ..."
    	$(CC) $(CPPFLAGS) $(CFLAGS) --output_file=$@ -fc $<
    
    configuro/linker.cmd: Dsp.cfg ../shared/config.bld
    	@$(ECHO) "#"
    	@$(ECHO) "# Making $@ ..."
    	$(XDC_INSTALL_DIR)/xs --xdcpath="$(subst +,;,$(PKGPATH))" \
                xdc.tools.configuro -o configuro \
                -t ti.targets.elf.C674 -c $(CGT_C674_ELF_INSTALL_DIR) \
                -p ti.platforms.evmOMAPL138:dsp -b ../shared/config.bld \
                -r release Dsp.cfg
    
    install:
    	@$(ECHO) "#"
    	@$(ECHO) "# Making $@ ..."
    	@$(MKDIR) $(EXEC_DIR)/debug
    	$(CP) bin/debug/server_dsp.xe674 $(EXEC_DIR)/debug
    	@$(MKDIR) $(EXEC_DIR)/release
    	$(CP) bin/release/server_dsp.xe674 $(EXEC_DIR)/release
    
    help:
    	@$(ECHO) "make                   # build executable"
    	@$(ECHO) "make clean             # clean everything"
    
    clean::
    	$(RMDIR) configuro bin
    
    PKGPATH := $(SYSLINK_INSTALL_DIR)/packages
    PKGPATH := $(PKGPATH)+$(BIOS_INSTALL_DIR)/packages
    PKGPATH := $(PKGPATH)+$(IPC_INSTALL_DIR)/packages
    PKGPATH := $(PKGPATH)+$(XDC_INSTALL_DIR)/packages
    
    #  ======== install validation ========
    ifeq (install,$(MAKECMDGOALS))
    ifeq (,$(EXEC_DIR))
    $(error must specify EXEC_DIR)
    endif
    endif
    
    #  ======== toolchain macros ========
    CGTOOLS = $(CGT_C674_ELF_INSTALL_DIR)
    
    CC = $(CGTOOLS)/bin/cl6x -c
    AR = $(CGTOOLS)/bin/ar6x rq
    LD = $(CGTOOLS)/bin/lnk6x --abi=eabi
    ST = $(CGTOOLS)/bin/strip6x
    
    CPPFLAGS = -I /home/logic/ti/CSLR_INCLUDES/support/includes
    CFLAGS = -qq $(CCPROFILE_$(PROFILE)) -I. $(COMPILER_OPTS)
    
    LDFLAGS = -w -q -c -m $(@D)/obj/$(@F).map
    LDLIBS = -l $(CGTOOLS)/lib/rts6740_elf.lib
    
    CCPROFILE_debug = -D_DEBUG_=1 --symdebug:dwarf
    CCPROFILE_release = -O2
    COMPILER_OPTS = $(shell cat configuro/compiler.opt)
    
    #  ======== standard macros ========
    ifneq (,$(wildcard $(XDC_INSTALL_DIR)/bin/echo.exe))
        # use these on Windows
        CP      = $(XDC_INSTALL_DIR)/bin/cp
        ECHO    = $(XDC_INSTALL_DIR)/bin/echo
        MKDIR   = $(XDC_INSTALL_DIR)/bin/mkdir -p
        RM      = $(XDC_INSTALL_DIR)/bin/rm -f
        RMDIR   = $(XDC_INSTALL_DIR)/bin/rm -rf
    else
        # use these on Linux
        CP      = cp
        ECHO    = echo
        MKDIR   = mkdir -p
        RM      = rm -f
        RMDIR   = rm -rf
    endif
    
    #  ======== create output directories ========
    ifneq (clean,$(MAKECMDGOALS))
    ifneq (,$(PROFILE))
    ifeq (,$(wildcard bin/$(PROFILE)/obj))
        $(shell $(MKDIR) -p bin/$(PROFILE)/obj)
    endif
    endif
    endif

    And this is my build log:

    logic@logic-desktop:~/ti/syslink_2_21_03_11/examples/ex04_sharedregion$ make
    #
    # Making all ...
    make -C host all
    make[1]: Entering directory `/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/host'
    #
    # Making all ...
    make PROFILE=debug app_host
    make[2]: Entering directory `/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/host'
    make[2]: Nothing to be done for `app_host'.
    make[2]: Leaving directory `/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/host'
    make PROFILE=release app_host
    make[2]: Entering directory `/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/host'
    make[2]: Nothing to be done for `app_host'.
    make[2]: Leaving directory `/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/host'
    make[1]: Leaving directory `/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/host'
    make -C dsp all
    make[1]: Entering directory `/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/dsp'
    #
    # Making configuro/linker.cmd ...
    /home/logic/ti/xdctools_3_24_03_33/xs --xdcpath="/home/logic/ti/syslink_2_21_03_11/packages;/home/logic/ti/bios_6_34_03_19/packages;/home/logic/ti/ipc_1_25_01_09/packages;/home/logic/ti/xdctools_3_24_03_33/packages" \
                xdc.tools.configuro -o configuro \
                -t ti.targets.elf.C674 -c /home/logic/ti/TI_CGT_C6000_7.3.3 \
                -p ti.platforms.evmOMAPL138:dsp -b ../shared/config.bld \
                -r release Dsp.cfg
    making package.mak (because of package.bld) ...
    configuring Dsp.xe674 from package/cfg/Dsp_pe674.cfg ...
    cle674 package/cfg/Dsp_pe674.c ...
    make PROFILE=debug server_dsp.x
    make[2]: Entering directory `/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/dsp'
    #
    # Making bin/debug/obj/main_dsp.oe674 ...
    /home/logic/ti/TI_CGT_C6000_7.3.3/bin/cl6x -c -I /home/logic/ti/CSLR_INCLUDES/support/includes -qq -D_DEBUG_=1 --symdebug:dwarf -I. -mv6740 --abi=eabi -I"/home/logic/ti/syslink_2_21_03_11/packages" -I"/home/logic/ti/bios_6_34_03_19/packages" -I"/home/logic/ti/ipc_1_25_01_09/packages" -I"/home/logic/ti/xdctools_3_24_03_33/packages" -I"/home/logic/ti/xdctools_3_24_03_33/packages" -I"/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/dsp/configuro/.." -I/home/logic/ti/TI_CGT_C6000_7.3.3/include -Dxdc_target_types__="ti/targets/elf/std.h" -Dxdc_target_name__=C674 -Dxdc_cfg__header__="/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/dsp/configuro/package/cfg/Dsp_pe674.h" --output_file=bin/debug/obj/main_dsp.oe674 -fc main_dsp.c
    #
    # Making bin/debug/obj/OMAPL1x_common.oe674 ...
    /home/logic/ti/TI_CGT_C6000_7.3.3/bin/cl6x -c -I /home/logic/ti/CSLR_INCLUDES/support/includes -qq -D_DEBUG_=1 --symdebug:dwarf -I. -mv6740 --abi=eabi -I"/home/logic/ti/syslink_2_21_03_11/packages" -I"/home/logic/ti/bios_6_34_03_19/packages" -I"/home/logic/ti/ipc_1_25_01_09/packages" -I"/home/logic/ti/xdctools_3_24_03_33/packages" -I"/home/logic/ti/xdctools_3_24_03_33/packages" -I"/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/dsp/configuro/.." -I/home/logic/ti/TI_CGT_C6000_7.3.3/include -Dxdc_target_types__="ti/targets/elf/std.h" -Dxdc_target_name__=C674 -Dxdc_cfg__header__="/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/dsp/configuro/package/cfg/Dsp_pe674.h" --output_file=bin/debug/obj/OMAPL1x_common.oe674 -fc OMAPL1x_common.c
    #
    # Making bin/debug/obj/Server.oe674 ...
    /home/logic/ti/TI_CGT_C6000_7.3.3/bin/cl6x -c -I /home/logic/ti/CSLR_INCLUDES/support/includes -qq -D_DEBUG_=1 --symdebug:dwarf -I. -mv6740 --abi=eabi -I"/home/logic/ti/syslink_2_21_03_11/packages" -I"/home/logic/ti/bios_6_34_03_19/packages" -I"/home/logic/ti/ipc_1_25_01_09/packages" -I"/home/logic/ti/xdctools_3_24_03_33/packages" -I"/home/logic/ti/xdctools_3_24_03_33/packages" -I"/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/dsp/configuro/.." -I/home/logic/ti/TI_CGT_C6000_7.3.3/include -Dxdc_target_types__="ti/targets/elf/std.h" -Dxdc_target_name__=C674 -Dxdc_cfg__header__="/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/dsp/configuro/package/cfg/Dsp_pe674.h" --output_file=bin/debug/obj/Server.oe674 -fc Server.cpp
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 14: error: identifier "class" is undefined
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 15: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 15: error: expected a ")"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 17: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 17: error: expected a ")"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 21: error: identifier "class" is undefined
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 22: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 43: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 44: error: expected a declaration
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 45: error: expected a declaration
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 81: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 82: error: expected a declaration
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 85: error: identifier "class" is undefined
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 86: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 109: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/exception", line 177: error: identifier "bool" is undefined
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 10: error: identifier "class" is undefined
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 11: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 46: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 57: error: expected a declaration
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 59: error: identifier "nothrow_t" is undefined
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 77: error: incomplete type is not allowed
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 77: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 79: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 83: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 88: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 103: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 105: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 109: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 113: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 121: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 124: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 127: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/new", line 130: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/cwchar", line 54: warning: typedef name has already been declared (with same type)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 18: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 18: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 41: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 42: error: expected a declaration
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 99: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 102: error: identifier "_Statetype" is undefined
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 103: error: expected a declaration
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 106: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 106: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 125: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 125: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 128: error: identifier "streampos" is undefined
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 131: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 131: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 246: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 249: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 249: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 341: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 344: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 344: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 436: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 439: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 439: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 441: error: identifier "class" is undefined
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 442: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 442: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 445: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 445: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 448: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 448: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 451: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 451: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 454: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 454: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 457: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 457: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 460: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 460: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 463: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 463: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 466: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 467: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 467: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 470: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 471: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 471: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 474: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 475: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 475: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 478: warning: parsing restarts here after previous syntax error
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 479: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 479: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 482: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 482: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 485: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 485: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 488: error: this declaration has no storage class or type specifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 488: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 504: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 504: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 505: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 505: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 506: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 506: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 507: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 507: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 508: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 508: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 509: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 509: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 511: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 511: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 513: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 513: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 515: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 515: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 517: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 517: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 518: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 518: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 519: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 519: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 520: warning: explicit type is missing ("int" assumed)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 520: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 528: error: expected an identifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 528: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 529: error: expected an identifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 529: warning: typedef name has already been declared (with same type)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 529: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 531: error: expected an identifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 531: warning: typedef name has already been declared (with same type)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 531: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 532: error: expected an identifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 532: warning: typedef name has already been declared (with same type)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 532: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 533: error: expected an identifier
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 533: warning: typedef name has already been declared (with same type)
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 533: error: expected a ";"
    "/home/logic/ti/TI_CGT_C6000_7.3.3/include/iosfwd", line 534: error: expected an identifier
    Error limit reached.
    100 errors detected in the compilation of "Server.cpp".
    Compilation terminated.
    
    >> Compilation failure
    make[2]: *** [bin/debug/obj/Server.oe674] Error 1
    make[2]: Leaving directory `/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/dsp'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/home/logic/ti/syslink_2_21_03_11/examples/ex04_sharedregion/dsp'
    make: *** [all] Error 2
    logic@logic-desktop:~/ti/syslink_2_21_03_11/examples/ex04_sharedregion$ 

  • I was able to compile it, I had to remove -fc from the .cpp build line in the makefile, and then I had to modify this line by casing Server_notifyCB as a Notify_FnNotifyCbck. For some reason it works in .c without cast, but in .cpp it does not. This was also the case with a few other pointers.

    status = Notify_unregisterEvent(Module.remoteProcId, Module.lineId, Module.eventId, (Notify_FnNotifyCbck)Server_notifyCB,(UArg)&Module.eventQueue);

  • Hi Usman,
    Glad to hear that you were able to solve the problem.
    Thanks for sharing the solution.