SPRADG5 January   2024 AM67 , AM67A , AM68 , AM68A , AM69 , AM69A , DRA821U , DRA821U-Q1 , DRA829J , DRA829J-Q1 , DRA829V , DRA829V-Q1 , TDA4AEN-Q1 , TDA4AH-Q1 , TDA4AL-Q1 , TDA4AP-Q1 , TDA4VE-Q1 , TDA4VEN-Q1 , TDA4VH-Q1 , TDA4VL-Q1 , TDA4VM , TDA4VM-Q1 , TDA4VP-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1UART Introduction
    1. 1.1 Jacinto 7 UART Overview
    2. 1.2 Jacinto 7 UART Features
    3. 1.3 Jacinto 7 UART Functional Introduction
  5. 2UART Usage Overview
    1. 2.1 WKUP_UART0 Usage
    2. 2.2 MCU_UART0 Usage
    3. 2.3 MAIN_UARTx Usage
  6. 3Log Level Design on Software Module
  7. 4Change UART Instance
    1. 4.1 Change MAIN_UARTx for MAIN Domain
    2. 4.2 Set Standalone UART Port for DSP/MCU
  8. 5Summary
  9. 6References

Log Level Design on Software Module

In large software projects, there is usually a log level used for debugging, and TI's SDK also has some commonly used log levels for controlling and printing more useful information to assist debugging. For more details, see the following steps.

  1. Linux kernel log level:

    During the boot stage, Linux kernel could configure different log levels on the bootargs in the device tree(k3-j721e-common-proc-board.dts if use TDA4VM). By adding the loglevel=8 parameter in the Linux kernel configure, where the value ranges from 0 (least detailed) to 8 (most detailed). By default, the loglevel is 7 shown in Figure 3-1.

    GUID-33E31372-1875-4D64-B502-62EDBC2EF2E5-low.png Figure 3-1 Linux Default Kernel Log Level
  2. SBL BOOT log level:

    The SBL log level ranges from 0 (least detailed) to 3 (most detailed). The following describes the steps needed to set the log level to 3 and remove the log output restriction.

    Changes DSBL_LOG_LEVEL=3 in mcusw/mcuss_demos/boot_app_mcu_rtos/makefile

    Changes DSBL_LOG_LEVEL=3 in pdk_xxxx /packages/ti/boot/sbl/sbl_component.mk

    Changes in pdk_xxxx/packages/ti/boot/sbl/soc/k3/sbl_log.h show as following #define SBL_log(dbg_level, ...) if (1) { UART_printf(__VA_ARGS__); }

    Changes DSBL_LOG_LEVEL=3 in pdk_xxxx/packages/ti/build/makerules/build_config.mk

  3. Openvx log level:

    As an important part of the TDA4X applications, Openvx also provides log level for debugging. From Figure 3-2, the g_debug_zonemask (default 0) is used to calculate the current log level. To make it easier for printing Openvx log level, the following if condition could be simply commented out.

    GUID-6CFDC27C-7FE4-4D71-9422-43FD265A41F3-low.png Figure 3-2 Openvx Low Level Print API
    GUID-B5B8E4BB-37C6-4FDA-AA1E-7E4D476CB972-low.png Figure 3-3 Openvx Log Level Set
  4. TIDL log level:

    During the import and inference stage of TIDL, the debugTraceLevel=3 could be used to configure different log level ranging from 0 (least detailed) to 3 (most detailed) in the TIDL inference configure file.

  5. Memory allocation log level:

    The C file in this directory ti-processor-sdk-rtos-j7xxxx-evm-xx_xx_xx_xx/app_utils/utils/mem/src/ , when the APP_MEM_DEBUG (default is not defined) macro is defined, the memory allocation log will be printed out.