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: Standalone using traffic monitoring

Other Parts Discussed in Thread: IWR1642BOOST, MATHLIB, IWR1642

This is my 

3857.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[] =
{
"% ***************************************************************"
"% Created for SDK ver:02.00",
"% Created using Visualizer ver:3.1.0.1",
"% Frequency:77",
"% Platform:xWR16xx",
"% Scene Classifier:best_range_res",
"% Azimuth Resolution(deg):15",
"% Range Resolution(m):0.044",
"% Maximum unambiguous Range(m):9.08",
"% Maximum Radial Velocity(m/s):1",
"% Radial velocity resolution(m/s):0.13",
"% Frame Duration(msec):100",
"% Range Detection Threshold (dB):15",
"% Doppler Detection Threshold (dB):15",
"% Range Peak Grouping:enabled",
"% Doppler Peak Grouping:enabled",
"% Static clutter removal:disabled",
"% ***************************************************************",
"sensorStop"
"sensorStop"
"flushCfg"
"dfeDataOutputMode 1"
"channelCfg 15 1 0"
"adcCfg 2 1"
"adcbufCfg 0 1 1 1" 
"profileCfg 0 76 2 5 52.62 0 0  4.007 1 256 5490 0 0 48"
"chirpCfg 0 0 0 0 0 0 0 1"
"frameCfg 0 0 118 0 50 1 0"
"lowPower 0 1"
"guiMonitor 1 0 0 0"
"cfarCfg 4 12 2 16 8 4 0 63 63 0 1"
"doaCfg 3 0 1047 3 600 10 100"
"trackingCfg 1 1 250 20 189 330 50 90"
"%for 18xx board SN4855900006 "
"compRangeBiasAndRxChanPhase -0.0438848 0.12320 -0.62793 0.08932 -0.50342 -0.03458 -0.58853 0.06812 -0.69101 -0.79391 -0.60803 -0.63580 -0.45255 -0.70901 -0.26627 -0.73044 -0.46078"
"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);

    /* 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;
}

file for traffic monitoring. I replace this file with C:\ti\mmwave_sdk_02_00_00_04\packages\ti\utils\cli\src\cli.c. Then i rebuild dss and mss part of traffic monitoring in ccs. Though i am not able to make IWR1642BOOST standalone.

  • Former Member
    0 Former Member

    Hello Arpit,

    Are you able to follow the example to build the standalone 16xx out of box demo successfully? 

    Amanda

  • Hi Amanda,

                 I am able to make mmwavw sdk demo code to work standalone successfully. I have used that working cli.c file which has been provided by you to Attiya Mahmood that i have modified as per my requirement and un the end it works well. Even For traffic monitoring, I have used both the config file mmw_tm_demo_ph2.cfg and mmw_tm_demo_longRange.cfg to make it so but i am not able to make it work as standalone. Above i have attached only cli.c file for long-range.   

  • Former Member
    0 Former Member in reply to Arpit Patel

    Hello Arpit,

    Can you describe what the issues you are seeing when you say it isn't working? What happens? 

    Are you able to successfully rebuild the normal TM demo code? Have you double checked that you are using the correct DSP compiler version?

    Amanda

  • Hi Amanda,
          My demo code is working absolutely fine.I am able to rebuild it code successfull.There is no error in any steps. I have already checked all the things which i need to make it standalone. Is my cli.c file is ok? If not then guide me. And i am using ti-cgt-c6000_8.1.3 compile version. If i need to change anything then let me know.

    # TI DSP compiler
    export C674_CODEGEN_INSTALL_PATH = $(MMWAVE_SDK_TOOLS_INSTALL_PATH)/ti-cgt-c6000_8.1.3
    # DSPlib
    export C64Px_DSPLIB_INSTALL_PATH = $(MMWAVE_SDK_TOOLS_INSTALL_PATH)/dsplib_c64Px_3_4_0_0
    # DSPlib C674
    export C674x_DSPLIB_INSTALL_PATH = $(MMWAVE_SDK_TOOLS_INSTALL_PATH)/dsplib_c674x_3_4_0_0
    # MATHlib
    export C674x_MATHLIB_INSTALL_PATH = $(MMWAVE_SDK_TOOLS_INSTALL_PATH)/mathlib_c674x_3_1_2_1

  • Former Member
    0 Former Member in reply to Arpit Patel

    Hello Arpit,

    There should not be an issue if you were following the directions in the original e2e thread. https://e2e.ti.com/support/sensors/f/1023/p/708175/2616079#2616079

    I tried to replicate the issue and was not able to. I've captured my steps below:

    1. Downloaded mmWave SDK 2.0.0.4 

    2. Create a new cli.c file for hard coded TM config. Attached here. Replaced the original cli.c file in the CLI folder in the SDK

    3. Go to setenv.bat in mmWave SDK change to iwr1642. Run .bat file.

    4. Change director to CLI folder and run gmake clean, gmake build commands

    5. Open up CCS, import 16xx Traffic Monitoring labs build DSS and MSS projects as usual.

    6. Flash the EVM with the .bin from the MSS Debug folder.

    7. Open up Tera Term for CFG port (set baud rate to 115200) hit "Enter" key. Should see mmwDemo:/> come up. This means the demo is booting up/hasn't crashed.

    8. Open up Tera Term for Data serial port (set baud rate to 921600). See data streaming.

    Please follow the steps as specified. I would recommend that you redownload the SDK and the Industrial Toolbox to ensure that the issue isn't related to any source modifications on your local machine.

    Amanda

     

    7701.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 0 1 1 1",
    "profileCfg 0 76 3 5 62.65 0 0  10.622 1 312 5510 0 0 48",
    "chirpCfg 0 0 0 0 0 0 0 1",
    "chirpCfg 1 1 0 0 0 0 0 2",
    "frameCfg 0 1 32 0 50 1 0",
    "lowPower 0 1",
    "guiMonitor 1 0 0 0",
    "cfarCfg 4 60 18 16 8 4 0 63 63 0 1",
    "doaCfg 1 1 1047 3 600 10 100",
    "compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0",
    "sceneryParam 1 -2 15 10.0 75.0 0 0 0 0 1 1.25 11.0 20.0 50.0 0 0 0 0",
    "gatingParam 12 8 4 0",
    "stateParam 3 10 20 2000 10",
    "allocationParam 60 60 1.0 3 2.8 2.0",
    "variationParam 1.15 0.433 1.0",
    "trackingCfg 1 1 250 20 75 470 50 88",
    "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);
    
        /* 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;
    }
    
    

  • Hi Amanda,

               Thanks for the reply. There was an only problem with cli.c file. I tried to update the cli.c file with long-range config file parameter in many ways but it is not working. Would you help me with this?  because i am trying this for long-range.

  • Former Member
    0 Former Member in reply to Arpit Patel

    Hello Arpit,

    The original thread as well as my reply has verified that if the steps are followed the hard coded config should not be a problem. Please provide me details of the steps you followed and your debugging to better understand the issue.

    Amanda

  • Hi Amanda,

                   I apologize for not mention my issue properly. I have already clarified that previously i followed these same steps but there was the only problem with cli.c file that i have mentioned in the above reply also. So there is nothing wrong with the steps. With following same steps and using provided cli.c file i am able to make board standalone successfully. It means there was only a problem with my cli.c file. Now i want to use it for a long-range so for that i have to update my cli.c file with my long-range parameter but when i did that with using same steps which you have mentioned above it is not working. So guide me how do i arrange my long-range parameter in cli.c file so that i can make board standalone successfully.

  • Former Member
    0 Former Member in reply to Arpit Patel

    Hello Arpit,

    You should be taking the verified known working long range cfg provided in the Industrial Toolbox and replacing the existing commands in the provided cli.c with the ones from the cfg file. Make sure to enclose it in quotes as needed. All other commands in the cli.c file can stay.

    To understand the changes you can diff the cli.c file I provided with the ph2.cfg from the Toolbox. You should make the same changes for the long range cfg.

    Amanda

  • Hi Amanda,

              I have done the same procedure with cli.c file using long-range config file of traffic monitor. I am using industrial toolbox version 3.6.1. Here is its mmw_tm_demo_longRange.cfg file. First, i have taken all the parameter as it is with enclosed in quotes in cli.c file. Then i compare cli.c file provided by you and cli.c file that i have made. First when i use my cli.c file but as it was not working i make some changes as per cli.c file given by you in many ways (adding some parameters which were not in the long-range config file). Though it was not working. If you could see my long-range config file and compare it with with the long-range config file which you have and if both are different or if you could identify some missing parameter in my given file and making it proper file which i can use in my cli.c file and load it successfully without any issue like the proper cli.c file which you have provided which work succefully.  

  • Former Member
    0 Former Member in reply to Arpit Patel

    Hello Arpit,

    As previously requested please provide your cli.c that you have created that's causing issues. As noted you should be following the same steps including adding quotes arround each command and a comma at the end.

    Amanda

  • Hi Amanda,

               Here is my 

    3580.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 1 0"
    "adcCfg 2 1"
    "adcbufCfg 0 1 1 1" 
    "profileCfg 0 76 2 5 52.62 0 0  4.007 1 256 5490 0 0 48"
    "chirpCfg 0 0 0 0 0 0 0 1"
    "frameCfg 0 0 118 0 50 1 0"
    "lowPower 0 1"
    "guiMonitor 1 0 0 0"
    "cfarCfg 4 12 2 16 8 4 0 63 63 0 1"
    "doaCfg 3 0 1047 3 600 10 100"
    "trackingCfg 1 1 250 20 189 330 50 90"
    "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);
    
        /* 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;
    }
    
    
     file. I have also tried "sensorStop" in the beginning twice. I have also tried some other ways like add some parameter "compRangeBiasAndRxChanPhase" of mmw_tm_demo_ph2.cfg file instead of available in mmw_tm_demo_longRange.cfg file. I have also add  dome other parameters which is available in mmw_tm_demo_ph2.cfg but not in in mmw_tm_demo_longRange.cfg file.

  • Former Member
    0 Former Member in reply to Arpit Patel

    Arpit,

    As stated in the original directions, my previous reply, and shown in the example file I provided, you must enclose the commands in quotation marks AND include a comma at the end of each command. The file you provided does not mark the line ends with commas. Please follow the instructions provided.

    Amanda

  • Hi Amanda,

    The file which i have provided is correct (exvept comma)?or do i have to add or remove any parameter?

  • Former Member
    0 Former Member in reply to Arpit Patel

    Hello Arpit,

    Directions and an example file have been provided. Please follow the directions exactly as described. This should be a simple copy and paste exercise with the addition of quotation marks and commas. There should not be an issue if the directions are followed. I will close this thread as the solution for how to hard code CLI commands has been provided multiple times. Please open a new one if you have a different issue.

    Amanda