1 # Point to a suitable monospaced TTF font: DejaVu Sans Mono will work, see:
2 # https://dejavu-fonts.github.io/
3 FONT
=$(shell fc-match
-f
%{file
} mono
)
7 console.json
: top.v usbkbd.v hdmi.v chargen.v font.hex char0.hex attr0.hex char1.hex attr1.hex
8 yosys
-e .
-q
-p
"synth_ecp5 -json $@" top.v usbkbd.v hdmi.v chargen.v
10 font.hex
: font
$(FONT
)
14 $(CC
) -o
$@
$< -I
/usr
/include/freetype2
-lfreetype
16 char0.hex attr0.hex char1.hex attr1.hex
: char
21 %.config
: %.json fpc-iii.lpf
22 nextpnr-ecp5
--json
$< --textcfg
$@
--85k
--speed
8 --package CABGA381
--lpf fpc-iii.lpf
25 ecppack
--compress
--svf
$@
$<
28 ecppack
--compress
--svf-spiflash
--freq
62.0 --spimode dual-spi
--svf
$@
$<
31 openocd
-l openocd.log
-f fpc-iii.cfg
-c
"init; svf $<; exit"
33 flash
: console-flash.svf
34 openocd
-l openocd.log
-f fpc-iii.cfg
-c
"init; svf $<; exit"
37 rm -f
*.svf
*.config
*.json
*.log
39 .PHONY
: all install clean