Working CPP way of writing data

This commit is contained in:
2026-02-24 16:40:17 +01:00
parent 8f4e887b9d
commit 9930ce4461
10 changed files with 803 additions and 171 deletions

32
tools/Makefile Normal file
View File

@@ -0,0 +1,32 @@
TOOLCHAIN_PREFIX ?=
CC := $(TOOLCHAIN_PREFIX)g++
TARGET := test
SRCS_C :=
SRCS_CPP:= test.cpp digilent_jtag.cpp
OBJS := $(SRCS_C:.c=.o) $(SRCS_CPP:.cpp=.o)
ADEPT_LIBDIR := /opt/packages/digilent.adept.runtime_2.27.9-x86_64/lib64
CFLAGS :=
ASFLAGS :=
LDFLAGS := -L$(ADEPT_LIBDIR) -Wl,--disable-new-dtags -Wl,-rpath,$(ADEPT_LIBDIR)
LIBS := -ldjtg -ldmgr -ldpcomm -ldabs -ldftd2xx
.PHONY: all clean size
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
%.o: %.cpp
$(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f $(TARGET) $(OBJS)