Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bios disassembly file generation rules. #1928

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions litex/soc/software/bios/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ else
LSCRIPT = linker.ld
endif

all: bios.bin
all: bios.bin bios.dis
$(PYTHON) -m litex.soc.software.memusage bios.elf $(CURDIR)/../include/generated/regions.ld $(TRIPLE)

%.bin: %.elf
Expand All @@ -64,6 +64,9 @@ else
$(PYTHON) -m litex.soc.software.crcfbigen $@
endif

%.dis: %.elf
$(OBJDUMP) -D $< > $@

bios.elf: $(BIOS_DIRECTORY)/$(LSCRIPT) $(OBJECTS)

vpath %.a $(PACKAGES:%=../%)
Expand Down Expand Up @@ -94,6 +97,6 @@ VPATH = $(BIOS_DIRECTORY):$(BIOS_DIRECTORY)/cmds:$(CPU_DIRECTORY)
$(assemble)

clean:
$(RM) $(OBJECTS) bios.elf bios.bin .*~ *~
$(RM) $(OBJECTS) bios.elf bios.dis bios.bin .*~ *~

.PHONY: all clean
4 changes: 4 additions & 0 deletions litex/soc/software/common.mak
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,29 @@ endif
AR_normal := $(TARGET_PREFIX)gcc-ar
LD_normal := $(TARGET_PREFIX)ld
OBJCOPY_normal := $(TARGET_PREFIX)objcopy
OBJDUMP_normal := $(TARGET_PREFIX)objdump

CC_quiet = @echo " CC " $@ && $(CC_normal)
CX_quiet = @echo " CX " $@ && $(CX_normal)
AR_quiet = @echo " AR " $@ && $(AR_normal)
LD_quiet = @echo " LD " $@ && $(LD_normal)
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(OBJCOPY_normal)
OBJDUMP_quiet = @echo " OBJDUMP " $@ && $(OBJDUMP_normal)

ifeq ($(V),1)
CC = $(CC_normal)
CX = $(CX_normal)
AR = $(AR_normal)
LD = $(LD_normal)
OBJCOPY = $(OBJCOPY_normal)
OBJDUMP = $(OBJDUMP_normal)
else
CC = $(CC_quiet)
CX = $(CX_quiet)
AR = $(AR_quiet)
LD = $(LD_quiet)
OBJCOPY = $(OBJCOPY_quiet)
OBJDUMP = $(OBJDUMP_quiet)
endif

# http://scottmcpeak.com/autodepend/autodepend.html
Expand Down
Loading