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/IWR6843ISK-ODS: How to print out the log via UART port in DSS application?

Part Number: IWR6843ISK-ODS
Other Parts Discussed in Thread: SYSBIOS, MATHLIB, IWR6843, MMWAVEICBOOST, IWR6843ISK, IWR1642

Tool/software: Code Composer Studio

Hi,

 

  I follow the link to add CLI_write() in DSS application and try to print the log to UART port. It fails to compile due to the memory is not available.  Can you please help to check this error?

 

https://e2e.ti.com/support/sensors/f/1023/t/653197

 

==========================================================================================================

 

**** Clean-only build of configuration Debug for project ods_pplcount_dss_68xx ****

 

"I:\\ti\\ccs830\\ccsv8\\utils\\bin\\gmake" -k -j 4 clean -O

 

DEL /F  "ods_pplcount_dss_68xx.hex"  "configPkg\linker.cmd" "configPkg\compiler.opt"  "ods_pplcount_dss_68xx.xe674"

DEL /F "dss_config_edma_util.oe674" "dss_data_path.oe674" "dss_main.oe674" "gen_twiddle_fft16x16.oe674" "gen_twiddle_fft32x32.oe674" "rx_ch_bias_measure.oe674"

DEL /F "dss_config_edma_util.d" "dss_data_path.d" "dss_main.d" "gen_twiddle_fft16x16.d" "gen_twiddle_fft32x32.d" "rx_ch_bias_measure.d"

RMDIR /S/Q  "configPkg\"

找不到 I:\ti\workspace_v8\ods_pplcount_dss_68xx\Debug\ods_pplcount_dss_68xx.hex

找不到 I:\ti\workspace_v8\ods_pplcount_dss_68xx\Debug\ods_pplcount_dss_68xx.xe674

Finished clean

 

 

**** Build Finished ****

 

**** Build of configuration Debug for project ods_pplcount_dss_68xx ****

 

"I:\\ti\\ccs830\\ccsv8\\utils\\bin\\gmake" -k -j 4 all -O

 

rm -f I:/ti/workspace_v8/ods_pplcount_dss_68xx/ods_pplcount_dss_68xx.bin

makefile:190: recipe for target 'pre-build' failed

process_begin: CreateProcess(NULL, rm -f I:/ti/workspace_v8/ods_pplcount_dss_68xx/ods_pplcount_dss_68xx.bin, ...) failed.

make (e=2): 系統找不到指定的檔案。

 

gmake[1]: [pre-build] Error 2 (ignored)

 

Building file: "../dss_mmw.cfg"

Invoking: XDCtools

"I:/ti/xdctools_3_50_04_43_core/xs" --xdcpath="I:/ti/bios_6_53_02_00/packages;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C674 -p ti.platforms.c6x:IWR16XX:false:600 -r release -c "I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5" "../dss_mmw.cfg"

making package.mak (because of package.bld) ...

generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...

configuring dss_mmw.xe674 from package/cfg/dss_mmw_pe674.cfg ...

generating custom ti.sysbios library makefile ...

Starting build of library sources ...

making I:/ti/workspace_v8/ods_pplcount_dss_68xx/src/sysbios/sysbios.ae674 ...

gmake[1]: Entering directory `I:/ti/workspace_v8/ods_pplcount_dss_68xx/src/sysbios'

gmake[1]: Nothing to be done for `all'.

gmake[1]: Leaving directory `I:/ti/workspace_v8/ods_pplcount_dss_68xx/src/sysbios'

Build of libraries done.

cle674 package/cfg/dss_mmw_pe674.c ...

Finished building: "../dss_mmw.cfg"

 

Building file: "../gen_twiddle_fft16x16.c"

Invoking: C6000 Compiler

"I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/bin/cl6x" -mv6740 --abi=eabi -O3 -ms0 --include_path="I:/ti/workspace_v8/ods_pplcount_dss_68xx" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common/gtrack" --include_path="I:/ti/mmwave_sdk_03_01_01_02/packages" --include_path="C:/ti/mathlib_c674x_3_1_2_1/packages" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft16x16/c64P" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft32x32/c64P" --include_path="I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/include" --define=SOC_XWR68XX --define=SUBSYS_DSS --define=MMWAVE_L3RAM_NUM_BANK=6 --define=MMWAVE_SHMEM_TCMA_NUM_BANK=0 --define=MMWAVE_SHMEM_TCMB_NUM_BANK=0 --define=MMWAVE_SHMEM_BANK_SIZE=0x20000 --define=DOWNLOAD_FROM_CCS --define=_LITTLE_ENDIAN --define=DebugP_ASSERT_ENABLED -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --obj_extension=.oe674 --preproc_with_compile --preproc_dependency="gen_twiddle_fft16x16.d_raw" --cmd_file="configPkg/compiler.opt" "../gen_twiddle_fft16x16.c"

Finished building: "../gen_twiddle_fft16x16.c"

 

Building file: "../gen_twiddle_fft32x32.c"

Invoking: C6000 Compiler

"I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/bin/cl6x" -mv6740 --abi=eabi -O3 -ms0 --include_path="I:/ti/workspace_v8/ods_pplcount_dss_68xx" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common/gtrack" --include_path="I:/ti/mmwave_sdk_03_01_01_02/packages" --include_path="C:/ti/mathlib_c674x_3_1_2_1/packages" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft16x16/c64P" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft32x32/c64P" --include_path="I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/include" --define=SOC_XWR68XX --define=SUBSYS_DSS --define=MMWAVE_L3RAM_NUM_BANK=6 --define=MMWAVE_SHMEM_TCMA_NUM_BANK=0 --define=MMWAVE_SHMEM_TCMB_NUM_BANK=0 --define=MMWAVE_SHMEM_BANK_SIZE=0x20000 --define=DOWNLOAD_FROM_CCS --define=_LITTLE_ENDIAN --define=DebugP_ASSERT_ENABLED -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --obj_extension=.oe674 --preproc_with_compile --preproc_dependency="gen_twiddle_fft32x32.d_raw" --cmd_file="configPkg/compiler.opt" "../gen_twiddle_fft32x32.c"

Finished building: "../gen_twiddle_fft32x32.c"

 

Building file: "../dss_config_edma_util.c"

Invoking: C6000 Compiler

"I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/bin/cl6x" -mv6740 --abi=eabi -O3 -ms0 --include_path="I:/ti/workspace_v8/ods_pplcount_dss_68xx" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common/gtrack" --include_path="I:/ti/mmwave_sdk_03_01_01_02/packages" --include_path="C:/ti/mathlib_c674x_3_1_2_1/packages" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft16x16/c64P" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft32x32/c64P" --include_path="I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/include" --define=SOC_XWR68XX --define=SUBSYS_DSS --define=MMWAVE_L3RAM_NUM_BANK=6 --define=MMWAVE_SHMEM_TCMA_NUM_BANK=0 --define=MMWAVE_SHMEM_TCMB_NUM_BANK=0 --define=MMWAVE_SHMEM_BANK_SIZE=0x20000 --define=DOWNLOAD_FROM_CCS --define=_LITTLE_ENDIAN --define=DebugP_ASSERT_ENABLED -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --obj_extension=.oe674 --preproc_with_compile --preproc_dependency="dss_config_edma_util.d_raw" --cmd_file="configPkg/compiler.opt" "../dss_config_edma_util.c"

Finished building: "../dss_config_edma_util.c"

 

Building file: "../rx_ch_bias_measure.c"

Invoking: C6000 Compiler

"I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/bin/cl6x" -mv6740 --abi=eabi -O3 -ms0 --include_path="I:/ti/workspace_v8/ods_pplcount_dss_68xx" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common/gtrack" --include_path="I:/ti/mmwave_sdk_03_01_01_02/packages" --include_path="C:/ti/mathlib_c674x_3_1_2_1/packages" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft16x16/c64P" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft32x32/c64P" --include_path="I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/include" --define=SOC_XWR68XX --define=SUBSYS_DSS --define=MMWAVE_L3RAM_NUM_BANK=6 --define=MMWAVE_SHMEM_TCMA_NUM_BANK=0 --define=MMWAVE_SHMEM_TCMB_NUM_BANK=0 --define=MMWAVE_SHMEM_BANK_SIZE=0x20000 --define=DOWNLOAD_FROM_CCS --define=_LITTLE_ENDIAN --define=DebugP_ASSERT_ENABLED -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --obj_extension=.oe674 --preproc_with_compile --preproc_dependency="rx_ch_bias_measure.d_raw" --cmd_file="configPkg/compiler.opt" "../rx_ch_bias_measure.c"

Finished building: "../rx_ch_bias_measure.c"

 

Building file: "../dss_main.c"

Invoking: C6000 Compiler

"I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/bin/cl6x" -mv6740 --abi=eabi -O3 -ms0 --include_path="I:/ti/workspace_v8/ods_pplcount_dss_68xx" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common/gtrack" --include_path="I:/ti/mmwave_sdk_03_01_01_02/packages" --include_path="C:/ti/mathlib_c674x_3_1_2_1/packages" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft16x16/c64P" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft32x32/c64P" --include_path="I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/include" --define=SOC_XWR68XX --define=SUBSYS_DSS --define=MMWAVE_L3RAM_NUM_BANK=6 --define=MMWAVE_SHMEM_TCMA_NUM_BANK=0 --define=MMWAVE_SHMEM_TCMB_NUM_BANK=0 --define=MMWAVE_SHMEM_BANK_SIZE=0x20000 --define=DOWNLOAD_FROM_CCS --define=_LITTLE_ENDIAN --define=DebugP_ASSERT_ENABLED -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --obj_extension=.oe674 --preproc_with_compile --preproc_dependency="dss_main.d_raw" --cmd_file="configPkg/compiler.opt" "../dss_main.c"

Finished building: "../dss_main.c"

 

Building file: "../dss_data_path.c"

Invoking: C6000 Compiler

"I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/bin/cl6x" -mv6740 --abi=eabi -O3 -ms0 --include_path="I:/ti/workspace_v8/ods_pplcount_dss_68xx" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common" --include_path="I:/ti/mmwave_industrial_toolbox_3_3_0/labs/lab0020_pplcount_Overhead/src/common/gtrack" --include_path="I:/ti/mmwave_sdk_03_01_01_02/packages" --include_path="C:/ti/mathlib_c674x_3_1_2_1/packages" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft16x16/c64P" --include_path="C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/src/DSP_fft32x32/c64P" --include_path="I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/include" --define=SOC_XWR68XX --define=SUBSYS_DSS --define=MMWAVE_L3RAM_NUM_BANK=6 --define=MMWAVE_SHMEM_TCMA_NUM_BANK=0 --define=MMWAVE_SHMEM_TCMB_NUM_BANK=0 --define=MMWAVE_SHMEM_BANK_SIZE=0x20000 --define=DOWNLOAD_FROM_CCS --define=_LITTLE_ENDIAN --define=DebugP_ASSERT_ENABLED -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --obj_extension=.oe674 --preproc_with_compile --preproc_dependency="dss_data_path.d_raw" --cmd_file="configPkg/compiler.opt" "../dss_data_path.c"

"../dss_data_path.c", line 2726: warning #179-D: variable "txOrder" was declared but never referenced

"../dss_data_path.c", line 4236: warning #552-D: variable "firstMaxVal" was set but never used

"../dss_data_path.c", line 2649: warning #179-D: function "MmwDemo_rxChanPhaseBiasCompensationAzimElev" was declared but never referenced

Finished building: "../dss_data_path.c"

 

Building target: "ods_pplcount_dss_68xx.xe674"

Invoking: C6000 Linker

"I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/bin/cl6x" -mv6740 --abi=eabi -O3 -ms0 --define=SOC_XWR68XX --define=SUBSYS_DSS --define=MMWAVE_L3RAM_NUM_BANK=6 --define=MMWAVE_SHMEM_TCMA_NUM_BANK=0 --define=MMWAVE_SHMEM_TCMB_NUM_BANK=0 --define=MMWAVE_SHMEM_BANK_SIZE=0x20000 --define=DOWNLOAD_FROM_CCS --define=_LITTLE_ENDIAN --define=DebugP_ASSERT_ENABLED -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --obj_extension=.oe674 -z -m"ods_pplcount_dss_68xx.map" --heap_size=0x800 --stack_size=0x800 -i"I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/lib" -i"I:/ti/workspace_v8/ods_pplcount_dss_68xx" -i"I:/ti/mmwave_sdk_03_01_01_02/packages/ti/control/mmwave/lib" -i"I:/ti/mmwave_sdk_03_01_01_02/packages/ti/control/mmwavelink/lib" -i"I:/ti/mmwave_sdk_03_01_01_02/packages/ti/drivers/crc/lib" -i"I:/ti/mmwave_sdk_03_01_01_02/packages/ti/drivers/mailbox/lib" -i"I:/ti/mmwave_sdk_03_01_01_02/packages/ti/drivers/osal/lib" -i"I:/ti/mmwave_sdk_03_01_01_02/packages/ti/drivers/soc/lib" -i"I:/ti/mmwave_sdk_03_01_01_02/packages/ti/drivers/uart/lib" -i"I:/ti/mmwave_sdk_03_01_01_02/packages/ti/drivers/edma/lib" -i"I:/ti/mmwave_sdk_03_01_01_02/packages/ti/drivers/adcbuf/lib" -i"I:/ti/mmwave_sdk_03_01_01_02/packages/ti/alg/mmwavelib/lib" -i"C:/ti/dsplib_c64Px_3_4_0_0/packages/ti/dsplib/lib" -i"C:/ti/mathlib_c674x_3_1_2_1/packages/ti/mathlib/lib" -i"I:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-c6000_8.2.5/include" --reread_libs --disable_auto_rts --diag_warning=225 --diag_wrap=off --display_error_number --warn_sections --xml_link_info="xwr16xx_mmw_dss_linkInfo.xml" --ram_model --unused_section_elimination=on -o "ods_pplcount_dss_68xx.xe674" "./dss_config_edma_util.oe674" "./dss_data_path.oe674" "./dss_main.oe674" "./gen_twiddle_fft16x16.oe674" "./gen_twiddle_fft32x32.oe674" "./rx_ch_bias_measure.oe674" "../c674x_linker.cmd" "../dss_mmw_linker.cmd" -l"configPkg/linker.cmd" -llibosal_xwr16xx.ae674 -llibsoc_xwr16xx.ae674 -llibcrc_xwr16xx.ae674 -llibuart_xwr16xx.ae674 -llibmailbox_xwr16xx.ae674 -llibmmwavelink_xwr16xx.ae674 -llibmmwave_xwr16xx.ae674 -lmathlib.ae674 -ldsplib.ae64P -llibedma_xwr16xx.ae674 -llibadcbuf_xwr16xx.ae674 -llibmmwavealg_xwr16xx.ae674 -lrts6740_elf.lib -llibc.a

<Linking>

"../dss_mmw_linker.cmd", line 48: warning #10068-D: no matching section

"../c674x_linker.cmd", line 87: error #10099-D: program will not fit into available memory.  placement with alignment fails for section ".switch" size 0x1e4 .  Available memory ranges:

   L2SRAM_UMAP0   size: 0x20000      unused: 0x20         max hole: 0x7      

   L2SRAM_UMAP1   size: 0x20000      unused: 0x0          max hole: 0x0      

"../c674x_linker.cmd", line 93: error #10099-D: program will not fit into available memory.  placement with alignment fails for section ".neardata" size 0x14 .  Available memory ranges:

   L2SRAM_UMAP0   size: 0x20000      unused: 0x20         max hole: 0x7      

   L2SRAM_UMAP1   size: 0x20000      unused: 0x0          max hole: 0x0      

"../c674x_linker.cmd", line 88: error #10099-D: program will not fit into available memory.  run placement with alignment fails for section ".cio" size 0x127 .  Available memory ranges:

   L2SRAM_UMAP0   size: 0x20000      unused: 0x20         max hole: 0x7      

   L2SRAM_UMAP1   size: 0x20000      unused: 0x0          max hole: 0x0      

warning #10370-D: Possible codesize or performance degradation. Section ".text:MmwDemo_interFrameProcessing:dss_data_path.oe674" has calls to rts routines, but rts is placed out of range from call site at 0xe01440, or in a different section. To optimize codesize, either 1) place rts closer to call site, or 2) place rts in same section, or 3) compile with --disable_push_pop.

warning #10370-D: Possible codesize or performance degradation. Section ".text:MmwDemo_interFrameProcessing:dss_data_path.oe674" has calls to rts routines, but rts is placed out of range from call site at 0xe026b8, or in a different section. To optimize codesize, either 1) place rts closer to call site, or 2) place rts in same section, or 3) compile with --disable_push_pop.

warning #10370-D: Possible codesize or performance degradation. Section ".text:SOC_init:libsoc_xwr16xx.ae674<soc.oe674>" has calls to rts routines, but rts is placed out of range from call site at 0x20002fb0, or in a different section. To optimize codesize, either 1) place rts closer to call site, or 2) place rts in same section, or 3) compile with --disable_push_pop.

warning #10370-D: Possible codesize or performance degradation. Section ".text:SOC_init:libsoc_xwr16xx.ae674<soc.oe674>" has calls to rts routines, but rts is placed out of range from call site at 0x20002ea0, or in a different section. To optimize codesize, either 1) place rts closer to call site, or 2) place rts in same section, or 3) compile with --disable_push_pop.

"../dss_mmw_linker.cmd", line 58: error #10099-D: program will not fit into available memory.  placement with alignment fails for section ".ovly" size 0x10 .  Available memory ranges:

   L2SRAM_UMAP0   size: 0x20000      unused: 0xf          max hole: 0x7      

   L2SRAM_UMAP1   size: 0x20000      unused: 0x0          max hole: 0x0      

error #10010: errors encountered during linking; "ods_pplcount_dss_68xx.xe674" not built

 

>> Compilation failure

makefile:165: recipe for target 'ods_pplcount_dss_68xx.xe674' failed

gmake[2]: *** [ods_pplcount_dss_68xx.xe674] Error 1

makefile:161: recipe for target 'main-build' failed

gmake[1]: *** [main-build] Error 2

makefile:156: recipe for target 'all' failed

gmake: *** [all] Error 2

 

**** Build Finished ****

  • Hi Bruce,

    The DSS logger UART is not connected to the XDS110 JTAG emulator chip (which also brings out the UART ports over USB) and so is not available on the IWR6843 EVM (MMWAVEICBOOST + IWR6843ISK). Any messages from DSS need to be sent to the MSS using mailbox write as shown below. The MSS outputs the data on the MSS data logger UART.

    Please look at the IWR1642 Out of box demo in MMWAVE SDK 2.1.0.4. The DSP sends the detected object list to the MSS.

    DSS side code:

    File: dss_main.c, function: MmwDemo_dssSendProcessOutputToMSS

    MmwDemo_dssSendProcessOutputToMSS()

    {

    ...

    ...

            if (MmwDemo_mboxWrite(&message) != 0)

            {

                retVal = -1;

            }

    }

    MSS side code:

    File: mss_main.c, function: MmwDemo_mboxReadTask()


    static void MmwDemo_mboxReadTask(UArg arg0, UArg arg1)

    {

    ...

    case MMWDEMO_DSS2MSS_DETOBJ_READY:

    call to UART_writePolling to send the data out on UART.

    }

    Please mark this thread resolved if your question was answered.

    Regards

    -Nitin

    MmwDemo_dssSendProcessOutputToMSS

  • Hi Nitin,

      I follow your suggestion to add these source code. But I still met the same error. The code will cause the build error. Can you please help to check it?

    static void DssSendLogToMSS(const char* format, ...){
        va_list     arg;
        char        logMessage[256];
        int32_t     sizeMessage;
    
        /* Format the message: */
        va_start (arg, format);
        sizeMessage = vsnprintf (&logMessage[0], sizeof(logMessage), format, arg);
        va_end (arg);
    }

    Thanks.

    C.W.

  • Hi Nitin,
    Do you have any suggestions about above question?

    Thanks.
  • Hi Bruce,

    1. As mentioned in my original response, you are not supposed to use CLI_write on DSS but the code snippet you shared above is from CLI_write in cli.c so I'm not sure if you followed my response correctly. Could you share the steps and modifications/additions you made to the code with pseudo-code for each file you changed?

    2. As for the linking errors / memory related problem, please provide the generated .map file for the DSS project so that I can look into the memory related issue and provide some suggestions to free up space.

    Regards
    -Nitin
  • Hi Quentin,

    Sorry for the delayed response.

    MmwDemo_CfgUpdate() stores (memcpy) the configuration parsed by the CLI handler function, in the appropriate global structures in gMmwMssMCB. The stored configuration is later applied by the _config (e.g. DPU_RangeProcHWA_config) or _control (DPU_RangeProcHWA_control) function of the corresponding DPU, depending upon whether it is init time config or runtime config (init time config is applied by _config functions and runtime config updates are applied by _control functions).

    Please refer to the 3.x mmWave SDK user guide to understand the scale-able architecture and related concepts like DPUs, DPC, DPM etc.

    Once you've understood the scale-able architecture, please look at the System Execution Flow diagram to develop an understanding of the control flow.

    C:/ti/mmwave_sdk_03_01_01_02/packages/ti/demo/xwr68xx/mmw/docs/doxygen/html/index.html

    Regards
    -Nitin
  • Hi Nitin,

    1.  I would like to package the log information into message and send it to MSS, so I add new structure "DssToMss_Log_Info" to message body. Provided the code snippet for your reference.

    Mmw_messages.h
    
    typedef struct DssToMss_Log_Info_t
    {
        char logMessage[256];
         int32_t size;
    } DssToMss_Log_Info;
    
    typedef enum MmwDemo_message_type_e 
    {
        /*! @brief   message types for MSS to DSS communication */
        MMWDEMO_MSS2DSS_GUIMON_CFG = 0xFEED0001,
        ...
        MMWDEMO_MSS2DSS_SNR_THRESHOLD,
    
        /*! @brief   message types for DSS to MSS communication */
        MMWDEMO_DSS2MSS_CONFIGDONE = 0xFEED0100,
        ...
        MMWDEMO_DSS2MSS_LOG_INFO
    }MmwDemo_message_type;
    
    
    typedef union MmwDemo_message_body_u 
    {
        /*! @brief   Gui Monitor Selection */
        MmwDemo_GuiMonSel     guiMonSel;
        ...
        DssToMss_Log_Info log;
    } MmwDemo_message_body;
    
    ==========================================
    
    dss_main.c
    
    static void DssSendLogToMSS(const char* format, ...){
        MmwDemo_message     message;
    
        va_list     arg;
        char        logMessage[256];
        int32_t     sizeMessage;
    
        /* Format the message: */
        va_start (arg, format);
        sizeMessage = vsnprintf (&logMessage[0], sizeof(logMessage), format, arg);
        va_end (arg);
    
        /* Clear message to MSS */
        memset((void *)&message, 0, sizeof(MmwDemo_message));
    
        message.type = MMWDEMO_DSS2MSS_LOG_INFO;
        memcpy((void *) &message.body.log.logMessage[0], (void *)logMessage, sizeMessage);
        message.body.log.size = sizeMessage;
     
        if (MmwDemo_mboxWrite(&message) != 0)
        {
            System_printf ("Error: Failed to send log to MSS.\n");
        }
    }

    2. I have attached the generated .map file.

    ods_pplcount_dss_68xx.zip

    Thanks.

    C.W.

  • Hi Nitin,

      Do you have any suggestions about the question?

    Thanks.

    C.W.

  • Hi C.W.,

    Please allow me a couple of days to look into it. I'll get back to you within this week.

    Regards
    -Nitin
  • Hi C.W.

    I merged your changes to the people counting DSS project and was able to reproduce the linking failure (I had to add a call to your function as well otherwise the compiler would optimize/remove it as a non-called function and would build OK. As expected, once I actually called the function, the linking failure appeared).

    I believe this is the offending piece of code in your function DssSendLogToMSS:

         /* Format the message: */
         va_start (arg, format);
         sizeMessage = vsnprintf (&logMessage[0], sizeof(logMessage), format, arg);
         va_end (arg);
    

    Calling the C string formatting functions (va_start, vsnprintf, va_end) seems to increase the code size causing the linking failure. Commenting these three lines allows the build to complete successfully. I would suggest you to copy a fixed format message to the log buffer instead of using the generic string formatting functions (which generally is not a good idea on a DSP system anyway from a processing time perspective).

    Regards

    -Nitin

  • Hi Nitin,
    How many bytes I can use in DSS part? It means the code size limitation. Using a fixed format message is not a good way for debugging. Is it possible to reduce the code size or adjust the memory map in DSS?

    Thanks.
  • Hi Nitin,
    Do you have any suggestions?

    Thanks.
    C.W.
  • Hi C.W.,

    Refer to the following linker command files to understand the available memory ranges:

    ...\lab0020_pplcount_Overhead\src\dss\c674x_linker.cmd (this file define the available memory ranges i.e. physical sections)

    ...\lab0020_pplcount_Overhead\src\dss\dss_mmw_linker.cmd (this file defines logical code sections and places them into the physical sections such as L3SRAM, L1PSRAM etc)

    Refer to the following resources to understand the linker command file and placement syntax:

    http://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html (Basic linker command file syntax)

    Advanced Linker Techniques for Convenient and Efficient Memory Usage (You will need to go through this to understand/modify the linker command files used in this demo)

    Once you have understood the linker command files and their usage in this lab, you can place your logging function and related objects (vsnprintf.obj) into L3SRAM. Note that you will need to reduce the the existing L3SRAM allocation which is all used for Radar Cube currently and create a separate section for your spillover code. This will not only reduce the available Radar cube memory but will affect cycle performance and may break the real-time processing of the demo. We do not recommend this and cannot support this if you face issues with real-time performance of the demo or due to reduced Radar cube memory.

    Regards

    -Nitin

  • Hi Nitin,

     The methods (sprintf,  snprintf , and so forth)  can't be used in DSS application due to the implementations are similar to below code. I can 't use these methods to transform the log format to fixed message. Do you have any suggestions?

        va_start (arg, format);
        sizeMessage = vsnprintf (&logMessage[0], sizeof(logMessage), format, arg);
        va_end (arg);

    Thanks.

    C.W.

  • Hi Nitin, can you re-concrete this step you wrote? Because there are many places that don't know how to operate, thank you
  • Hi Nitin,

      How to convert the int / float type to char array? Are there any methods like itoa() / ftoa() ?

    Thanks.

    C.W.

  • Hello,

    This question relates to the capabilities of the C compiler and not directly related to this discussion. You should post this question to the CCS forum or quickly check this by writing a small test program but I would assume that the TI toolchain (DSP and ARM) provide all standard C library functions (libc).

    Whether you can/should use them in the context of your application depends upon available memory and cycle efficiency concerns (e.g. printf, sprintf, vsnprintf etc. on DSP are generally not a good idea as string formatting takes a lot of cycles and can break the real-time timing requirements).

    In context f the people counting lab, with all the application code, there is not enough memory left to add vsnprintf as you saw and we have already provided you with the necessary tools (app notes, instructions) to free-up L3 memory at the expense of Radar Cube to create space for added code (along-with the caveats related to possible real-time processing violations). Please read those resources, understand the memory architecture and, add the extra functionality that you are looking for and evaluate).

    Thanks
    -Nitin