Skip to main content
Visitor II
August 25, 2019
Solved

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

  • August 25, 2019
  • 1 reply
  • 1138 views

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 ?

    This topic has been closed for replies.
    Best answer by Bumsik Kim

    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.

    1 reply

    Visitor II
    August 26, 2019

    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.

    IYetkAuthor
    Visitor II
    August 26, 2019

    I understand, thank you very much