forked from sysprog21/rv32emu
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When you build using the command make ENABLE_SYSTEM=1 -j$(nproc), the default target in the Makefile is invoked. At this stage, the Device Tree Blob (DTB) should already be built before executing rv32emu. Therefore, system.mk is included before the all target in the Makefile.
- Loading branch information
1 parent
0915b75
commit e2bb7f0
Showing
4 changed files
with
23 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Peripherals for system emulation | ||
ifeq ($(call has, SYSTEM), 1) | ||
DEV_OUT := $(OUT)/devices | ||
DEV_SRC := src/devices | ||
|
||
DTC ?= dtc | ||
$(OUT)/minimal.dtb: $(DEV_SRC)/minimal.dts | ||
$(VECHO) " DTC\t$@\n" | ||
$(Q)$(DTC) $^ -o $@ | ||
BUILD_DTB := $(OUT)/minimal.dtb | ||
|
||
$(DEV_OUT)/%.o: $(DEV_SRC)/%.c $(deps_emcc) | ||
$(Q)mkdir -p $(DEV_OUT) | ||
$(VECHO) " CC\t$@\n" | ||
$(Q)$(CC) -o $@ $(CFLAGS) $(CFLAGS_emcc) -c -MMD -MF $@.d $< | ||
DEV_OBJS := $(patsubst $(DEV_SRC)/%.c, $(DEV_OUT)/%.o, $(wildcard $(DEV_SRC)/*.c)) | ||
deps += $(DEV_OBJS:%.o=%.o.d) | ||
|
||
OBJS_EXT += system.o | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters