stm32: disable UART up_putc when semihosting

Do not compile up_putc functions in stm32_serial.c to avoid conflicts
with implementation from arm_semi_syslog.c when semihosting is enabled.

Signed-off-by: Jean THOMAS <jean@lambdaconcept.com>
This commit is contained in:
Jean THOMAS
2026-01-20 17:23:35 +01:00
committed by Xiang Xiao
parent 4710b2f632
commit 6581e312f5
+4
View File
@@ -3688,6 +3688,7 @@ void stm32_serial_dma_poll(void)
*
****************************************************************************/
#ifndef CONFIG_ARM_SEMIHOSTING_SYSLOG
void up_putc(int ch)
{
#if CONSOLE_UART > 0
@@ -3704,6 +3705,7 @@ void up_putc(int ch)
up_restoreusartint(priv, ie);
#endif
}
#endif
#else /* USE_SERIALDRIVER */
@@ -3715,11 +3717,13 @@ void up_putc(int ch)
*
****************************************************************************/
#ifndef CONFIG_ARM_SEMIHOSTING_SYSLOG
void up_putc(int ch)
{
#if CONSOLE_UART > 0 || CONSOLE_LPUART > 0
arm_lowputc(ch);
#endif
}
#endif
#endif /* USE_SERIALDRIVER */