Solved
Cannot convert 'std::string' {aka 'std::__cxx11::basic_string'} to 'const char*'
Here is my c++ code:
void print_console(std::string msg)
{
const char *p = msg.c_str();
HAL_UART_Transmit_DMA(CONSOLE, p, strlen(msg));
while (console_tx_flag == 0); // Wait until the uart transmit is complete
console_tx_flag = 0;
}
Does anyone know how to fix this? The error is pointing to the HAL_UART_Transmis_DMA()
Thank you!