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.

AWR1642BOOST: HARD CODING AND STAND ALONE WORKING OF OUT_OF_BOX_DEMO IN AWR1642BOOST

Part Number: AWR1642BOOST
Other Parts Discussed in Thread: UNIFLASH

Hi Team,

I'm working on out of box demo in AWR1642BOOST . I've observed the output in mmWave Demo Visualizer. 

1) Now I want to hard code the project for stand alone working, how to do that?

I've already worked in SRR demo, and in that I've hard coded it by editing mss_srr_cli.c, so in  out of box demo in AWR1642BOOST is there something like that?

Thanks in advance

  • Hi Team, 

    I've already gone through this_link , in that ,  support engineer is guiding to edit cli.c file in mmwave_sdk_02_01_00_04\packages\ti\utils\cli\src directory, but how does it will affect the output, as we don't edit anything in the source file of out_of_box_demo?

    Please consider this also in your answer

    Thank you

  • Hi Nithin,

    Cli library will be used in the demo application. After modifying cli.c, the cli library should be built again to observe the changes. And you can refer to the same E2E thread to bypass the Cli. - AWR1642BOOST: Out of the Box demo firmware with new cfg file - Sensors forum - Sensors - TI E2E support forums

    Regards,

    Samhitha

  • Hi Samhitha, 

    Can you please go through my query once again, 

    1) i need to hard code the program , so that the system will start giving output as soon as i power it on , without running GUI

    2) This is the same thread i shared you in the above query, and i need a clear description that ,how the source code will reflect if i change the cli.c in mmwave sdk

    Thank You Samhitha for quick reply

  • Hi Samhitha,

    Happy to see you again, do you remember me, you've helped me in THIS  thread to solve the same issue. 

    void MmwDemo_CLIInit (uint8_t taskPriority)
    {
    CLI_Cfg cliCfg;
    char demoBanner[256];
    uint32_t cnt;

    /* Create Demo Banner to be printed out by CLI */
    sprintf(&demoBanner[0],
    "******************************************\n" \
    "xWR16xx MMW Demo %02d.%02d.%02d.%02d\n" \
    "******************************************\n",
    MMWAVE_SDK_VERSION_MAJOR,
    MMWAVE_SDK_VERSION_MINOR,
    MMWAVE_SDK_VERSION_BUGFIX,
    MMWAVE_SDK_VERSION_BUILD
    );

    /* Initialize the CLI configuration: */
    memset ((void *)&cliCfg, 0, sizeof(CLI_Cfg));

    /* Populate the CLI configuration: */
    cliCfg.cliPrompt = "mmwDemo:/>";
    cliCfg.cliBanner = demoBanner;
    cliCfg.cliUartHandle = gMmwMssMCB.commandUartHandle;
    cliCfg.taskPriority = taskPriority;
    cliCfg.socHandle = gMmwMssMCB.socHandle;
    cliCfg.mmWaveHandle = gMmwMssMCB.ctrlHandle;
    cliCfg.enableMMWaveExtension = 1U;
    cliCfg.usePolledMode = true;
    cliCfg.overridePlatform = false;
    cliCfg.overridePlatformString = NULL;

    cnt=0;
    cliCfg.tableEntry[cnt].cmd = "sensorStart";
    cliCfg.tableEntry[cnt].helpString = "[doReconfig(optional, default:enabled)]";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLISensorStart;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "sensorStop";
    cliCfg.tableEntry[cnt].helpString = "No arguments";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLISensorStop;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "guiMonitor";
    cliCfg.tableEntry[cnt].helpString = "<subFrameIdx> <detectedObjects> <logMagRange> <noiseProfile> <rangeAzimuthHeatMap> <rangeDopplerHeatMap> <statsInfo>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIGuiMonSel;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "cfarCfg";
    cliCfg.tableEntry[cnt].helpString = "<subFrameIdx> <procDirection> <averageMode> <winLen> <guardLen> <noiseDiv> <cyclicMode> <thresholdScale> <peakGroupingEn>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLICfarCfg;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "multiObjBeamForming";
    cliCfg.tableEntry[cnt].helpString = "<subFrameIdx> <enabled> <threshold>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIMultiObjBeamForming;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "calibDcRangeSig";
    cliCfg.tableEntry[cnt].helpString = "<subFrameIdx> <enabled> <negativeBinIdx> <positiveBinIdx> <numAvgFrames>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLICalibDcRangeSig;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "clutterRemoval";
    cliCfg.tableEntry[cnt].helpString = "<subFrameIdx> <enabled>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIClutterRemoval;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "adcbufCfg";
    cliCfg.tableEntry[cnt].helpString = "<subFrameIdx> <adcOutputFmt> <SampleSwap> <ChanInterleave> <ChirpThreshold>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIADCBufCfg;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "compRangeBiasAndRxChanPhase";
    cliCfg.tableEntry[cnt].helpString = "<rangeBias> <Re00> <Im00> <Re01> <Im01> <Re02> <Im02> <Re03> <Im03> <Re10> <Im10> <Re11> <Im11> <Re12> <Im12> <Re13> <Im13> ";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLICompRangeBiasAndRxChanPhaseCfg;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "measureRangeBiasAndRxChanPhase";
    cliCfg.tableEntry[cnt].helpString = "<enabled> <targetDistance> <searchWin>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIMeasureRangeBiasAndRxChanPhaseCfg;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "aoaFovCfg";
    cliCfg.tableEntry[cnt].helpString = "<subFrameIdx> <minAzimuthDeg> <maxAzimuthDeg> <minElevationDeg> <maxElevationDeg>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIAoAFovCfg;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "cfarFovCfg";
    cliCfg.tableEntry[cnt].helpString = "<subFrameIdx> <procDirection> <min (meters or m/s)> <max (meters or m/s)>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLICfarFovCfg;
    cnt++;
    cliCfg.tableEntry[cnt].cmd = "extendedMaxVelocity";
    cliCfg.tableEntry[cnt].helpString = "<subFrameIdx> <enabled>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIExtendedMaxVelocity;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "bpmCfg";
    cliCfg.tableEntry[cnt].helpString = "<subFrameIdx> <enabled> <chirp0Idx> <chirp1Idx>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIBpmCfg;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "CQRxSatMonitor";
    cliCfg.tableEntry[cnt].helpString = "<profile> <satMonSel> <priSliceDuration> <numSlices> <rxChanMask>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIChirpQualityRxSatMonCfg;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "CQSigImgMonitor";
    cliCfg.tableEntry[cnt].helpString = "<profile> <numSlices> <numSamplePerSlice>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIChirpQualitySigImgMonCfg;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "analogMonitor";
    cliCfg.tableEntry[cnt].helpString = "<rxSaturation> <sigImgBand>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIAnalogMonitorCfg;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "lvdsStreamCfg";
    cliCfg.tableEntry[cnt].helpString = "<subFrameIdx> <enableHeader> <dataFmt> <enableSW>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLILvdsStreamCfg;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "configDataPort";
    cliCfg.tableEntry[cnt].helpString = "<baudrate> <ackPing>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIConfigDataPort;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "queryDemoStatus";
    cliCfg.tableEntry[cnt].helpString = "";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLIQueryDemoStatus;
    cnt++;

    cliCfg.tableEntry[cnt].cmd = "calibData";
    cliCfg.tableEntry[cnt].helpString = "<save enable> <restore enable> <Flash offset>";
    cliCfg.tableEntry[cnt].cmdHandlerFxn = MmwDemo_CLICalibDataSaveRestore;
    cnt++;

    /* Open the CLI: */
    if (CLI_open (&cliCfg) < 0)
    {
    System_printf ("Error: Unable to open the CLI\n");
    return;
    }
    System_printf ("Debug: CLI is operational\n");
    return;
    }

    this is my init function, would you help me to edit this function?

    thanks a lot

  • Hi Nithin,

    In SRR demo application, the configuration is hard coded. So, SRR_MSS_CLIInit function is modified to call SRR_MSS_CLIAdvancedFrameCfg and SRR_MSS_CLISensorStart functions. But in this case you should send many other parameters for each command. So it's advised to modify cli.c present at SDK_DIR/packages/ti/utils/cli/src location. 

    Cli.c is modified in such a way that a list of hard commands are run without waiting for the user to enter the configuration. 

    This is the same thread i shared you in the above query, and i need a clear description that ,how the source code will reflect if i change the cli.c in mmwave sdk

    CLI_open in MmwDemo_CLIInit function is declared in cli.c to initialize and setup the CLI. Whereas CLI_open creates a task i.e CLI_task. Refer to CLI_task function in cli.c to understand how it's accomplished. 

    Modified Cli.c

    /*
     *   @file  cli.c
     *
     *   @brief
     *      CLI Utility implementation
     *
     *  \par
     *  NOTE:
     *      (C) Copyright 2016 Texas Instruments, Inc.
     *
     *  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.
     */
    
    /**************************************************************************
     *************************** Include Files ********************************
     **************************************************************************/
    
    /* Standard Include Files. */
    #include <stdint.h>
    #include <stdlib.h>
    #include <stddef.h>
    #include <string.h>
    #include <stdio.h>
    
    /* BIOS/XDC Include Files. */
    #include <xdc/std.h>
    #include <ti/sysbios/knl/Task.h>
    
    /* mmWave SDK Include Files: */
    #include <ti/common/sys_common.h>
    #include <ti/drivers/uart/UART.h>
    #include <ti/utils/cli/cli.h>
    #include <ti/utils/cli/include/cli_internal.h>
    
    /**************************************************************************
     *************************** Hard-coded Configuation **********************
     **************************************************************************/
    #define USE_HARD_CODED_CONFIG
    
    #ifdef USE_HARD_CODED_CONFIG
    
    int32_t hardCodedConfigIndex;
    
    char * hardCodedConfigCommands[] =
    {
    "sensorStop ",
     "flushCfg ",
     "dfeDataOutputMode 1 ",
     "channelCfg 15 3 0 ",
     "adcCfg 2 1 ",
     "adcbufCfg -1 0 1 1 1 ",
     "profileCfg 0 77 7 7 58 0 0  68 1 256 5500 0 0 30 ",
     "chirpCfg 0 0 0 0 0 0 0 1 ",
     "chirpCfg 1 1 0 0 0 0 0 2 ",
     "bpmCfg -1 0 0 1 ",
     "frameCfg 0 1 32 0 100 1 0 ",
     "lowPower 0 1 ",
     "guiMonitor -1 1 1 1 0 0 1 ",
     "cfarCfg -1 0 2 8 4 3 0 15.0 0 ",
     "cfarCfg -1 1 0 8 4 4 1 15.0 1 ",
     "multiObjBeamForming -1 1 0.5 ",
     "calibDcRangeSig -1 0 -5 8 256 ",
     "extendedMaxVelocity -1 0 ",
     "clutterRemoval -1 0 ",
     "compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ",
     "measureRangeBiasAndRxChanPhase 0 1.5 0.2 ",
     "aoaFovCfg -1 -90 90 -90 90 ",
     "cfarFovCfg -1 0 0.25 9.71 ",
     "cfarFovCfg -1 1 -7.49 7.49 ",
     "CQRxSatMonitor 0 3 4 127 0 ",
     "CQSigImgMonitor 0 63 8 ",
     "analogMonitor 0 0 ",
     "lvdsStreamCfg -1 0 0 0 ",
     "calibData 0 0 0 ",
     "sensorStart ",
     "!!!END_OF_HARD_CODED_COMMANDS"
    };
    
    #endif
    
    /**************************************************************************
     *************************** Global Variables *****************************
     **************************************************************************/
    
    /**
     * @brief   Global variable which tracks the CLI MCB
     */
    CLI_MCB     gCLI;
    
    /**************************************************************************
     **************************** CLI Functions *******************************
     **************************************************************************/
    
    /**
     *  @b Description
     *  @n
     *      The function is the HELP generated by the CLI Module
     *
     *  \ingroup CLI_UTIL_INTERNAL_FUNCTION
     *
     *  @retval
     *      Not Applicable.
     */
    static int32_t CLI_help (int32_t argc, char* argv[])
    {
        uint32_t    index;
    
        /* Display the banner: */
        CLI_write ("Help: This will display the usage of the CLI commands\n");
        CLI_write ("Command: Help Description\n");
    
        /* Cycle through all the registered CLI commands: */
        for (index = 0; index < gCLI.numCLICommands; index++)
        {
            /* Display the help string*/
            CLI_write ("%s: %s\n",
                        gCLI.cfg.tableEntry[index].cmd,
                       (gCLI.cfg.tableEntry[index].helpString == NULL) ?
                        "No help available" :
                        gCLI.cfg.tableEntry[index].helpString);
        }
    
        /* Is the mmWave Extension enabled? */
        if (gCLI.cfg.enableMMWaveExtension == 1U)
        {
            /* YES: Pass the control to the extension help handler. */
            CLI_MMWaveExtensionHelp ();
        }
        return 0;
    }
    
    /**
     *  @b Description
     *  @n
     *      This is the CLI Execution Task
     *
     *  \ingroup CLI_UTIL_INTERNAL_FUNCTION
     *
     *  @retval
     *      Not Applicable.
     */
    static void CLI_task(UArg arg0, UArg arg1)
    {
        uint8_t                 cmdString[256];
        char*                   tokenizedArgs[CLI_MAX_ARGS];
        char*                   ptrCLICommand;
        char                    delimitter[] = " \r\n";
        uint32_t                argIndex;
        CLI_CmdTableEntry*      ptrCLICommandEntry;
        int32_t                 cliStatus;
        uint32_t                index;
    
        /* Do we have a banner to be displayed? */
        if (gCLI.cfg.cliBanner != NULL)
        {
            /* YES: Display the banner */
            CLI_write (gCLI.cfg.cliBanner);
        }
    
    #ifdef USE_HARD_CODED_CONFIG
        hardCodedConfigIndex = 0;
        CLI_write ("Wait some time for system to initialize...\n");
        Task_sleep(100);
        CLI_write ("Performing hard-coded config\n");
    #endif
    
        /* Loop around forever: */
        while (1)
        {
            /* Demo Prompt: */
            CLI_write (gCLI.cfg.cliPrompt);
    
            /* Reset the command string: */
            memset ((void *)&cmdString[0], 0, sizeof(cmdString));
    
    #ifdef USE_HARD_CODED_CONFIG
            /* Run hard-coded commands, one at a time until '!!!END_OF_HARD_CODED_COMMANDS' is reached: */
            if (hardCodedConfigCommands[hardCodedConfigIndex][0] != '!')
            {
                //CLI_write (hardCodedConfigCommands[hardCodedConfigIndex]);
                CLI_write ("Command\n");
                memcpy((void *)&cmdString[0], (void *)hardCodedConfigCommands[hardCodedConfigIndex], strlen(hardCodedConfigCommands[hardCodedConfigIndex]));
                hardCodedConfigIndex++;
            }
            /* Accept commands from UART after all hard-coded commands done: */
            else
            {
                /* Read the command message from the UART: */
                UART_read (gCLI.cfg.cliUartHandle, &cmdString[0], (sizeof(cmdString) - 1));
            }
    
    #else
            /* Read the command message from the UART: */
            UART_read (gCLI.cfg.cliUartHandle, &cmdString[0], (sizeof(cmdString) - 1));
    #endif
    
            /* Reset all the tokenized arguments: */
            memset ((void *)&tokenizedArgs, 0, sizeof(tokenizedArgs));
            argIndex      = 0;
            ptrCLICommand = (char*)&cmdString[0];
    
            /* comment lines found - ignore the whole line*/
            if (cmdString[0]=='%') {
                CLI_write ("Skipped\n");
                continue;
            }
    
            /* Set the CLI status: */
            cliStatus = -1;
    
            /* The command has been entered we now tokenize the command message */
            while (1)
            {
                /* Tokenize the arguments: */
                tokenizedArgs[argIndex] = strtok(ptrCLICommand, delimitter);
                if (tokenizedArgs[argIndex] == NULL)
                    break;
    
                /* Increment the argument index: */
                argIndex++;
                if (argIndex >= CLI_MAX_ARGS)
                    break;
    
                /* Reset the command string */
                ptrCLICommand = NULL;
            }
    
            /* Were we able to tokenize the CLI command? */
            if (argIndex == 0)
                continue;
    
            /* Cycle through all the registered CLI commands: */
            for (index = 0; index < gCLI.numCLICommands; index++)
            {
                ptrCLICommandEntry = &gCLI.cfg.tableEntry[index];
    
                /* Do we have a match? */
                if (strcmp(ptrCLICommandEntry->cmd, tokenizedArgs[0]) == 0)
                {
                    /* YES: Pass this to the CLI registered function */
                    cliStatus = ptrCLICommandEntry->cmdHandlerFxn (argIndex, tokenizedArgs);
                    if (cliStatus == 0)
                    {
                        CLI_write ("Done\n");
                    }
                    else
                    {
                        CLI_write ("Error %d\n", cliStatus);
                    }
                    break;
                }
            }
    
            /* Did we get a matching CLI command? */
            if (index == gCLI.numCLICommands)
            {
                /* NO matching command found. Is the mmWave extension enabled? */
                if (gCLI.cfg.enableMMWaveExtension == 1U)
                {
                    /* Yes: Pass this to the mmWave extension handler */
                    cliStatus = CLI_MMWaveExtensionHandler (argIndex, tokenizedArgs);
                }
    
                /* Was the CLI command found? */
                if (cliStatus == -1)
                {
                    /* No: The command was still not found */
                    CLI_write ("'%s' is not recognized as a CLI command\n", tokenizedArgs[0]);
                }
            }
        }
    }
    
    /**
     *  @b Description
     *  @n
     *      Logging function which can log the messages to the CLI console
     *
     *  @param[in]  format
     *      Format string
     *
     *  \ingroup CLI_UTIL_EXTERNAL_FUNCTION
     *
     *  @retval
     *      Not Applicable.
     */
    void CLI_write (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);
    
        /* If CLI_write is called before CLI init has happened, return */
        if (gCLI.cfg.cliUartHandle == NULL)
        {
            return;        
        }
        
        /* Log the message on the UART CLI console: */
        if (gCLI.cfg.usePolledMode == true)
        {
            /* Polled mode: */
            UART_writePolling (gCLI.cfg.cliUartHandle, (uint8_t*)&logMessage[0], sizeMessage);
        }
        else
        {
            /* Blocking Mode: */
            UART_write (gCLI.cfg.cliUartHandle, (uint8_t*)&logMessage[0], sizeMessage);
        }
    }
    
    /**
     *  @b Description
     *  @n
     *      This is the function which is used to initialize and setup the CLI
     *
     *  @param[in]  ptrCLICfg
     *      Pointer to the CLI configuration
     *
     *  \ingroup CLI_UTIL_EXTERNAL_FUNCTION
     *
     *  @retval
     *      Success -   0
     *  @retval
     *      Error   -   <0
     */
    int32_t CLI_open (CLI_Cfg* ptrCLICfg)
    {
        Task_Params     taskParams;
        uint32_t        index;
    
        /* Sanity Check: Validate the arguments */
        if (ptrCLICfg == NULL)
            return -1;
    
        /* Initialize the CLI MCB: */
        memset ((void*)&gCLI, 0, sizeof(CLI_MCB));
    
        /* Copy over the configuration: */
        memcpy ((void *)&gCLI.cfg, (void *)ptrCLICfg, sizeof(CLI_Cfg));
    
        /* Cycle through and determine the number of supported CLI commands: */
        for (index = 0; index < CLI_MAX_CMD; index++)
        {
            /* Do we have a valid entry? */
            if (gCLI.cfg.tableEntry[index].cmd == NULL)
            {
                /* NO: This is the last entry */
                break;
            }
            else
            {
                /* YES: Increment the number of CLI commands */
                gCLI.numCLICommands = gCLI.numCLICommands + 1;
            }
        }
    
        /* Is the mmWave Extension enabled? */
        if (gCLI.cfg.enableMMWaveExtension == 1U)
        {
            /* YES: Initialize the CLI Extension: */
            if (CLI_MMWaveExtensionInit (ptrCLICfg) < 0)
                return -1;
        }
    
        /* Do we have a CLI Prompt specified?  */
        if (gCLI.cfg.cliPrompt == NULL)
            gCLI.cfg.cliPrompt = "CLI:/>";
    
        /* The CLI provides a help command by default:
         * - Since we are adding this at the end of the table; a user of this module can also
         *   override this to provide its own implementation. */
        gCLI.cfg.tableEntry[gCLI.numCLICommands].cmd           = "help";
        gCLI.cfg.tableEntry[gCLI.numCLICommands].helpString    = NULL;
        gCLI.cfg.tableEntry[gCLI.numCLICommands].cmdHandlerFxn = CLI_help;
    
        /* Increment the number of CLI commands: */
        gCLI.numCLICommands++;
    
        /* Initialize the task parameters and launch the CLI Task: */
        Task_Params_init(&taskParams);
        taskParams.priority  = gCLI.cfg.taskPriority;
        taskParams.stackSize = 4*1024;
        gCLI.cliTaskHandle = Task_create(CLI_task, &taskParams, NULL);
        return 0;
    }
    
    /**
     *  @b Description
     *  @n
     *      This is the function which is used to close the CLI module
     *
     *  \ingroup CLI_UTIL_EXTERNAL_FUNCTION
     *
     *  @retval
     *      Success -   0
     *  @retval
     *      Error   -   <0
     */
    int32_t CLI_close (void)
    {
        /* Shutdown the CLI Task */
        Task_delete(&gCLI.cliTaskHandle);
    
        /* Cleanup the memory */
        memset ((void*)&gCLI, 0, sizeof(CLI_MCB));
        return 0;
    }
    

    After modifying cli.c, build the cli library before building the demo following the instructions mentioned in the E2E thread that you are referring to.

    Regards,

    Samhitha

  • Hi Samhitha,

    1) i replaced the cli.c file with the above file you provided

    2)edited setenv.bat file with device name "awr16xx" instead of "iwr16xx"

    3)followed the steps in 40th page of mmwave sdk user manual for running gmake clean and gmake all

    4)"C:\ti\mmwave_sdk_03_06_00_00-LTS\packages\ti\demo\xwr16xx\mmw"  was the directory where i run gmake clean and gmake all, and it accepted correctly

    5)re builded dss_main and then mss_main

    6)flashed binary file to board using uniflash

    BUT STILL I'M NOT GETTING THE OUTPUT WHEN I POWER ON THE SYSTEM AND OBSERVED IN DOCKLIGHT

    why i'm facing this issue?

    thanks in advance samhitha

  • Hi Nithin,

    Build the Cli library before building the demo. Run 'gmake clean' and then 'gmake all' in the SDK_DIR\packages\ti\utils\cli directory to build the cli library.

    Regards,

    Samhitha

  • Thank You Samhitha,

    Now i can view the output in serial data port in hard coded configuration

    Wishing You all success.......Thanks again