cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure vUART on STM32CubeMX for STM32MP15C-DK2

HugoB
Associate

All,

I am currently working on a project using the STM32MP157C-DK2 Board.

I am implementing the intra-processor communication using the OpenAMP lib.

I am using the STM32CubeMX tool to pre-generate the project for the cortex-M.

However, I can't find the setting to enable the virtual uart driver.

As a result, each time I generate source code with the CubeMX tool, the openamp_conf.h file gets overwriting and so does the VIRTUAL_UART_MODULE_ENABLED macro.

That's very annoying and frustrating because the OpenAMP_FreeRTOS_echo_CM4 demo project looks like having been generated with CubeMX and does have the virtual uart enable.


_legacyfs_online_stmicro_images_0693W00000dJyvVQAS.pngI would expect to find such setting in the Middleware and Software Packs tab under OpenAMP or under the Connectivity tab in CubeMX, but it looks like it isn't there.

Can someone enlighten me on how to do such a thing?

Thanks in advance,

Regards

1 REPLY 1
Jagr
Associate II

I can confirm this condition and agree that this is just annoying.
My workaround suggestion is either to set

 VIRTUAL_UART_MODULE_ENABLED

as a Preprocessor definition under Settings->GCC Compiler->Preprocessor

or to add

/* USER CODE BEGIN INCLUDE */
#include "virt_uart.h"
/* USER CODE END INCLUDE */

in openamp_conf.h

The right way to correct this would be to change the OPENAMP configuration within CubeMX, but I think we'll have to wait for that