cpu/vexriscv: use specific mem_map for linux variant

This commit is contained in:
Florent Kermarrec 2019-10-07 08:49:32 +02:00
parent 2dfe7441d6
commit 975bd9be8b
1 changed files with 10 additions and 0 deletions

View File

@ -81,6 +81,15 @@ class VexRiscv(CPU, AutoCSR):
gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed")
linker_output_format = "elf32-littleriscv"
@property
def mem_map_linux(self):
return {
"rom": 0x00000000,
"sram": 0x10000000,
"main_ram": 0xc0000000,
"csr": 0xf0000000,
}
@property
def gcc_flags(self):
flags = GCC_FLAGS[self.variant]
@ -132,6 +141,7 @@ class VexRiscv(CPU, AutoCSR):
if "linux" in variant:
self.add_timer()
self.mem_map = self.mem_map_linux
if "debug" in variant:
self.add_debug()