summaryrefslogtreecommitdiff
path: root/rtl
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-05-22 15:04:30 -0600
committerAlejandro Soto <alejandro@34project.org>2024-05-24 05:58:43 -0600
commit4e634e196f542b76933d6bbe1861849557898683 (patch)
tree090a1ab462cd58f4a6e8f7308780b4dd33e77525 /rtl
parente12e7af8b9d125a2dbd247dcd71896e4a6873d5a (diff)
rtl/gfx/firmware: implement mk build for bootrom
Diffstat (limited to 'rtl')
-rw-r--r--rtl/gfx/firmware/mod.mk17
-rw-r--r--rtl/gfx/mod.mk3
2 files changed, 19 insertions, 1 deletions
diff --git a/rtl/gfx/firmware/mod.mk b/rtl/gfx/firmware/mod.mk
new file mode 100644
index 0000000..2a37a9c
--- /dev/null
+++ b/rtl/gfx/firmware/mod.mk
@@ -0,0 +1,17 @@
+cores := gfx_bootrom
+
+define core/gfx_bootrom
+ $(this)/cross := riscv32-none-elf-
+ $(this)/hooks := cc objcopy makehex obj
+
+ $(this)/cc_files := gfx_bootrom.S
+ $(this)/cc_flags = -g -march=rv32imc -mabi=ilp32
+ $(this)/ld_flags := -nostartfiles -nostdlib
+ $(this)/ld_binary := gfx_bootrom
+
+ $(this)/objcopy_src := gfx_bootrom
+ $(this)/objcopy_obj := gfx_bootrom.bin
+
+ $(this)/makehex_src := gfx_bootrom.bin
+ $(this)/makehex_obj := gfx_bootrom.hex
+endef
diff --git a/rtl/gfx/mod.mk b/rtl/gfx/mod.mk
index 6ea0fb1..b10e624 100644
--- a/rtl/gfx/mod.mk
+++ b/rtl/gfx/mod.mk
@@ -1,7 +1,8 @@
cores := gfx_shader_schedif
+subdirs := firmware
define core
- $(this)/deps := axilemu axixbar gfx_shader_schedif if_common picorv32
+ $(this)/deps := axilemu axixbar gfx_bootrom gfx_shader_schedif if_common picorv32
$(this)/rtl_top := gfx_top
$(this)/rtl_dirs := .