makefile inside the ${SDK_INSTALL_PATH}/tools/sysfw/boardcfg/ folder.This section describes the various tools used in conjunction with System Controller Firmware (SYSFW)
| Folder/Files | Description |
|---|---|
| ${SDK_INSTALL_PATH}/tools/bin2c/ | |
| bin2c.py | Tool to convert a binary file to a C array of hexadecimals |
| ${SDK_INSTALL_PATH}/tools/sysfw/boardcfg/ | |
| sysfw_boardcfg_validator.py | Python script which validates the boardcfg. Used internally in the boardcfg makefile |
| ${SDK_INSTALL_PATH}/tools/sysfw/trace_parser/ | |
| sysfw_trace_parser.py | Python script which decodes SYSFW log file |
SYSFW Board Config is a SOC specific configuration data regarding the various system attributes controlled by the SYSFW. These include resources, power and clock, security etc. This configuration is sent to SYSFW during boot time. The default configuration is stored in source/drivers/sciclient/sciclient_default_boardcfg/{SOC}/
For sending it to SYSFW, these files are converted to hex arrays. We use the bin2c.py python script to do this. This is done internally in the boardcfg makefile. If we change the boardcfg in the above mentioned files, run the following command to generate the hex array header files
The TIFS and DM logging system uses board configuration to control where logs are sent (trace destinations) and what components generate logs (trace sources).
Default Configuration:
trace_dst_enables = TISCI_BOARDCFG_TRACE_DST_UART0 | TISCI_BOARDCFG_TRACE_DST_ITM | TISCI_BOARDCFG_TRACE_DST_MEM (UART, CCS Console, and Memory destinations enabled)trace_src_enables = TISCI_BOARDCFG_TRACE_SRC_USER (USER source enabled)To enable all TIFS and DM traces, change the #undef SYSFW_TRACE_ENABLE to #define SYSFW_TRACE_ENABLE in source/drivers/device_manager/sciclient.h. Then rebuild the boardcfg as explained in the SYSFW Board Config Generation section. This enables all the following trace sources and destinations -
trace_dst_enables): Controls where logs are output. (All enabled by default)TISCI_BOARDCFG_TRACE_DST_UART0 - WKUP UART outputTISCI_BOARDCFG_TRACE_DST_MEM - Memory bufferTISCI_BOARDCFG_TRACE_DST_ITM - CCS Consoletrace_src_enables): Controls which components generate logsTISCI_BOARDCFG_TRACE_SRC_PM - Power Management tracesTISCI_BOARDCFG_TRACE_SRC_RM - Resource Management tracesTISCI_BOARDCFG_TRACE_SRC_SEC - Security tracesTISCI_BOARDCFG_TRACE_SRC_BASE - Baseport tracesTISCI_BOARDCFG_TRACE_SRC_USER - User-level traces (DM R5 application)TISCI_BOARDCFG_TRACE_SRC_SUPR - Supervisor-level tracesTo selectively enable specific traces instead of all, follow these steps:
source/drivers/sciclient/sciclient_default_boardcfg/{SOC}/sciclient_defaultBoardcfg.c.debug_cfg section in the tisci_boardcfg structureConfigure trace settings based on your needs:
In the #else block (when SYSFW_TRACE_ENABLE is not defined), replace the default values with your desired configuration:
Example 1: Enable DM PM/RM logs and DM application logs to both UART and memory
Example 2: Enable TIFS security logs to UART
Example 3: Disable all logs
Depending on the destination flags enabled, logs can be viewed from different locations:
UART Destination (TISCI_BOARDCFG_TRACE_DST_UART0):
/dev/ttyUSB2 on Linux)/dev/ttyUSB1 on Linux)Memory Destination (TISCI_BOARDCFG_TRACE_DST_MEM):
ITM Destination (TISCI_BOARDCFG_TRACE_DST_ITM):
After taking the TIFS logs as in above section, it can be parsed using the sysfw_trace_parser.py script. This will decode the hex trace values and gives readable text file as output. Using this, the user can interpret the log and debug.
cmd.exe) or Linux bash shell with the required arguments to parse the TIFS logs.On HS-SE devices, the JTAG port is closed by default. If required, the user can open the JTAG port and debug the cores. This can be done by sending a TISCI message with a signed X509 certificate authorizing the debug.
The debug_unlock_x509_cert_gen.py script generate the debug certificate with required debug extensions and save it as a hex header file. The user can include this hex header in their application and send the certificate from a valid host to the TIFS core via the TISCI message.
cmd.exe) or Linux bash shell with the required arguments to generate the debug certificate.