aboutsummaryrefslogtreecommitdiff
path: root/src/include/console/uart.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/console/uart.h')
-rw-r--r--src/include/console/uart.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/console/uart.h b/src/include/console/uart.h
index b08cd9b4f1..d4020c3aa0 100644
--- a/src/include/console/uart.h
+++ b/src/include/console/uart.h
@@ -69,6 +69,14 @@ static inline void __uart_tx_byte(u8 data) {}
static inline void __uart_tx_flush(void) {}
#endif
+#if CONFIG_GDB_STUB && (ENV_ROMSTAGE || ENV_RAMSTAGE)
+#define CONFIG_UART_FOR_GDB CONFIG_UART_FOR_CONSOLE
+static inline void __gdb_hw_init(void) { uart_init(CONFIG_UART_FOR_GDB); }
+static inline void __gdb_tx_byte(u8 data) { uart_tx_byte(CONFIG_UART_FOR_GDB, data); }
+static inline void __gdb_tx_flush(void) { uart_tx_flush(CONFIG_UART_FOR_GDB); }
+static inline u8 __gdb_rx_byte(void) { return uart_rx_byte(CONFIG_UART_FOR_GDB); }
+#endif
+
#endif /* __ROMCC__ */
#endif /* CONSOLE_UART_H */