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/IWR1642BOOST: Add lvds strem function failed with occupancy_detection demo .

Part Number: IWR1642BOOST

Tool/software: Code Composer Studio

Hello experts, 

we're working on the lab0003_occupancy_detection_ES2.0 ccs project based on SDK2.0.0.4 . We'd like to caputure the lvds data from the 60-pin interface meanwhile the mss output the heatmap data via uart .

so we modify the ccs project settings and add "dss_lvds_stream.c" and "dss_lvds_stream.h" files into the ccs project .

however we got "error #10099-D: program will not fit into available memory.  run placement with alignment fails for section ".cio" size 0x127" shown below 

then we redit "dss_mmw_linker.cmd" file 

/*----------------------------------------------------------------------------*/
/* Linker Settings                                                            */
--retain="*(.intvecs)"

--stack_size=0x500

/* Get around a CCS issue; re-specify libraries ref'd in the overlays below. */
-ldsplib.ae64P
-llibmmwavealg_xwr16xx.ae674
-lmathlib.ae674
-llibsoc_xwr16xx.ae674

 /* simon added 2019.07.30*/
-llibcbuff_xwr16xx.ae674
-llibhsiheader_xwr16xx.ae674
-llibmailbox_xwr16xx.ae674
-llibedma_xwr16xx.ae674

/*----------------------------------------------------------------------------*/
/* Section Configuration                                                      */
SECTIONS
{
    systemHeap : {} >> L2SRAM_UMAP0 | L2SRAM_UMAP1
    .l2data : {} >> L2SRAM_UMAP0 | L2SRAM_UMAP1

    /* HSSRAM has output data from processing chain running on DSP */
    .demoSharedMem > HSRAM

    /* L3SRAM has code that is overlaid with data, so data must be
       marked uninitialized. Application can initialize this section
       using _L3data_* symbols defined below. Code should be written carefully as
       these are linker symbols (see for example e2e.ti.com/.../92002 ):

        extern far uint8_t _L3data_start; // the type here does not matter
        extern far uint8_t _L3data_size;  // the type here does not matter

        memset((void *)_symval(&_L3data_start), 0, (uint32_t) _symval(&_L3data_size));
    */
    .l3data: type=NOINIT, start(_L3data_start), size(_L3data_size), load=L3SRAM PAGE 1

    /* Bootloader cannot load L1DSRAM, make sure to mark as NOINIT */
    .l1data : type=NOINIT, load=L1DSRAM

    /* Currently bootloader does not allow loading in L1PSRAM because of supporting
       low power. Below fast code is loaded in L3SRAM but run from L1PSRAM. The copy-in
       is called during initialization phase and copy-out is not used but can be added when
       supporting low-power mode (where L1 contents are not retained).
     */
    .fastCode:
    {
        dsplib.ae64P(.text)
        libmmwavealg_xwr16xx.ae674(.text)
        mathlib.ae674(.text)
        dss_data_path.oe674 (.text:MmwDemo_interFrameProcessing)
        dss_data_path.oe674 (.text:MmwDemo_processChirp)
        dss_data_path.oe674 (.text:MmwDemo_interChirpProcessing)
        dss_main.oe674 (.text:MmwDemo_dssDataPathProcessEvents)
        /* Below may be risky to expose hence currently hiding */
        // libosal_xwr16xx.ae674 (.text:SemaphoreP_pend)
        // libosal_xwr16xx.ae674 (.text:SemaphoreP_post)
    } load=L3SRAM PAGE 0, run=L1PSRAM PAGE 0, table(_MmwDemo_fastCode_L1PSRAM_copy_table, compression=off)

    /* This is auto generated by linker related to copy table above */
    .ovly > L2SRAM_UMAP0 | L2SRAM_UMAP1

    /* Overlay one-time/init-time (and non-critical in cycles) with L3 data,
       will be erased during data path processing. Note do not put any
       code that is required related to start/stop/reconfig processing */
    .overlay:
    {
        libsoc_xwr16xx.ae674 (.text:SOC_init)
        dss_main.oe674 (.text:MmwDemo_dssInitTask)
        dss_main.oe674 (.text:main)
        dss_data_path.oe674 (.text:MmwDemo_dataPathInitEdma)

        dss_data_path.oe674 (.text:MmwDemo_dataPathConfigBuffers)
        dss_data_path.oe674 (.text:MmwDemo_dataPathConfigEdma)

        dss_lvds_stream.oe674 (.text:MmwDemo_LVDSStream_EDMAInit)
        dss_lvds_stream.oe674 (.text:MmwDemo_LVDSStreamInit)

        /* simon added 2019.07.30*/
        libcbuff_xwr16xx.ae674 (.text:CBUFF_setupNonInterleaved_MultiChirp_CP_ADC)
        libcbuff_xwr16xx.ae674 (.text:CBUFF_setupNonInterleaved_MultiChirp_ADC_CP)
        libcbuff_xwr16xx.ae674 (.text:CBUFF_setupNonInterleaved_MultiChirp_CP_ADC_CQ)
        libcbuff_xwr16xx.ae674 (.text:CBUFF_setupNonInterleaved_MultiChirp_CP_ADC_CQ_USER)
        libcbuff_xwr16xx.ae674 (.text:CBUFF_init)
        libcbuff_xwr16xx.ae674 (.text:CBUFF_deinit)
        libcbuff_xwr16xx.ae674 (.text:CBUFF_initLVDS)

        libhsiheader_xwr16xx.ae674 (.text:HSIHeader_init)
        libhsiheader_xwr16xx.ae674 (.text:HSIHeader_deleteHeader)

        libmailbox_xwr16xx.ae674 (.text:Mailbox_open)

        libedma_xwr16xx.ae674 (.text:EDMA_open)
        libedma_xwr16xx.ae674 (.text:EDMA_init)
        libedma_xwr16xx.ae674 (.text:EDMA3Init)

    } > L3SRAM PAGE 0

}
/*----------------------------------------------------------------------------*/

after this , we got "Error CBUFF_init faild with [Error -2901]"  means  Invalid argument and we find that initCfg.socHandle  can not get value from gMmwDssMCB.socHandle .but we don't have any ideal what cause this problem.

Is that possible that "dss_mmw_linker.cmd" modify caused the problem?

Do you have any advices ?

Regards,

Simon

  • Simon,

    Since the amount of code that the linker was unable to allocated was 0x127, you should try lower the "speed vs. size" optimization level down and see if the linker for the C6000 is able to run correctly with these settings. This is a relatively small amount of code that is missing allocation.

    Regards,

    Kyle

  • Hi Kyle , thanks for your reply . 

    I have tried to modify the optimization level  but it seems that it doesn't work . I still got the same error "Error: CBUFF_init failed with [Error=-2901]  Error: MMWDemoDSS LVDS stream init failed with Error[-1]"

    Regards,

    Simon

  • Simon,

    Since you are using a lab from the TI Resource Explorer, let's make a few changes to the .projectspec file for the DSS project of the Occupancy Detection Lab. 

    Since you are looking to include the CBUFF drivers for LVDS, let's make the following change in the "linkerBuildOptions" section

    -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/cbuff/lib
    -llibcbuff_xwr16xx.ae674
    This will tell the linker that you are including the cbuff driver and where this file is located.
    Now since you are making some specific changes as to where some of the initialization functions are being allocated, you should keep the following line included at the top of the dss_mmw_linker.cmd file.
    -llibcbuff_xwr16xx.ae674
    You will need to repeat this process for any additional drivers that you want to include in your custom project. It is easiest to make these changes to the .projectspec file and then import the lab into CCS.
    Regards,
    Kyle
  • Kyle,

    All these changes you mentioned above  have been made before. 

    And we also modify some source code files like 

    /* MMWAVE Demo Include Files */
    #include "./common/mmw_messages.h"
    #include "./dss_mmw.h"
    #include "dss_lvds_stream.h"   
    ...
    ...
    ...
     /* Initialize LVDS streaming components */
    #ifdef 1 //TODO: OD DEMO: LVDS  used for my project
        if ((errCode = MmwDemo_LVDSStreamInit()) < 0 )
        {
            System_printf ("Error: MMWDemoDSS LVDS stream init failed with Error[%d]\n",errCode);
            return;
        }
    #endif
    ...
    ...
    ...

    but unfortunately ,the error is still there .

    here are  the "oddemo_16xx_dss.map" and rebuild log file , hope it'll help to  reproduce the error .

    oddemo_16xx_dss_files.zip

    Regards,

    Simon

  • Simon,

    I would recommend making these changes in the actual .projectspec file and not making them in Code Composer Studio.

    On a related note, I see from you error log that you are using CCS version 9. We have been seeing issues using CCS version 9 with our mmWave devices. The recommendation is to use either version 7 or version 8. I am currently using version 8.3.1.

    Regards,
    Kyle

  • Hi Kyle,

    Thank you for your reply . I'm working on that .Besides can you provide some debug tips for mmWaveRadar in CCS ?

    Regards,
    Simon

  • Kyle,

    I have followed your recommendation but it still can't fix the issues .For reference , I'll attach the whole project for you.oddemo_16xx_ES2.0.zip

    Thank you.
    Simon

  • Simon,

    Having made several attempts at a solution based on the code you provided, what I would recommend is moving to SDK v3.2 and base your application off of the Out-of-Box (OOB) Demo. The OOB Demo has LVDS streaming, both HW and SW data sessions, built into the demo. From this standpoint, the effort is now focused on deploying your specific application and not on how to integrate the LVDS functionality. The OOB Demo is SDK v3.2 also has documentation specifically for LVDS streaming.

    You can find this Doxygen at this file location when you install SDK v3.2:  C:/ti/mmwave_sdk_03_02_00_04/packages/ti/demo/xwr16xx/mmw/docs/doxygen/html/index.html

    Specially, refer to the "Streaming data over LVDS" section

    Regards,
    Kyle