Hi everyone,

I'm revisiting the semihosting topic on STM32F4 this time.

First of all, I somehow missed Alan's email about the documentation he created. 
His documentation was easy to follow, and sure enough I was able to get it 
almost working.

What wasn't working out of the box on NuttX 12.12.0 is simply a conflict of 
up_putc definitions. Enclosing the up_putc definition with #ifndef 
CONFIG_ARM_SEMIHOSTING_SYSLOG got it working:

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

Would this be the right way to fix it? Can I create a PR on GitHub, or should I 
send a patch elsewhere to avoid GitHub Actions runner issues?

Best regards,
Jean.

Reply via email to