UART_BASE is now volatile, preventing unexpected optimizations

This commit is contained in:
Imbus 2025-06-26 04:05:03 +02:00
parent 8959bc87b8
commit e2a8bf287f

View file

@ -5,7 +5,7 @@
#define NCPU 3
/* QEMU memory maps a UART device here. */
#define UART_BASE ((char *)0x10000000)
#define UART_BASE ((volatile char *)0x10000000)
/** Send a single character to the UART device */
void uart_putc(char c) { *UART_BASE = c; }