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.

AWR1642: How to enable the log in mmwave link in SDK?

Part Number: AWR1642

HI champion,
   I am trying to enable the log in mmwave link API. I find firstly I need to change below marco to 0.

/*! \brief
 * mmwavelink MACRO to enable/disable logging.
 * To enable logging set this MACRO to '0' and set proper function pointer
 * dbgCb.rlPrint and debug level dbgCb.dbgLevel out of RL_DBG_LEVEL_* during rlDevicePowerOn
 */
#define RL_DISABLE_LOGGING                    1

    But I stopped at setting the rlClientCbs_t->dbgCb in API rlDevicePowerOn. How should I configure the logging function and logging level in the code? Could you share us an example which could be used in mmwave demo SDK?

typedef struct rlDbgCb
{
    /** @fn rlInt32_t (*rlPrint)(const rlInt8_t* format, ...)
    *
    *   @brief Print input message as per the format in the input arguments
    *   @param[in] format  - Format of message and arguments to be printed
    *   @param[in] ...     - Multiple input arguments to be printed
    *
    *   @return rlInt32_t Success- Length of the message written in user's output console in bytes
    *                     Failure- Negative value
    *
    *   Print input message as per the format in the input arguments
    */
    /* DesignId :  */
    /* Requirements :  */
    rlPrintFptr rlPrint;
    /**
     * @brief User needs to set debug level such as error, warning, debug, verbose
     */
    rlUInt8_t   dbgLevel;
}rlDbgCb_t;

Thanks a lot,
Adam

  • Hello Adam,

    You can take reference from cli.c: CLI_write function which you need to assign to rlDbgCb_t: rlPrint.

    rlDbgCb_t: dbgLevel you can set 0 to 5 which MACRO is defined in mmwavelink.h (RL_DBG_LEVEL_NONE - RL_DBG_LEVEL_VERBOSE).

    For mmwave_link.c you need to add below code snippet-

    /* may need to create similar API in the same file or use
    * CLI library in mmwave library to resolve compilation error
    */
    RlApp_ClientCtx.dbgCb.rlPrint = CLI_write;

    RlApp_ClientCtx.dbgCb.dbgLevel = RL_DBG_LEVEL_VERBOSE;

    /* Power on the Device: */
    retVal = (int32_t)rlDevicePowerOn(1U, RlApp_ClientCtx);

    Regards,

    Jitendra 

  • Hi Jitendra,
    Thanks for the reply. I linked the cli library in mmwave library, but I find that there is only Cli library for R4F. If I want to use RL log in DSP, where can I find the C674x Cli library?

    Thanks,
    Adam
  • Hello Adam,

    To use DSS UART for logging from DSS application, let me re-iterate the change list-

    • Create a custom function equivalent to CLI_write taking the same type of input parameter.
    • Use 'UART_writePolling' function to send data over DSS - UART.
    • Use 'gMmwDssMCB.loggingUartHandle' UART handle while calling 'UART_writePolling' function. This handle is created  from 'UART_open' under 'MmwDemo_dssInitTask' task.
    • Pass above custom function pointer (in step-1) to 'RlApp_ClientCtx.dbgCb.rlPrint' in mmwave_link.c file.

    Regards,

    Jitendra

  • Hi JItendra,
    Thanks a lot for the reply. I am clear now.

    Best regards,
    Adam