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.

CCS / AWR1642: About Recive A Message From The CANFD In AWR1642.

Part Number: AWR1642

Tool/software: Code Composer Studio

Hi,

I  want to ask three questions:

First:When I use CCS to program CANFD, the compiler will always have the following warning. How can I get rid of this warning? What is the source of this warning?

The Second:When I use the callback function to process the receive message.:

Use the function(CANFD_getData) in CANFD,Why the value : uReciveMsgId,rxFrameType,rxIdType,RxDataLength and RxData[8],Declarations and initializations are set to global variables.You can't have local variables, right?

what's the reason for this ?

When I set it to a local variable, the program will run with an exception, and then there's a dead loop. What's the reason for that?

The Last:

Why can I only receive messages with ID of 1? How do I set up filters so that I can receive all messages?

Please help me,Thanks

  • Hi,

    How did you create the CANFD CCS project?

    Thank you
    Cesar
  • #1) For SDK 1.2 or 2.0, you must compile the MSS code with "int" enums to match the DSS' enums.  Two changes are needed in the CCS Project Properties:

    Build->ARM Compiler->Advanced Options->Runtime Model, set --enum_type to "int".

    Build->XDCtools->Advanced Options, on --compileOptions, set the field to "--enum_type=int ".

    Then do a clean build.

    #2) Not enough information is given here.  You need to search and see how (and if) the variables are used outside of the function. Clearly, some of them are, or it wouldn't crash using local variables.

    #3) Again, not enough information is given.  Most likely, it is a configuration problem. You might check the SDK's CAN driver for the unit test code, that will provide a configuration example.

  • Hi,

    For the last ,i can show  the configuration about my CANFD RX Message Object:

    This is my configuration,and i looked at the unit test ,but is not help me.Can you look the configure and  give me some advice?

     

  • For the first, i am done,but the warning is still staly.what is wrong?
    thanks
  • Hi,

    The warning is still,When i change the two CCS Project Properties:

    What's wrong? 

    Thanks

  • It seems that BIOS is still being built with packed enumerations.  Set the XDCtools --compileOptions field to this, exactly:

    Notice the space between int and ".  Why do you need to compile the BIOS with debug mode?  Fix the issue first, then if you do need -g you add it later.

  • hi,
    when i set the field as your advice,but it still has these wrining ?
    which way to compile the BIOS ?
  • Did you do a clean build so that BIOS is rebuilt?

    What demo are you building, and what SDK are you using? There will most likely be a projectspec for the demo in TIREX that will correctly build whatever demo you are using.
  • Hi,
    This is not a demo writed by TI, it is a code write for my product which use the AWR1642, and i write the code use the function of CAN where in CANFD of AWR1642. I clean build and rebuilt ,but it is failed. What's the TIREX?
  • TIREX is TI's "Resource Explorer". In CCS, go to View->Resource Explorer and it will open.  Then you can browse to Software->mmWave Sensors, and open either the Industrial or Automotive toolboxes.   Each Lab/demo contains CCS Projectspecs that create the build environment for the demo.

    I have attached MSS and DSS projectspecs from one of our Labs that will create the correct CCS environment for mmWave SDK 1.2.0.5.  To use them, you would need to replace the list of source files at the bottom (under  "Project Files"), and a few other lines, such as "name=your_project_name", possibly the linker command file (see "linkerCommandFile=xxx" and the output files listed in "postBuildStep=".

    (I had to rename the files as .txt files. Just change .txt to .projectspec. Once they have been updated for your code, go to CCS Project->Import CCS Projects, and browse to them. Then import.  It will probably take multiple attempts to get your list of files right as they are specified relative to where the projectspec file is)

    oddemo_16xx_mss.txt
    <?xml version="1.0" encoding="UTF-8"?>
    
    <projectSpec>
        <project
            name="oddemo_16xx_mss"
            deviceFamily="ARM"
            isTargetManual="false"
            device="Cortex R.IWR1642"
            endianness="little"
            cgtVersion="16.9.6.LTS"
            connection="common/targetdb/connections/TIXDS110_Connection.xml"
            toolChain="TI"
            linkerCommandFile="mss_mmw_linker.cmd"
            preannouncebuildStep="Deleting old BIN format image"
            preBuildStep="rm -f ${PROJECT_ROOT}/${ProjName}.bin;"
            postannouncebuildStep="Preparing BIN format image"
            postBuildStep="${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/xwr16xx/out2rprc/out2rprc.exe ${ProjName}.xer4f ${ProjName}.bin;${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/xwr16xx/multicore_image_generator/MulticoreImageGen.exe LE 37 0x01000005 oddemo_16xx.bin 0x35510000 ${ProjName}.bin 0xb5510000 ${COM_TI_MMWAVE_SDK_INSTALL_DIR}/firmware/radarss/xwr16xx_radarss_rprc.bin 0xd5510000 ${WORKSPACE_LOC}/oddemo_16xx_dss/Debug/oddemo_16xx_dss.bin;${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/xwr16xx/crc_multicore_image/crc_multicore_image.exe oddemo_16xx.bin oddemo_16xx.bin.tmp; ${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/append_bin_crc/gen_bincrc32.exe oddemo_16xx.bin;"
            description="Occupancy Detection mss"
            launchWizard="false"
            configurations="Debug, Release"
            compilerBuildOptions="
            -mv7R4 --code_state=16 --float_support=VFPv3D16 -me -O3
            -I${PROJECT_ROOT}
            -I${CG_TOOL_ROOT}/include
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages
            -D${COM_TI_MMWAVE_SDK_SYMBOLS}
            -D_LITTLE_ENDIAN
            -D${BIOS_SYMBOLS}
            -DSOC_XWR16XX
            -DSUBSYS_MSS
            -DDOWNLOAD_FROM_CCS
            -DMMWAVE_L3RAM_SIZE=0x40000
            -DDebugP_ASSERT_ENABLED
            -g --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --enum_type=int --c99 --abi=eabi"
            linkerBuildOptions="
            -m${ProjName}.map -o${ProjName}.xer4f
            -I${COM_TI_MMWAVE_SDK_LIBRARY_PATH}
            -I${CG_TOOL_ROOT}/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/control/mmwave/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/control/mmwavelink/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/crc/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/esm/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/gpio/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/osal/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/pinmux/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/mailbox/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/dma/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/soc/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/uart/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/utils/cli/lib
            -llibosal_xwr16xx.aer4f
            -llibesm_xwr16xx.aer4f
            -llibgpio_xwr16xx.aer4f
            -llibsoc_xwr16xx.aer4f
            -llibmailbox_xwr16xx.aer4f
            -llibpinmux_xwr16xx.aer4f
            -llibcrc_xwr16xx.aer4f
            -llibDMA_xwr16xx.aer4f
            -llibuart_xwr16xx.aer4f
            -llibmmwavelink_xwr16xx.aer4f
            -llibmmwave_xwr16xx.aer4f
            -llibcli_xwr16xx.aer4f
            --reread_libs --diag_warning=225 --diag_wrap=off --display_error_number --warn_sections --xml_link_info=${ProjName}.xml --rom_model --unused_section_elimination=on --disable_auto_rts -lrtsv7R4_T_le_v3D16_eabi.lib">
    
            <!-- Project properties -->
            <property name="type" value="rtsc"/>
            <property name="products" value="com.ti.rtsc.SYSBIOS:6.53.02.00;com.ti.MMWAVE_SDK:1.2.0.05;"/>
            <property name="xdcToolsVersion" value="3.50.04.43_core"/>
            <property name="target" value="ti.targets.arm.elf.R4F"/>
            <property name="platform" value="ti.platforms.cortexR:IWR16XX:false:200"/>
            <property name="output_format" value="elf"/>
            <property name="buildProfile" value="debug"/>
    
            <property name="configuroOptions" value="--compileOptions &quot;--enum_type=int &quot; "/>
    
            <!-- Project files -->
            <file path="mss/mss_main.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="mss/mss_mmw.cfg" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="mss/mss_mmw.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="mss/cli.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="common/oddemo_common.h" targetDirectory="common" openOnCreation="false" excludeFromBuild="false" action="copy" />
            <file path="common/mmw_messages.h" targetDirectory="common" openOnCreation="false" excludeFromBuild="false" action="copy" />
            <file path="common/mmw_config.h" targetDirectory="common" openOnCreation="false" excludeFromBuild="false" action="copy" />
            <file path="common/mmw_output.h" targetDirectory="common" openOnCreation="false" excludeFromBuild="false" action="copy" />
            <file path="mss/mss_mmw_linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="mss/r4f_linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy"/>
    
        </project>
    </projectSpec>
    

    oddemo_16xx_dss.txt
    <?xml version="1.0" encoding="UTF-8"?>
    
    <projectSpec>
        <project
            name="oddemo_16xx_dss"
            deviceFamily="C6000"
            isTargetManual="false"
            device="AWR1642"
            cgtVersion="8.1.3"
            connection="common/targetdb/connections/TIXDS110_Connection.xml"
            toolChain="TI"
            linkerCommandFile="dss_mmw_linker.cmd"
            preannouncebuildStep="Deleting old BIN format image"
            preBuildStep="rm -f ${PROJECT_ROOT}/${ProjName}.bin;"
            postannouncebuildStep="Preparing BIN format image"
            postBuildStep="${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/xwr16xx/out2rprc/out2rprc.exe ${ProjName}.xe674 ${ProjName}.bin"
            description="Occupancy Detection dss"
            launchWizard="false"
            configurations="Debug, Release"
            compilerBuildOptions="
            -mv6740 -mo -O3
            -I${PROJECT_ROOT}
            -I${CG_TOOL_ROOT}/include
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages
            -I${TI_MATHLIB_BASE}/packages
            -I${TI_DSPLIB_BASE}/packages/ti/dsplib/src/DSP_fft16x16/c64P
            -I${TI_DSPLIB_BASE}/packages/ti/dsplib/src/DSP_fft32x32/c64P
            -DSOC_XWR16XX
            -DSUBSYS_DSS
            -DDOWNLOAD_FROM_CCS
            -DDebugP_ASSERT_ENABLED
            --gcc -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --obj_extension .oe674"
            linkerBuildOptions="
            -m${ProjName}.map -o${ProjName}.xe674
            -I${PROJECT_ROOT}
            -I${CG_TOOL_ROOT}/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/control/mmwave/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/control/mmwavelink/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/alg/mmwavelib/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/crc/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/mailbox/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/soc/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/osal/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/uart/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/edma/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/adcbuf/lib
            -I${TI_DSPLIB_BASE}/packages/ti/dsplib/lib
            -I${TI_MATHLIB_BASE}/packages/ti/mathlib/lib
            -ldsplib.lib
            -lmathlib.ae674
            -llibsoc_xwr16xx.ae674
            -llibosal_xwr16xx.ae674
            -llibcrc_xwr16xx.ae674
            -llibuart_xwr16xx.ae674
            -llibmailbox_xwr16xx.ae674
            -llibmmwavelink_xwr16xx.ae674
            -llibmmwave_xwr16xx.ae674
            -llibedma_xwr16xx.ae674
            -llibadcbuf_xwr16xx.ae674
            -llibmmwavealg_xwr16xx.ae674
            --reread_libs --diag_warning=225 --diag_wrap=off --display_error_number --warn_sections
            --xml_link_info=xwr16xx_${ProjName}_linkInfo.xml --ram_model --unused_section_elimination=on --disable_auto_rts -lrts6740_elf.lib">
    
            <!-- Project properties -->
            <property name="type" value="rtsc"/>
            <property name="products" value="com.ti.rtsc.SYSBIOS:6.53.02.00;com.ti.MMWAVE_SDK:1.2.0.05;"/>
            <property name="xdcToolsVersion" value="3.50.04.43_core"/>
            <property name="target" value="ti.targets.elf.C674"/>
            <property name="platform" value="ti.platforms.c6x:AWR16XX:false:600"/>
            <property name="endianness" value="little"/>
            <property name="output_format" value="elf"/>
            <property name="buildProfile" value="debug"/>
            <pathVariable name="TI_DSPLIB_BASE" path="C:/ti/dsplib_c64Px_3_4_0_0" scope="project"/>
            <pathVariable name="TI_MATHLIB_BASE" path="C:/ti/mathlib_c674x_3_1_2_1" scope="project"/>
    
            <!-- Project files -->
            <file path="dss/cplx_types.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/dss_config_edma_util.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/dss_config_edma_util.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/dss_data_path.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/dss_data_path.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/dss_main.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/dss_mmw.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/dss_resources.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/oddemo_heatmap.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/oddemo_heatmap.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/oddemo_feature.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/oddemo_feature.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/oddemo_decision.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/oddemo_decision.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/dss_mmw.cfg" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/radar_c674x.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/xwr16xx_cache.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/xwr16xx_cache.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="dss/dss_mmw_linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="common/oddemo_common.h" targetDirectory="common" openOnCreation="false" excludeFromBuild="false" action="copy" />
            <file path="common/mmw_messages.h" targetDirectory="common" openOnCreation="false" excludeFromBuild="false" action="copy" />
            <file path="common/mmw_config.h" targetDirectory="common" openOnCreation="false" excludeFromBuild="false" action="copy" />
            <file path="common/mmw_output.h" targetDirectory="common" openOnCreation="false" excludeFromBuild="false" action="copy" />
            <file path="dss/c674x_linker.cmd" openOnCreation="false" excludeFromBuild="false"/>
    
        </project>
    </projectSpec>