Simple simulation code
Builds a native program on MacOS that runs the NuEVI firmware compiled for x86_64. Only input is arrow keys for menu buttons for now. Only output is console and display. Copied some more library files into the simulation folder, and renamed the modified *.cpp files from the libraries to *_sim.cpp.
This commit is contained in:
parent
c9123b746f
commit
266b3334cb
30 changed files with 8532 additions and 0 deletions
65
simulation/Makefile
Normal file
65
simulation/Makefile
Normal file
|
@ -0,0 +1,65 @@
|
|||
CC=clang
|
||||
CXX=clang++
|
||||
|
||||
CFLAGS= -O0 -g -Wall -Wextra -Wpedantic -Wno-gnu -mmacosx-version-min=10.9 -F/Library/Frameworks
|
||||
CFLAGS += -DARDUINO=10808 -D__MK20DX256__
|
||||
|
||||
CXXFLAGS= $(CFLAGS) -std=c++14
|
||||
|
||||
LIBS=-framework SDL2 -lc++ -lc -framework OpenGL
|
||||
LDFLAGS=-macosx_version_min 10.9
|
||||
|
||||
SYSINC = ~/Documents/Arduino/libraries/Filters ./include
|
||||
INCS = ../NuEVI ./include
|
||||
|
||||
INCDIRS = $(addprefix -isystem ,$(SYSINC))
|
||||
INCDIRS += $(addprefix -I,$(INCS))
|
||||
|
||||
|
||||
TARGET=nuevisim
|
||||
|
||||
CXXFILES= ../NuEVI/menu.cpp \
|
||||
src/nuevisim.cpp \
|
||||
src/simeeprom.cpp \
|
||||
src/Print.cpp \
|
||||
src/simserial.cpp \
|
||||
src/simwire.cpp \
|
||||
src/simmidi.cpp \
|
||||
src/filters.cpp \
|
||||
src/Adafruit_GFX_sim.cpp \
|
||||
src/Adafruit_SSD1306_sim.cpp \
|
||||
src/Adafruit_MPR121_sim.cpp
|
||||
|
||||
OBJS=$(CXXFILES:.cpp=.o) $(CFILES:.c=.o)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
nuevisim: $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $(TARGET) $(LIBS) $^
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(INCDIRS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET) $(OBJS) *.o
|
||||
|
||||
.PHONY: all
|
||||
|
||||
|
||||
# Dependecies
|
||||
DEPS=make.deps
|
||||
|
||||
.PHONY: deps mrproper
|
||||
mrproper: clean
|
||||
rm $(DEPS)
|
||||
deps: $(DEPS)
|
||||
|
||||
H_DEPS=$(wildcard src/*.h) $(wildcard ../NuEVI/*.h)
|
||||
|
||||
make.deps: $(CXXFILES) $(H_DEPS)
|
||||
$(CXX) $(CXXFLAGS) -Wno-deprecated $(INCDIRS) -MM $(DEPS_HS) $^ > $@
|
||||
|
||||
-include .deps/*
|
Loading…
Add table
Add a link
Reference in a new issue