1 Star 0 Fork 0

ic-starter/lambdasoc-bios

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
litex.mk 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
Jean-François Nguyen 提交于 2021-06-28 19:05 . Add LiteDRAM support.
ifdef CONFIG_CPU_MINERVA
LITEX_CPU_DIR := $(top)/3rdparty/litex/litex/soc/cores/cpu/minerva
CPPFLAGS_litex := -D__minerva__
else
$(error Unsupported CPU)
endif
LITEX_SW_DIR := $(top)/3rdparty/litex/litex/soc/software
LITEX_INC_DIR := $(top)/3rdparty/litex/litex/soc/software/include
LITEX_GEN_DIR := $(top)/src/drivers/sdram/include
CPPFLAGS_litex += \
-nostdinc \
-I$(LITEX_CPU_DIR) \
-I$(LITEX_SW_DIR) \
-I$(LITEX_INC_DIR) \
-I$(LITEX_INC_DIR)/base \
-I$(LITEX_GEN_DIR) \
-I$(litedram_dir) \
-I$(build) \
litex-obj := $(obj)/3rdparty/litex
ifdef crt-y
liblitex-objs += $(crt-objs)
endif
ifdef libbase-y
libbase-src := $(LITEX_SW_DIR)/libbase
libbase-obj := $(litex-obj)/libbase
liblitex-objs += $(addprefix $(libbase-obj)/,$(libbase-y))
$(libbase-obj)/%.o: CPPFLAGS = $(CPPFLAGS_litex)
$(libbase-obj)/%.o: $(libbase-src)/%.c
$(COMPILE.c) -o $@ $<
endif
ifdef liblitedram-y
liblitedram-src := $(LITEX_SW_DIR)/liblitedram
liblitedram-obj := $(litex-obj)/liblitedram
liblitex-objs += $(addprefix $(liblitedram-obj)/,$(liblitedram-y))
$(liblitedram-obj)/%.o: CPPFLAGS = $(CPPFLAGS_litex)
$(liblitedram-obj)/%.o: $(liblitedram-src)/%.c
$(COMPILE.c) -o $@ $<
endif
$(foreach obj,$(liblitex-objs), \
$(eval dirs += $(dir $(obj))))
LDFLAGS += -L$(litex-obj)
LDLIBS += -llitex
deps += $(liblitex-objs:.o=.d)
$(litex-obj)/liblitex.a: $(liblitex-objs)
$(AR) crs $@ $^
$(obj)/bios.elf: $(litex-obj)/liblitex.a
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ic-starter/lambdasoc-bios.git
git@gitee.com:ic-starter/lambdasoc-bios.git
ic-starter
lambdasoc-bios
lambdasoc-bios
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385