Skip to content

Commit

Permalink
scripts: fix missing top.qpf when opening quartus directly
Browse files Browse the repository at this point in the history
  • Loading branch information
NikLeberg committed Jan 4, 2024
1 parent d326b1e commit 2a2301b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/makefile.quartus
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,18 @@ obj/%.psl.o:
.PHONY: synth
synth: output_files/top.sof

output_files/top.sof: quartus_project.tcl $(OBJS)
@quartus_sh -t quartus_project.tcl
output_files/top.sof: top.qpf
@quartus_sh -t $(PROJ_ROOT)/scripts/quartus/quartus_compile.tcl
MAKE_CLEAN += flowsummary.log

top.qpf: quartus_project.tcl $(OBJS)
@quartus_sh -t quartus_project.tcl
MAKE_CLEAN += top.qpf top.qsf

quartus_project.tcl:
@cp $(PROJ_ROOT)/scripts/quartus/quartus_project.tcl.template quartus_project.tcl
@sed -i 's/<<top_level_entity>>/$(TOP)/g' quartus_project.tcl
MAKE_CLEAN += quartus_project.tcl top.qpf top.qsf
MAKE_CLEAN += quartus_project.tcl

.PHONY: program
program: output_files/top.sof
Expand All @@ -64,8 +67,9 @@ flash: output_files/top.sof
@quartus_pgm $(PROJ_ROOT)/scripts/quartus/quartus_flash.cdf

.PHONY: open
open: quartus_project.tcl $(OBJS)
open: top.qpf $(OBJS)
@quartus top.qpf
MAKE_CLEAN += top.*.rpt top.*.summary

.PHONY: clean
clean:
Expand Down

0 comments on commit 2a2301b

Please sign in to comment.