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.

OMAP-L138: Undefined _mfence symbol when treating C files as C++ files

Part Number: OMAP-L138
Other Parts Discussed in Thread: OMAPL138,

TI experts,

I am developing a dsp bios project using the latest rtos sdk available for the OMAPL138. My project uses IPC libraries, and initially I wasn't able to compile the project until I added a dummy function for the _mfence function. Once I put that in the main implementation file it compiled no problem. I want to use classes in this project, so I turned on the "Treat C files as C++ files" option in the properties menu, and now the same exact code that was able to compile throws the same error I originally saw when i didn't have the dummy function.

undefined first referenced 

symbol in file
--------- ----------------
_mfence

This on a very recent clean install of the latest version of CCS as well.

Thanks,

  • Anybody have any suggestions?  

    I'll attach the project to be able to replicate results. The default project settings will compile without any errors or warnings. If you go to the Properties->CSS Build->C6000 Compiler->Advanved Options->Language Options, and tick "Treat C files as C++ files(--cpp_default, -fg)" the project won't compile.

    I need this option set so that I can include my own classes in this DSP project.big_data_test_dsp.zip

  • Can you confirm the version of compiler that you are using ? Is it the latest CGT 8.3.x. I am able to build your project with CGT 8.3.x but when I turn on the Treat C files as C++ option, I am seeing the error :

    "../shared/bigdataxlat.c", line 61: error #515: a value of type "Ptr" cannot be assigned to an entity of type "Ptr *" 

    The source is part of your package and does appear to assign  value of type "Ptr" cannot be assigned to an entity of type "Ptr *" on the line below:

    /* Translate to local address */
        localDesc->localPtr = SharedRegion_getPtr(SharedDesc->sharedPtr);

    I am not sure why this is treated as an error rather than a warning when the flag is enabled. 

    I will loop in our compiler experts. I have attached my build log in the working and non-working usecase for their reference:

    Build_pass.txt
    **** Clean-only build of configuration Debug for project big_data_test_dsp ****
    
    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 clean -O 
     
    cleaning ../src/sysbios ...
    cleaning ../src/ipc ...
    DEL /F  "big_data_test_dsp.hex"  "configPkg\linker.cmd" "configPkg\compiler.opt"  "big_data_test_dsp.out" 
    DEL /F "MainDsp.obj" "Server.obj" "shared\bigdataxlat.obj" 
    DEL /F "MainDsp.d" "Server.d" "shared\bigdataxlat.d" 
    RMDIR /S/Q  "configPkg\" 
    Could Not Find C:\Users\a0272049\Desktop\Forums\Oceancomm\big_data_test_dsp\Debug\big_data_test_dsp.hex
    Could Not Find C:\Users\a0272049\Desktop\Forums\Oceancomm\big_data_test_dsp\Debug\big_data_test_dsp.out
    Could Not Find C:\Users\a0272049\Desktop\Forums\Oceancomm\big_data_test_dsp\Debug\shared\bigdataxlat.obj
    Finished clean
     
    
    **** Build Finished ****
    
    **** Build of configuration Debug for project big_data_test_dsp ****
    
    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 all -O 
     
    Building file: "../Dsp.cfg"
    Invoking: XDCtools
    "C:/ti/OMAPL138_PRSDK53/xdctools_3_51_01_18_core/xs" --xdcpath="C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages;C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C674 -p ti.platforms.evmOMAPL138:dsp -r release -b "C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp/shared/OMAPL138/config.bld" -c "C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2" --compileOptions "-g" "../Dsp.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring Dsp.xe674 from package/cfg/Dsp_pe674.cfg ...
    generating custom ti.sdo.ipc library makefile ...
    generating custom ti.sysbios library makefile ... 
    Starting build of library sources ...
    making C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp/src/sysbios/sysbios.ae674 ...
    cle674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/BIOS.c ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/family/c64p/Exception_asm.s64P ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/family/c64p/Hwi_asm.s62 ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/family/c64p/Hwi_asm_switch.s62 ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/family/c64p/Hwi_disp_always.s64P ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/rts/ti/tls_get_tp.asm ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/family/c62/TaskSupport_asm.s62 ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/timers/timer64/Timer_asm.s64P ...
    are674 BIOS.obj c64p_Exception_asm.obj c64p_Hwi_asm.obj c64p_Hwi_asm_switch.obj c64p_Hwi_disp_always.obj ti_tls_get_tp.obj c62_TaskSupport_asm.obj timer64_Timer_asm.obj ...
    making C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp/src/ipc.ae674 ...
    cle674 C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/utils/NameServer.c ...
    asme674 C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/gates/GateAAMonitor_asm.s64P ...
    are674 Ipc.obj gates_GateAAMonitor_asm.obj ...
    Build of libraries done.
    cle674 package/cfg/Dsp_pe674.c ...
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 306: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 310: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 314: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 391: remark #2911-D: comparison between two different enum types ("enum ti_sdo_ipc_GateMP_RemoteProtect" and "enum GateMP_RemoteProtect")
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 415: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 419: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 423: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 535: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 540: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 545: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 550: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 551: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 666: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 697: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 732: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1094: remark #2911-D: comparison between two different enum types ("enum ti_sdo_ipc_GateMP_RemoteProtect" and "enum GateMP_RemoteProtect")
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1217: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1252: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1285: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1423: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1436: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1449: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1461: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1576: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/ListMP.c", line 90: warning #225-D: function "_mfence" declared implicitly
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/Ipc.c", line 323: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/Ipc.c", line 502: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/notifyDrivers/NotifyDriverShm.c", line 239: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/notifyDrivers/NotifyDriverShm.c", line 327: remark #2142-D: comparison between signed and unsigned operands
    Finished building: "../Dsp.cfg"
     
            1 file(s) copied.
    making ../src/sysbios/sysbios.ae674 ...
    gmake[1]: Nothing to be done for 'all'.
    making ../src/ipc.ae674 ...
    gmake[1]: Nothing to be done for 'all'.
    Building file: "../shared/bigdataxlat.c"
    Invoking: C6000 Compiler
    "C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/bin/cl6x" -mv6740 --include_path="C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp" --include_path="C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/posix/ccs" --include_path="C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/include" --define=omapl138 -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="shared/bigdataxlat.d_raw" --obj_directory="shared" --cmd_file="configPkg/compiler.opt" "../shared/bigdataxlat.c"
    Finished building: "../shared/bigdataxlat.c"
     
    Building file: "../MainDsp.c"
    Invoking: C6000 Compiler
    "C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/bin/cl6x" -mv6740 --include_path="C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp" --include_path="C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/posix/ccs" --include_path="C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/include" --define=omapl138 -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="MainDsp.d_raw" --cmd_file="configPkg/compiler.opt" "../MainDsp.c"
    Finished building: "../MainDsp.c"
     
    Building file: "../Server.c"
    Invoking: C6000 Compiler
    "C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/bin/cl6x" -mv6740 --include_path="C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp" --include_path="C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/posix/ccs" --include_path="C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/include" --define=omapl138 -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="Server.d_raw" --cmd_file="configPkg/compiler.opt" "../Server.c"
    Finished building: "../Server.c"
     
    making ../src/sysbios/sysbios.ae674 ...
    making ../src/ipc.ae674 ...
    gmake[2]: Nothing to be done for 'all'.
    gmake[2]: Nothing to be done for 'all'.
    Building target: "big_data_test_dsp.out"
    Invoking: C6000 Linker
    "C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/bin/cl6x" -mv6740 --define=omapl138 -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"big_data_test_dsp.map" --heap_size=0x800 --stack_size=0x800 -i"C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/lib" -i"C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/include" --reread_libs --define=DSP_CORE=1 --diag_wrap=off --display_error_number --warn_sections --xml_link_info="big_data_test_dsp_linkInfo.xml" --rom_model -o "big_data_test_dsp.out" "./MainDsp.obj" "./Server.obj" "./shared/bigdataxlat.obj" -l"configPkg/linker.cmd" -llibc.a 
    <Linking>
    Finished building target: "big_data_test_dsp.out"
     
    
    **** Build Finished ****
    

    Build_Failure.txt
    **** Clean-only build of configuration Debug for project big_data_test_dsp ****
    
    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 clean -O 
     
    cleaning ../src/sysbios ...
    cleaning ../src/ipc ...
    DEL /F  "big_data_test_dsp.hex"  "configPkg\linker.cmd" "configPkg\compiler.opt"  "big_data_test_dsp.out" 
    DEL /F "MainDsp.obj" "Server.obj" "shared\bigdataxlat.obj" 
    DEL /F "MainDsp.d" "Server.d" "shared\bigdataxlat.d" 
    RMDIR /S/Q  "configPkg\" 
    Could Not Find C:\Users\a0272049\Desktop\Forums\Oceancomm\big_data_test_dsp\Debug\big_data_test_dsp.hex
    Could Not Find C:\Users\a0272049\Desktop\Forums\Oceancomm\big_data_test_dsp\Debug\big_data_test_dsp.out
    Could Not Find C:\Users\a0272049\Desktop\Forums\Oceancomm\big_data_test_dsp\Debug\shared\bigdataxlat.obj
    Finished clean
     
    
    **** Build Finished ****
    
    **** Build of configuration Debug for project big_data_test_dsp ****
    
    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 all -O 
     
    Building file: "../Dsp.cfg"
    Invoking: XDCtools
    "C:/ti/OMAPL138_PRSDK53/xdctools_3_51_01_18_core/xs" --xdcpath="C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages;C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C674 -p ti.platforms.evmOMAPL138:dsp -r release -b "C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp/shared/OMAPL138/config.bld" -c "C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2" --compileOptions "-g" "../Dsp.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring Dsp.xe674 from package/cfg/Dsp_pe674.cfg ...
    generating custom ti.sdo.ipc library makefile ...
    generating custom ti.sysbios library makefile ... 
    Starting build of library sources ...
    making C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp/src/sysbios/sysbios.ae674 ...
    cle674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/BIOS.c ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/family/c64p/Exception_asm.s64P ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/family/c64p/Hwi_asm.s62 ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/family/c64p/Hwi_asm_switch.s62 ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/family/c64p/Hwi_disp_always.s64P ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/rts/ti/tls_get_tp.asm ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/family/c62/TaskSupport_asm.s62 ...
    asme674 C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/sysbios/timers/timer64/Timer_asm.s64P ...
    are674 BIOS.obj c64p_Exception_asm.obj c64p_Hwi_asm.obj c64p_Hwi_asm_switch.obj c64p_Hwi_disp_always.obj ti_tls_get_tp.obj c62_TaskSupport_asm.obj timer64_Timer_asm.obj ...
    making C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp/src/ipc.ae674 ...
    cle674 C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/utils/NameServer.c ...
    asme674 C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/gates/GateAAMonitor_asm.s64P ...
    are674 Ipc.obj gates_GateAAMonitor_asm.obj ...
    Build of libraries done.
    cle674 package/cfg/Dsp_pe674.c ...
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 306: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 310: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 314: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 391: remark #2911-D: comparison between two different enum types ("enum ti_sdo_ipc_GateMP_RemoteProtect" and "enum GateMP_RemoteProtect")
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 415: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 419: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 423: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 535: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 540: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 545: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 550: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 551: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 666: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 697: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 732: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1094: remark #2911-D: comparison between two different enum types ("enum ti_sdo_ipc_GateMP_RemoteProtect" and "enum GateMP_RemoteProtect")
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1217: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1252: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1285: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1423: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1436: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1449: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1461: warning #190-D: enumerated type mixed with another type
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/GateMP.c", line 1576: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/ListMP.c", line 90: warning #225-D: function "_mfence" declared implicitly
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/Ipc.c", line 323: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/Ipc.c", line 502: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/notifyDrivers/NotifyDriverShm.c", line 239: remark #2142-D: comparison between signed and unsigned operands
    "C:/ti/OMAPL138_PRSDK53/ipc_3_50_03_05/packages/ti/sdo/ipc/notifyDrivers/NotifyDriverShm.c", line 327: remark #2142-D: comparison between signed and unsigned operands
    Finished building: "../Dsp.cfg"
     
            1 file(s) copied.
    making ../src/sysbios/sysbios.ae674 ...
    gmake[1]: Nothing to be done for 'all'.
    making ../src/ipc.ae674 ...
    gmake[1]: Nothing to be done for 'all'.
    Building file: "../shared/bigdataxlat.c"
    Invoking: C6000 Compiler
    "C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/bin/cl6x" -mv6740 --include_path="C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp" --include_path="C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/posix/ccs" --include_path="C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/include" --define=omapl138 -g --cpp_default --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="shared/bigdataxlat.d_raw" --obj_directory="shared" --cmd_file="configPkg/compiler.opt" "../shared/bigdataxlat.c"
     
    >> Compilation failure
    shared/subdir_rules.mk:9: recipe for target 'shared/bigdataxlat.obj' failed
    "../shared/bigdataxlat.c", line 61: error #515: a value of type "Ptr" cannot be assigned to an entity of type "Ptr *"
    1 error detected in the compilation of "../shared/bigdataxlat.c".
    gmake: *** [shared/bigdataxlat.obj] Error 1
    Building file: "../MainDsp.c"
    Invoking: C6000 Compiler
    "C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/bin/cl6x" -mv6740 --include_path="C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp" --include_path="C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/posix/ccs" --include_path="C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/include" --define=omapl138 -g --cpp_default --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="MainDsp.d_raw" --cmd_file="configPkg/compiler.opt" "../MainDsp.c"
    "../MainDsp.c", line 116: warning #2824-D: conversion from a string literal to "char *" is deprecated
    Finished building: "../MainDsp.c"
     
    Building file: "../Server.c"
    Invoking: C6000 Compiler
    "C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/bin/cl6x" -mv6740 --include_path="C:/Users/a0272049/Desktop/Forums/Oceancomm/big_data_test_dsp" --include_path="C:/ti/OMAPL138_PRSDK53/bios_6_75_02_00/packages/ti/posix/ccs" --include_path="C:/ti/C665x_PRSDK53/ti-cgt-c6000_8.3.2/include" --define=omapl138 -g --cpp_default --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="Server.d_raw" --cmd_file="configPkg/compiler.opt" "../Server.c"
    "../Server.c", line 91: warning #2824-D: conversion from a string literal to "char *" is deprecated
    Finished building: "../Server.c"
     
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****
    

  • Rahul,

    Compiler version is: TI v8.3.3

    XDCtools version: 3.55.2.22_core

    I'm not sure why I don't see that error on my side when I have that option enabled. I attached the zip file by selecting Export->Archive File with every item checked off in the project. Is there a different way I should share my code?

  • I believe I've found a way to recreate the issue I'm seeing with the code from the sys/bios template for the c6748:

    1. Create new CCS project

    2. Choose OMAPL138 target then select the C67XX [C6000] tab

    3. Give project name and choose the SYS/BIOS->TI Target Examples->Typical template

    4. Select latest IPC version in Product include window and type ti.platforms.evmOMAPL138:dsp for target platform

    5. In app.cfg add: var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');

    6. in main.c add #include <ti/ipc/Ipc.h>

    7. Add Ipc_start(); in taskFxn code.

    This project should fail to compile throwing the undefined _mfence error. If you include the dummy _mfence function in main.c the error will go away. If you select the "Treat C files as C++ files(--cpp_default, -fg)" options even with the dummy function it should fail. I tried this on my Linux VM with the latest version of CCS with the latest SDK RTOS package for the OMAPL138 installed as well. I will attach the simplified project to this post too.

    dsp_test.zip

  • user6243032 said:
    I wasn't able to compile the project until I added a dummy function for the _mfence function

    That's a bad idea.  _mfence is not a function, but an intrinsic.  Please search for it in the C6000 compiler manual.  You'll see it is supported only for the C6600 family of processors.  OMAP-L138 has a C6740 processor, so it does not support the _mfence intrinsic.

    How is it that your code uses _mfence?  Whatever uses _mfence is probably not documented or tested to work on a C6740 processor.

    user6243032 said:
    I want to use classes in this project, so I turned on the "Treat C files as C++ files" option in the properties menu

    That is not the proper way to handle combining C and C++ code in the same program.  Keep the C and C++ code in separate files.  The C code files use the file extension .c and the C++ code files use the file extension .cpp.  When the code in those files needs to interact, use the methods shown in this FAQ (not from TI).

    Thanks and regards,

    -George

  • "How is it that your code uses _mfence?  Whatever uses _mfence is probably not documented or tested to work on a C6740 processor."

    If you look at my latest reply to this post you can see that adding the line "Ipc_start();" to a sys/bios template project without the "Treat C files as C++ files" option will cause the compiler to throw this error. I'm not sure why this would happen since it says that the OMAPL138 is listed on the supported devices section on the latest release notes of IPC 3.50.04.07.

    If I remove this line in my other project the two processors do not attach when I try to call Ipc_attach();

  • The mfence instruction was added to fix a ListMP corruption issue specific only to C66x devices and should not be included for other devices. I will file a ticket against this.

    In the meantime, within ListMP.c under ipc\packages\ti\sdo\ipc, can you try changing the line

    #if defined(xdc_target__isaCompatible_64P)

    to

    #if defined(xdc_target__isaCompatible_66)

    And then rebuild the IPC package. This should include the mfence intrinsic only for C66x devices. 

    Regards,
    Sahin