Merge pull request #341 from mkj/progtools

orangecrab programming targets
fpu-constant
Michael Neuling 3 years ago committed by GitHub
commit fda8879e2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,9 +11,12 @@ GHDLSYNTH ?= $(shell ($(YOSYS) -H | grep -q ghdl) || echo -m ghdl)
YOSYS ?= yosys YOSYS ?= yosys
NEXTPNR ?= nextpnr-ecp5 NEXTPNR ?= nextpnr-ecp5
ECPPACK ?= ecppack ECPPACK ?= ecppack
ECPPROG ?= ecpprog
OPENOCD ?= openocd OPENOCD ?= openocd
VUNITRUN ?= python3 ./run.py VUNITRUN ?= python3 ./run.py
VERILATOR ?= verilator VERILATOR ?= verilator
DFUUTIL ?= dfu-util
DFUSUFFIX ?= dfu-suffix


# We need a version of GHDL built with either the LLVM or gcc backend. # We need a version of GHDL built with either the LLVM or gcc backend.
# Fedora provides this, but other distros may not. Another option is to use # Fedora provides this, but other distros may not. Another option is to use
@ -165,6 +168,7 @@ PACKAGE=CSFBGA285
NEXTPNR_FLAGS=--um5g-85k --freq 48 NEXTPNR_FLAGS=--um5g-85k --freq 48
OPENOCD_JTAG_CONFIG=openocd/olimex-arm-usb-tiny-h.cfg OPENOCD_JTAG_CONFIG=openocd/olimex-arm-usb-tiny-h.cfg
OPENOCD_DEVICE_CONFIG=openocd/LFE5UM5G-85F.cfg OPENOCD_DEVICE_CONFIG=openocd/LFE5UM5G-85F.cfg
ECP_FLASH_OFFSET=0x80000
endif endif


# OrangeCrab with ECP85 (v0.21) # OrangeCrab with ECP85 (v0.21)
@ -177,6 +181,9 @@ PACKAGE=CSFBGA285
NEXTPNR_FLAGS=--85k --speed 8 --freq 40 NEXTPNR_FLAGS=--85k --speed 8 --freq 40
OPENOCD_JTAG_CONFIG=openocd/olimex-arm-usb-tiny-h.cfg OPENOCD_JTAG_CONFIG=openocd/olimex-arm-usb-tiny-h.cfg
OPENOCD_DEVICE_CONFIG=openocd/LFE5U-85F.cfg OPENOCD_DEVICE_CONFIG=openocd/LFE5U-85F.cfg
DFU_VENDOR=1209
DFU_PRODUCT=5af0
ECP_FLASH_OFFSET=0x80000
endif endif


# ECP5-EVN # ECP5-EVN
@ -233,6 +240,21 @@ microwatt.svf: microwatt.bit
prog: microwatt.svf prog: microwatt.svf
$(OPENOCD) -f $(OPENOCD_JTAG_CONFIG) -f $(OPENOCD_DEVICE_CONFIG) -c "transport select jtag; init; svf $<; exit" $(OPENOCD) -f $(OPENOCD_JTAG_CONFIG) -f $(OPENOCD_DEVICE_CONFIG) -c "transport select jtag; init; svf $<; exit"


microwatt.dfu: microwatt.bit
cp $< $@.tmp
$(DFUSUFFIX) -v $(DFU_VENDOR) -p $(DFU_PRODUCT) -a $@.tmp
mv $@.tmp $@

dfuprog: microwatt.dfu
$(DFUUTIL) -a 0 -D $<

ecpprog: microwatt.bit
$(ECPPROG) -S $<

ecpflash: microwatt.bit
test -n "$(ECP_FLASH_OFFSET)" || (echo Error: No ECP_FLASH_OFFSET defined for target; exit 1)
$(ECPPROG) -o $(ECP_FLASH_OFFSET) $<

tests = $(sort $(patsubst tests/%.out,%,$(wildcard tests/*.out))) tests = $(sort $(patsubst tests/%.out,%,$(wildcard tests/*.out)))
tests_console = $(sort $(patsubst tests/%.console_out,%,$(wildcard tests/*.console_out))) tests_console = $(sort $(patsubst tests/%.console_out,%,$(wildcard tests/*.console_out)))



Loading…
Cancel
Save