diff --git a/litex/soc/cores/cpu/gowin_emcu/core.py b/litex/soc/cores/cpu/gowin_emcu/core.py index dddf86e23..5046f01a2 100644 --- a/litex/soc/cores/cpu/gowin_emcu/core.py +++ b/litex/soc/cores/cpu/gowin_emcu/core.py @@ -23,7 +23,6 @@ class GowinEMCU(CPU): data_width = 32 endianness = "little" gcc_triple = "arm-none-eabi" - gcc_flags = "-mcpu=cortex-m3 -mthumb" linker_output_format = "elf32-littlearm" nop = "nop" io_regions = { @@ -32,6 +31,7 @@ class GowinEMCU(CPU): 0xa000_0000: 0x6000_0000 } + # Memory Mapping. @property def mem_map(self): return { @@ -41,6 +41,13 @@ class GowinEMCU(CPU): "csr" : 0xa000_0000, } + # GCC Flags. + @property + def gcc_flags(self): + flags = f" -mcpu=cortex-m3 -mthumb" + flags += f" -DUART_POLLING" + return flags + def __init__(self, platform, variant, *args, **kwargs): super().__init__(*args, **kwargs) self.reset = Signal() diff --git a/litex/soc/cores/cpu/gowin_emcu/system.h b/litex/soc/cores/cpu/gowin_emcu/system.h index 2fc3a77d1..1e0b33aab 100644 --- a/litex/soc/cores/cpu/gowin_emcu/system.h +++ b/litex/soc/cores/cpu/gowin_emcu/system.h @@ -16,7 +16,6 @@ void busy_wait_us(unsigned int us); // FIXME #define CSR_UART_BASE -#define UART_POLLING struct EMCU_UART {