Skip to main content
Visitor II
April 18, 2019
Solved

enable M4 log on STM32MP1 ( STM32MP157-DK2 dev kit)

  • April 18, 2019
  • 1 reply
  • 2176 views

Hello,

I am able to compile the M4 examples and it looks as though they run as expected ( I can see the log trace on the A7 side from the linux console). I would like to examine the log trace from the M4 side also as I would like to modify some of these examples for further use. In the OpenAMP_TTY_echo example (main.c) are the following lines

 log_info("Cortex-M4 boot successful with STM32Cube FW version: v%ld.%ld.%ld \r\n",

                                           ((HAL_GetHalVersion() >> 24) & 0x000000FF),

                                           ((HAL_GetHalVersion() >> 16) & 0x000000FF),

                                           ((HAL_GetHalVersion() >> 8) & 0x000000FF));

I was curious as to how I can enable these lines. Do I need to enable putc associated with one of the UART instances or ..

Basically just want to know how I can have console functionality on the M4 side also

Thanks

Victor

    This topic has been closed for replies.
    Best answer by PatrickF

    Hello, I'm not 100% sure of the answer,

    Need to define __LOG_TRACE_IO_ in M4 preprocessor directives

    Traces are then available under Linux using e.g. cat /sys/kernel/debug/remoteproc/remoteproc0/trace0

    (see Linux_remoteproc_framework_overview#How_to_trace_and_debug_the_framework)

    1 reply

    PatrickFAnswer
    Technical Moderator
    April 18, 2019

    Hello, I'm not 100% sure of the answer,

    Need to define __LOG_TRACE_IO_ in M4 preprocessor directives

    Traces are then available under Linux using e.g. cat /sys/kernel/debug/remoteproc/remoteproc0/trace0

    (see Linux_remoteproc_framework_overview#How_to_trace_and_debug_the_framework)