This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 6581e312f5a stm32: disable UART up_putc when semihosting
6581e312f5a is described below

commit 6581e312f5a912db2178d734bc8b3ec9a1a26879
Author: Jean THOMAS <[email protected]>
AuthorDate: Tue Jan 20 17:23:35 2026 +0100

    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 <[email protected]>
---
 arch/arm/src/stm32/stm32_serial.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/src/stm32/stm32_serial.c 
b/arch/arm/src/stm32/stm32_serial.c
index c0fd02145e5..2c40ae5fc61 100644
--- a/arch/arm/src/stm32/stm32_serial.c
+++ b/arch/arm/src/stm32/stm32_serial.c
@@ -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 */

Reply via email to