mbv: now with functioning timer interrupts!
And a few other nice things. The bootloader now has an embedded wozmon! If you know its offset, you can jump to it from the app.
This commit is contained in:
38
mbv/configure
vendored
38
mbv/configure
vendored
@@ -18,6 +18,7 @@ hostcflags = "-g -std=c++20 -fprofile-instr-generate -fcoverage-mapping"
|
||||
hostlibs = "-lgtest -lgmock -lgtest_main"
|
||||
hostldflags = "-fprofile-instr-generate -fcoverage-mapping"
|
||||
include_dirs = [
|
||||
"hal",
|
||||
"hal/uart",
|
||||
"hal/lib/common",
|
||||
]
|
||||
@@ -31,7 +32,7 @@ common_flags = [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-flto",
|
||||
"-march=rv32i",
|
||||
"-march=rv32i_zicsr",
|
||||
"-ffunction-sections",
|
||||
"-Oz",
|
||||
]
|
||||
@@ -44,7 +45,7 @@ ldflags = [
|
||||
"-Wl,--gc-sections",
|
||||
"-Wl,--print-memory-usage",
|
||||
"-flto",
|
||||
"-march=rv32i",
|
||||
"-march=rv32i_zicsr",
|
||||
]
|
||||
|
||||
|
||||
@@ -244,6 +245,8 @@ def make_coverage(binaries):
|
||||
|
||||
|
||||
hal = source_set("hal", [
|
||||
"hal/intc.cc",
|
||||
"hal/interrupts.cc",
|
||||
"hal/start.cc",
|
||||
"hal/lib/common/xil_assert.c",
|
||||
"hal/uart/xuartlite.c",
|
||||
@@ -252,9 +255,6 @@ hal = source_set("hal", [
|
||||
])
|
||||
|
||||
bootloader = source_set("bootloader", glob.glob("./bootloader/**/*.cc", recursive=True))
|
||||
helloworld = source_set("helloworld", glob.glob("./apps/helloworld/**/*.cc", recursive=True))
|
||||
wozmon = source_set("wozmon", glob.glob("./apps/wozmon/**/*.cc", recursive=True))
|
||||
|
||||
bootloader_image = build_image(
|
||||
bootloader,
|
||||
dependencies=[hal],
|
||||
@@ -262,22 +262,22 @@ bootloader_image = build_image(
|
||||
linker_script="bootloader/bootloader.ld",
|
||||
)
|
||||
|
||||
helloworld_image = build_image(
|
||||
helloworld,
|
||||
dependencies=[hal],
|
||||
elf_out="out/helloworld.elf",
|
||||
bin_out="out/helloworld.bin",
|
||||
)
|
||||
def app_image(app):
|
||||
return build_image(
|
||||
source_set(app, glob.glob(f"./apps/{app}/**/*.cc", recursive=True)),
|
||||
dependencies=[hal],
|
||||
elf_out=f"out/{app}.elf",
|
||||
bin_out=f"out/{app}.bin",
|
||||
)
|
||||
|
||||
wozmon_image = build_image(
|
||||
wozmon,
|
||||
dependencies=[hal],
|
||||
elf_out="out/wozmon.elf",
|
||||
bin_out="out/wozmon.bin",
|
||||
linker_script = "apps/fromddr.ld",
|
||||
)
|
||||
all = [
|
||||
build_source_set(hal),
|
||||
bootloader_image,
|
||||
|
||||
all = [build_source_set(hal), bootloader_image, helloworld_image, wozmon_image]
|
||||
app_image("helloworld"),
|
||||
app_image("wozmon"),
|
||||
app_image("timer"),
|
||||
]
|
||||
|
||||
|
||||
def parse_args():
|
||||
|
Reference in New Issue
Block a user