Add FPGA_TARGET=ECP5-EVN make option for synthesis build

This allows these targets
  FPGA_TARGET=ORANGE-CRAB make microwatt.bit
  FPGA_TARGET=ECP5-EVN make microwatt.bit
Default is ORANGE-CRAB as before

ECP5-EVN is tested on real hardware. The console only works at 38400 so
needs this in console.c and a recompile of hello_world to work:

  -#define UART_FREQ 115200
  +#define UART_FREQ 38400

With this 'FPGA_TARGET=ECP5-EVN make prog' works on the ECP5 dev board.

Signed-off-by: Michael Neuling <mikey@neuling.org>
pull/209/head
Michael Neuling 5 years ago
parent ef0dcf3bc6
commit 10a1a86ba0

@ -143,7 +143,10 @@ RAM_INIT_FILE=hello_world/hello_world.hex
#MEMORY_SIZE=393216 #MEMORY_SIZE=393216
#RAM_INIT_FILE=micropython/firmware.hex #RAM_INIT_FILE=micropython/firmware.hex


FPGA_TARGET ?= ORANGE-CRAB

# OrangeCrab with ECP85 # OrangeCrab with ECP85
ifeq ($(FPGA_TARGET), ORANGE-CRAB)
RESET_LOW=true RESET_LOW=true
CLK_INPUT=50000000 CLK_INPUT=50000000
CLK_FREQUENCY=50000000 CLK_FREQUENCY=50000000
@ -152,16 +155,19 @@ PACKAGE=CSFBGA285
NEXTPNR_FLAGS=--um5g-85k --freq 50 NEXTPNR_FLAGS=--um5g-85k --freq 50
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
endif


# ECP5-EVN # ECP5-EVN
#RESET_LOW=true ifeq ($(FPGA_TARGET), ECP5-EVN)
#CLK_INPUT=12000000 RESET_LOW=true
#CLK_FREQUENCY=12000000 CLK_INPUT=12000000
#LPF=constraints/ecp5-evn.lpf CLK_FREQUENCY=12000000
#PACKAGE=CABGA381 LPF=constraints/ecp5-evn.lpf
#NEXTPNR_FLAGS=--um5g-85k --freq 12 PACKAGE=CABGA381
#OPENOCD_JTAG_CONFIG=openocd/ecp5-evn.cfg NEXTPNR_FLAGS=--um5g-85k --freq 12
#OPENOCD_DEVICE_CONFIG=openocd/LFE5UM5G-85F.cfg OPENOCD_JTAG_CONFIG=openocd/ecp5-evn.cfg
OPENOCD_DEVICE_CONFIG=openocd/LFE5UM5G-85F.cfg
endif


GHDL_IMAGE_GENERICS=-gMEMORY_SIZE=$(MEMORY_SIZE) -gRAM_INIT_FILE=$(RAM_INIT_FILE) \ GHDL_IMAGE_GENERICS=-gMEMORY_SIZE=$(MEMORY_SIZE) -gRAM_INIT_FILE=$(RAM_INIT_FILE) \
-gRESET_LOW=$(RESET_LOW) -gCLK_INPUT=$(CLK_INPUT) -gCLK_FREQUENCY=$(CLK_FREQUENCY) -gRESET_LOW=$(RESET_LOW) -gCLK_INPUT=$(CLK_INPUT) -gCLK_FREQUENCY=$(CLK_FREQUENCY)

Loading…
Cancel
Save