summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLibravatar bigfoot547 <[email protected]>2026-04-26 22:19:39 -0500
committerLibravatar bigfoot547 <[email protected]>2026-04-26 22:19:39 -0500
commitcda9fb35b2da751cd0b3b22e47e94b5369432455 (patch)
treee5e3749d5030ff501633991fcb916d5a4328bb99 /Makefile
initial commit
current concerns: potential timing issues when interacting with FTDI chip
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile57
1 files changed, 57 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2ef1916
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,57 @@
+# CUPL config
+CUPL_INSTALL := C:\WinCUPL
+CUPL_LIB = ${CUPL_INSTALL}\Shared\cupl.dl
+CUPL_PATH = ${CUPL_INSTALL}\Shared\cupl.exe
+CUPL_DEV := F1502ISPTQFP44
+
+# SIM config
+CSIM_PATH = ${CUPL_INSTALL}\Shared\csim.exe
+
+# Fitter config
+# (replace with fitter matching device)
+FITTER_PATH := ${CUPL_INSTALL}\Fitters\fit1502.exe
+FIT_PKG := TQFP44
+FIT_TECH := ATF1502ASV
+FIT_ARG = -device ${FIT_PKG} -tech ${FIT_TECH}
+
+# bottles config
+BOTTLES_CLI := bottles-cli
+BOTTLE_NAME := wincupl ii
+
+# project config
+PROJ_NAME := newnewexi
+PROJ_PATH = C:\users\steamuser\Documents\${PROJ_NAME}
+
+# extra stuff
+CUPL = "${CUPL_PATH}"
+CSIM = "${CSIM_PATH}"
+FITTER = "${FITTER_PATH}"
+
+# windows shell quoting is hell
+BOTTLE_RUN = '${BOTTLES_CLI}' shell -b '${BOTTLE_NAME}' -i
+
+.PHONY: clean, all, compile, fit
+
+all: compile fit sim
+
+compile: ${PROJ_NAME}.pla
+
+fit: ${PROJ_NAME}.tt3
+
+sim: ${PROJ_NAME}.so
+
+clean:
+ rm -f *.abs *.lst *.pla *.doc *.fit *.sim *.tt2 *.tt3
+
+%.pla: %.pld %.si
+ # Real artifacts: .abs, .lst, .pla, .doc
+ ${BOTTLE_RUN} '${CUPL} -sfalbuj "${CUPL_LIB}" "${CUPL_DEV}" "${PROJ_PATH}\$<"'
+
+%.tt2: %.pla
+ test -e "$@"
+
+%.tt3: %.tt2
+ ${BOTTLE_RUN} '${FITTER} -i "${PROJ_PATH}\$<" ${FIT_ARG} -o "${PROJ_PATH}\$(basename $@)"'
+
+%.so: %.si
+ ${BOTTLE_RUN} '${CSIM} -u "${CUPL_LIB}" -l "${PROJ_PATH}\$^" "${PROJ_PATH}\$@"'