cpu/gowin_emcu: Add gcc_flags method and set UART_POLLING in it.

This commit is contained in:
Florent Kermarrec 2024-01-03 19:15:46 +01:00
parent 456dda050c
commit 3f9de470f6
2 changed files with 8 additions and 2 deletions

View File

@ -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()

View File

@ -16,7 +16,6 @@ void busy_wait_us(unsigned int us);
// FIXME
#define CSR_UART_BASE
#define UART_POLLING
struct EMCU_UART
{