-
Notifications
You must be signed in to change notification settings - Fork 349
Description
Describe the bug
Currently SOF Zephyr builds use "TEXT" logging output by default.
One alternative to text logging is the MIPI SYS-T Catalog logging backend which is found in Zephyr upstream:
zephyrproject-rtos/zephyr#19841
https://docs.zephyrproject.org/latest/samples/subsys/logging/syst/README.html
There are currently some issues enabling this build with SOF:
- Builds with Cadence xtensa tool chain fail with MIPI_SYST_USE_CATALOG (work/zephyr/lib/os/cbprintf_packaged.c:22:2: error: "CONFIG_CBPRINTF_PACKAGE_SUPPORT_TAGGED_ARGUMENT) -> toolchain: xtensa: enable C11 features with xt-clang zephyrproject-rtos/zephyr#58499
- No logs from SOF emitted to backend (is_in_log_strings_section() check always returns false for SOF prints, potential issue in linker scripts) -> logs dropped with CONFIG_LOG_MIPI_SYST_USE_CATALOG=y zephyrproject-rtos/zephyr#58476 , fix in logging: fix format strings not being put in log_strings_area zephyrproject-rtos/zephyr#58719
- Builds MIPI SYST USE_CAT and xt-clang will fail due to missing libc functionality (memset, strlen, ... ) -> west.yml: update Zephyr to 3.4.99 #7836 and modules: mipi-syst: support minimal C library zephyrproject-rtos/zephyr#59287
- FW panic if USE_CATALOG=y on MTL -> [BUG] IPC timeout with CONFIG_LOG_MIPI_SYST_USE_CATALOG=y #7839
To Reproduce
Add following to work/sof/app/prj.conf
CONFIG_LOG_BACKEND_ADSP_MTRACE=y
CONFIG_LOG_BACKEND_ADSP_MTRACE_OUTPUT_SYST=y
CONFIG_LOG_MIPI_SYST_ENABLE=y
CONFIG_LOG_MIPI_SYST_USE_CATALOG=n
And rebuild SOF. Capture log with "mtrace-reader.py" to a file "dsplog.bin" and post-process with upstream mipi-syst tools like:
systprint -c ../../work/build-tgl/zephyr/mipi_syst_collateral.xml dsplog.bin
Reproduction Rate
100%
Expected behavior
Sys-T Catalog logging can be enabled for all support logging backends.
Impact
Inability to use more effiecient standard dictionary format.
Environment
- Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
- Kernel: n/a
- SOF: e7fc334
- Zephyr: 7d54586751cfe405d2cdcfd850f8100bc9844f63
- Name of the topology file
- Topology: n/a
- Name of the platform(s) on which the bug is observed.
- Platform: Intel MTL
Screenshots or console output