Skip to main content
Visitor II
May 4, 2021
Question

How to direct printf() in USB Host library into Virtual Communication Port?

  • May 4, 2021
  • 1 reply
  • 816 views

So I notice when I configure my STM32F769 Discovery board as USB Host, the generated middleware already have built in logging USBH_UsrLog() which is handy.

But looking at it definition on the macro, basically it wrap standard printf() like following:

#define USBH_UsrLog(...) do { \
 printf(__VA_ARGS__); \
 printf("\n"); \
} while (0)

I am not sure the original intention of making it printf(), but let say I want to direct this into Virtual Com Port, how should I do this?

Without doing anything, let say I already define my USBH_DEBUG_LEVEL > 0, can I see the USB logging somewhere?

    This topic has been closed for replies.

    1 reply

    BParh.1Author
    Visitor II
    May 6, 2021

    Ok, I already find solution for this