cancel
Showing results for 
Search instead for 
Did you mean: 

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

OJohn
Associate

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() >> 😎 & 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

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

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)

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
PatrickF
ST Employee

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)

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.