cancel
Showing results for 
Search instead for 
Did you mean: 

write something to console for a M4 program - stm32mp157c-dk2

IYetk
Associate III

Hello,

I am reading a sensor on m4 side. And debugging in production mode for the target.

I have called printf function in main.c but I cant see anything when I run the program.

Is it normal that I cant see any console while the program running ?

1 ACCEPTED SOLUTION

Accepted Solutions
Bumsik Kim
Senior

By default printf would do absolutely nothing, since there is no peripheral associated with stdout. You need to write your own _write() system call function.

To make _write() print out to the host Cortex-A, you probably want to look at OpenAMP examples in STM32CubeMP1.

View solution in original post

2 REPLIES 2
Bumsik Kim
Senior

By default printf would do absolutely nothing, since there is no peripheral associated with stdout. You need to write your own _write() system call function.

To make _write() print out to the host Cortex-A, you probably want to look at OpenAMP examples in STM32CubeMP1.

I understand, thank you very much