diff options
author | James <james.mckenzie@citrix.com> | 2013-10-13 12:40:04 +0100 |
---|---|---|
committer | James <james.mckenzie@citrix.com> | 2013-10-13 12:40:04 +0100 |
commit | 7fbec04d3aaca8909f89b325e125e46fe218e3be (patch) | |
tree | a68fdbffc4e1e5afbf432050dcc149377db4ae60 /Makefile | |
parent | 4b11bace5f256d07655817ff110dfef2ac9e36e8 (diff) | |
download | sdram-7fbec04d3aaca8909f89b325e125e46fe218e3be.tar.gz sdram-7fbec04d3aaca8909f89b325e125e46fe218e3be.tar.bz2 sdram-7fbec04d3aaca8909f89b325e125e46fe218e3be.zip |
fish
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 81 |
1 files changed, 41 insertions, 40 deletions
@@ -1,21 +1,21 @@ -PROJ=pong +PROJ=sdram SRCS=$(wildcard *.vhd *.v *.qsf *.qpf ) SRCS += $(shell find DM9000A -type f -print ) SRCS += $(shell find GPU -type f -print ) -#BSP_DIR=bsp -#QSYS=pong_mcu -#SOPC_FILE=${QSYS}.sopcinfo -#BSP_TYPE=hal -#NIOS2_BSP_ARGS="" -#CPU_NAME= +BSP_DIR=bsp +QSYS=sdram_mcu +SOPC_FILE=${QSYS}.sopcinfo +BSP_TYPE=hal +NIOS2_BSP_ARGS="" +CPU_NAME= -#ELF=src/${PROJ}.elf -#SOF=${PROJ}.sof +ELF=src/${PROJ}.elf +SOF=${PROJ}.sof -#default: load_elf.stamp -default: load_sof.stamp +default: load_elf.stamp +#default: load_sof.stamp sta.stamp:asm.stamp @@ -36,29 +36,30 @@ ans.stamp: source.stamp tools/wrap quartus_map --read_settings_files=on --write_settings_files=off ${PROJ} -c ${PROJ} touch $@ -#${SOPC_FILE}:ans.stamp -# -#source.stamp:${SRC} -# touch source.stamp -# -#${ELF}: src/Makefile -# tools/wrap make -C src +${SOPC_FILE}:ans.stamp -#elf.stamp:${ELF} -# touch $@ - -#src/Makefile: bsp.stamp -# tools/wrap nios2-app-generate-makefile --bsp-dir bsp --src-rdir src --app-dir src --elf-name ${PROJ}.elf -#bsp.stamp:${SOPC_FILE} -# /bin/rm -rf ${BSP_DIR} -# mkdir -p ${BSP_DIR} -# tools/wrap nios2-bsp ${BSP_TYPE} ${BSP_DIR} ${SOPC_FILE} ${NIOS2_BSP_ARGS} ${CPU_NAME} -# tools/wrap make -C ${BSP_DIR} -# touch $@ +source.stamp:${SRC} + touch source.stamp + +${ELF}: src/Makefile + tools/wrap make -C src + +elf.stamp:${ELF} + touch $@ + +src/Makefile: bsp.stamp + tools/wrap nios2-app-generate-makefile --bsp-dir bsp --src-rdir src --app-dir src --elf-name ${PROJ}.elf + +bsp.stamp:${SOPC_FILE} + /bin/rm -rf ${BSP_DIR} + mkdir -p ${BSP_DIR} + tools/wrap nios2-bsp ${BSP_TYPE} ${BSP_DIR} ${SOPC_FILE} ${NIOS2_BSP_ARGS} ${CPU_NAME} + tools/wrap make -C ${BSP_DIR} + touch $@ -#load_elf.stamp:${ELF} load_sof.stamp -# tools/wrap nios2-download ${ELF} -g +load_elf.stamp:${ELF} load_sof.stamp + tools/wrap nios2-download ${ELF} -g load_sof.stamp: ${SOF} tools/wrap quartus_pgm -m JTAG -o "p;${SOF}" @@ -67,18 +68,18 @@ load_sof.stamp: ${SOF} sof.flash: ${SOF} tools/wrap sof2flash --input=$< --output=$@ --epcs --verbose -#elf.flash: ${ELF} sof.flash -# tools/wrap elf2flash --input=${ELF} --output=$@ --epcs --after=sof.flash --verbose +elf.flash: ${ELF} sof.flash + tools/wrap elf2flash --input=${ELF} --output=$@ --epcs --after=sof.flash --verbose -#qsys: -# tools/wrap qsys-edit ${QSYS}.qsys --project-dir=${PWD} --system-info=DEVICE_FAMILY="Cyclone II" --system-info=DEVICE=EP2C8Q208C8 --system-info=DEVICE_SPEEDGRADE=8 --host-controller +qsys: + tools/wrap qsys-edit ${QSYS}.qsys --project-dir=${PWD} --system-info=DEVICE_FAMILY="Cyclone II" --system-info=DEVICE=EP2C8Q208C8 --system-info=DEVICE_SPEEDGRADE=8 --host-controller -#${BSP_DIR}/system.h:bsp.stamp +${BSP_DIR}/system.h:bsp.stamp -#flash: load_sof.stamp sof.flash elf.flash ${BSP_DIR}/system.h -# BASE=` grep EPCS_FLASH_CONTROLLER_0_BASE ${BSP_DIR}/system.h | awk '{print $$3}' ` && \ -# tools/wrap nios2-flash-programmer sof.flash --base=$${BASE} --epcs --accept-bad-sysid --device=1 --instance=0 --program --verbose && \ -# tools/wrap nios2-flash-programmer elf.flash --base=$${BASE} --epcs --accept-bad-sysid --device=1 --instance=0 --program --verbose -g +flash: load_sof.stamp sof.flash elf.flash ${BSP_DIR}/system.h + BASE=` grep EPCS_FLASH_CONTROLLER_0_BASE ${BSP_DIR}/system.h | awk '{print $$3}' ` && \ + tools/wrap nios2-flash-programmer sof.flash --base=$${BASE} --epcs --accept-bad-sysid --device=1 --instance=0 --program --verbose && \ + tools/wrap nios2-flash-programmer elf.flash --base=$${BASE} --epcs --accept-bad-sysid --device=1 --instance=0 --program --verbose -g clean: /bin/rm -rf ${BSP_DIR} db incremental_db src/obj |