#
# The probably need to be changed
#

OPENOCD := \
	/usr/local/openocd-0.8.0/bin/openocd-0.8.0.exe

IMPACT := \
	/cygdrive/c/Xilinx/14.7/ISE_DS/ISE/bin/nt64/impact.exe

#
# Program the Console Microcontroller flash via the JTAG interface
#

load_code: console.bin ks10.cfg
	$(OPENOCD) -f ks10.cfg -c "program_device ()"

#
# Reset the Console Microcontroller via the JTAG interface
#

reset: ks10.cfg
	$(OPENOCD) -f ks10.cfg -c "reset" -c "shutdown"

#
# Load firmware into the FPGA Serial Flash
#

load_fpga: esm_ks10.mcs impact.cmd
	$(IMPACT) -batch impact.cmd
