Skip to main content
Visitor II
January 28, 2022
Solved

How do I create a VIRT_UART_HandleTypeDef?

  • January 28, 2022
  • 1 reply
  • 986 views

I'm following the tutorial here but when I define `VIRT_UART_HandleTypeDef huart0;` I get error: unknown type name. It seems like the only include I should need is openamp.h, but that doesn't seem to do the trick.

    This topic has been closed for replies.
    Best answer by Olivier GALLIEN

    Inclusion come from OPENAMP/openamp_conf.h in which you need to uncomment :

    //#define VIRTUAL_UART_MODULE_ENABLED

    Hope it help

    Olivier

    1 reply

    Technical Moderator
    February 1, 2022

    Hi @msche.1​ ,

    VIRT_UART_HandleTypeDef is defined in Middlewares\Third_Party\OpenAMP\virtual_driver\virt_uart.h

    included in your project by CubeMX as soon as you enable OpenAMP middleware.

    Olivier

    Technical Moderator
    February 1, 2022

    Inclusion come from OPENAMP/openamp_conf.h in which you need to uncomment :

    //#define VIRTUAL_UART_MODULE_ENABLED

    Hope it help

    Olivier

    msche.1Author
    Visitor II
    February 1, 2022

    Wow, I've been looking for this answer for hours! Thanks for pointing that out!