AWRL6432: Question for CLI Remove

Part Number: AWRL6432
Other Parts Discussed in Thread: SYSCONFIG, MMWAVE-L-SDK

Tool/software:

Continuing the discussion at https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1423126/awrl6432-question-for-cli-remove,

I'm currently using L-SDK 5.5.03 and toolbox version 2.30.00.12. I used the LPD example and enabled the CLI REMOVAL feature. I replaced FEATURE_LITE_BUILD_EN with CLI_REMOVAL in mmw_cli.c, but encountered a series of errors like "use of undeclared identifier 'FLB_SENSOR_START_FRM_TRIG'". How can I correct these errors?

  • I tried changing all parameters starting with FLB to CLI, which seems to work. However, I encountered a parameter count inconsistency issue. First, I used the CLI_Rem_CPD.json from the SDK to modify the parameters used by LPD. In the LPD config file, cfarCfg has 23 parameters, but after loading it with sysconfig, I only see 12 related parameters in ti_cli_mpd_demo_config.h, and the dimensions of these variables are inconsistent with those declared in DPU_CFARProc_CfarCfg. How should I resolve this?

  • Hi ChaoChin Huang,

    Thanks for reaching out to us over E2E. Please allow us a day or so to provide a response.

    Thanks,
    Kundan

  • Hello,

    There will be quite a bit of changes to the SDK to get the JSON files to load and interpret new parameters properly. First of all, parsable CLI parameters must be defined in the mpd_demo_v0.syscfg.js under <MMWAVE_LSDK5_INSTALL_DIR>/source/demo/.meta/mpd_demo/v0. Under the fillConfigs function, there is an instance object structure, inst, that remaps parsed parameters from the JSON files, res. As an example, if you wanted to add enableLocalMaxElevation to the cfarCfg parsing, then you could add the following:

    inst.cfarCfg_enableLocalMaxElevation = res.cfarCfg.enableLocalMaxElevation;

    Additionally, there is a getConfigurables function that contains a config object structure that contains all CLI command parameter fields. Like before, you will need to add a field for the parameter you are adding. For the enableLocalMaxElevation parameter shown previously, you can add the following:

    {
        name: "cfarCfg_enableLocalMaxElevation",
        default: "1",
        hidden: true,
    },

    Next, the SysConfig template file will need to be updated to pull in the JSON config object structure and define a macro based on the config CLI parameter. You can find the SysConfig template file, cli_mpd_demo_config.h.xdt, under <MMWAVE_LSDK5_INSTALL_DIR>/source/demo/.meta/mpd_demo/templates. Once again, referring to the enableLocalMaxElevation parameter, you can add the following:

    #define CLI_CFARCFG_LOCMAX_ELE_EN       `config.cfarCfg_enableLocalMaxElevation`

    Note: You can choose any name for the macro. Just keep in mind that you will need to reference it in the next step.

    Finally, the last step is to update the final parsing done in the mmw_cli.c file of your project. In MMWAVE-L-SDK 5.5.x.x, the mmw_cli.c contains #ifdefs for when CLI_REMOVAL is defined to select between CLI commands read in through UART or the JSON file. In line with the previous example, you will have to update the CLI_MMWaveCfarCfg function and add in the following under the #else condition:

    gMmwMssMCB.cfarCfg.enableInterpAzimuthDom   = (uint8_t) CLI_CFARCFG_LOCMAX_ELE_EN;

    One last note is that you will have to make sure that the gMmwMssMCB configuration DPU struct typedefs - e.g., DPU_CFARProc_CfarCfg_t for cfarCfg - contain all the parameters used by LPD. I would recommend adding any new parameters into a local copy of the DPU header file to prevent issues with any other SDK projects. The LPD from the Radar Toolbox already does this in its local copy cfcfarproccommon.h, but I wasn't sure how much your new project deviates from the original.

    You should be repeat this for any parameters you want to add, but let me know if you have any other questions.

    Regards,

    Kristien

  • Thank you for your response.

    I will make modifications and test it further before discussing the subsequent steps with you.

  • Perfect!

    Let us know if you have any other questions.

    Regards,

    Kristien