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

use riscv64-unknown-elf-objcopy instead of Srec2vmem.py #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 6 additions & 8 deletions lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ AS = ${TOOL_EXTENSION}as
LINK = ${TOOL_EXTENSION}ld
OBJDUMP = ${TOOL_EXTENSION}objdump
OBJCOPY = ${TOOL_EXTENSION}objcopy
#CONVERT =../tools/Srec2vmem
CONVERT =../tools/Srec2vmem.py

SSRC = $(wildcard *.S)
sSRC = $(wildcard *.s)
Expand Down Expand Up @@ -51,6 +49,8 @@ OBJDUMPFLAGS = -S -Mnumeric

HEXFLAGS = -O srec

PATFLAGS = -O verilog

%.o : %.c
${CC} -c ${CFLAGS} -o $@ $<

Expand All @@ -61,20 +61,18 @@ HEXFLAGS = -O srec
${CC} -c ${CFLAGS} -o $@ $<

${FILE}.elf : ${OBJECTS} linker.lcf
${CC} ${LINKFLAGS} ${LINKLIBS} ${OBJECTS} -o $@ -lm
${CC} ${LINKFLAGS} ${LINKLIBS} ${OBJECTS} -o $@ -lm

${FILE}.obj : ${FILE}.elf
${OBJDUMP} ${OBJDUMPFLAGS} $< > $@


${FILE}.hex : ${FILE}.elf
${OBJCOPY} ${HEXFLAGS} $< $@

${OBJCOPY} ${HEXFLAGS} $< $@

%.pat : %.hex
rm -f *.pat
#${CONVERT} $< test.pat
${CONVERT} -i $< -o test.pat
${OBJCOPY} ${PATFLAGS} $< test.pat


#--------------------------------------------------------------------
Expand All @@ -84,7 +82,7 @@ all : ${FILE}.pat ${FILE}.hex ${FILE}.elf ${FILE}.obj

#---------------------------------------------------------------------
# clean some medium code and .pat
.PHONY :clean
.PHONY :clean
clean:
rm -rf *.o *.pat *.elf *.obj *.hex