diff --git a/control/src/plotty b/control/bin/plotty similarity index 100% rename from control/src/plotty rename to control/bin/plotty diff --git a/control/src/Makefile b/control/src/Makefile index 65e275c..fc1583e 100644 --- a/control/src/Makefile +++ b/control/src/Makefile @@ -1,5 +1,5 @@ # Name: Makefile -# Project: B15F (board15 Famulus Edition) +# Project: B15F (Board 15 Famulus Edition) # Author: Tristan Krause # Creation Date: 2019-03-22 @@ -17,8 +17,9 @@ PATH_TMP_LIB = ../lib/ # outputs OUT_TMP_DRV = $(PATH_TMP_LIB)/libb15fdrv.so -OUT_TMP_CLI = $(PATH_TMP_BIN)/cli.elf -OUT_DRV = $(PATH_LIB)/libb15fdrv.so +OUT_TMP_CLI = $(PATH_TMP_BIN)/cli.elf +OUT_DRV = $(PATH_LIB)/libb15fdrv.so +OUT_PLOTTY = $(PATH_TMP_BIN)/plotty # compiling & linking parameters CFLAGS = -std=c++17 -O3 -Wall -Wextra -fPIC @@ -47,7 +48,7 @@ cli: drv $(OBJECTS_CLI) install: drv @echo "Installing driver..." @mkdir -p $(PATH_INCLUDE) - cp plotty $(PATH_BIN) + cp $(OUT_PLOTTY) $(PATH_BIN) cp $(OUT_TMP_DRV) $(PATH_LIB) cp drv/*.h $(PATH_INCLUDE) diff --git a/control/src/gnuplotscript.gp b/control/src/gnuplotscript.gp deleted file mode 100644 index b106bab..0000000 --- a/control/src/gnuplotscript.gp +++ /dev/null @@ -1,21 +0,0 @@ -set margin 10,10 -unset key -set grid -set title '' -set xlabel 'U_{DS} [V]' -set ylabel 'I_D [mA]' -set xrange [0:5] -set yrange [0:50] -set label at 4,2 'U_{GS} [V] = 440' left -set label at 4,4 'U_{GS} [V] = 460' left -set label at 4,7 'U_{GS} [V] = 480' left -set label at 3,14 'U_{GS} [V] = 500' left -set label at 2,22 'U_{GS} [V] = 520' left -set label at 1,33 'U_{GS} [V] = 540' left -set label at 0,38 'U_{GS} [V] = 560' left -set label at 0,38 'U_{GS} [V] = 580' left -set label at 0,38 'U_{GS} [V] = 600' left -unset output -set terminal qt -unset output -plot "/tmp/tempfile0" using ($1*0.004888):($2*0.048876) binary format="%int16%int16" endian=big title 'U_{GS} [V] = 440' w l,"/tmp/tempfile1" using ($1*0.004888):($2*0.048876) binary format="%int16%int16" endian=big title 'U_{GS} [V] = 460' w l,"/tmp/tempfile2" using ($1*0.004888):($2*0.048876) binary format="%int16%int16" endian=big title 'U_{GS} [V] = 480' w l,"/tmp/tempfile3" using ($1*0.004888):($2*0.048876) binary format="%int16%int16" endian=big title 'U_{GS} [V] = 500' w l,"/tmp/tempfile4" using ($1*0.004888):($2*0.048876) binary format="%int16%int16" endian=big title 'U_{GS} [V] = 520' w l,"/tmp/tempfile5" using ($1*0.004888):($2*0.048876) binary format="%int16%int16" endian=big title 'U_{GS} [V] = 540' w l,"/tmp/tempfile6" using ($1*0.004888):($2*0.048876) binary format="%int16%int16" endian=big title 'U_{GS} [V] = 560' w l,"/tmp/tempfile7" using ($1*0.004888):($2*0.048876) binary format="%int16%int16" endian=big title 'U_{GS} [V] = 580' w l,"/tmp/tempfile8" using ($1*0.004888):($2*0.048876) binary format="%int16%int16" endian=big title 'U_{GS} [V] = 600' w l diff --git a/control/src/graph b/control/src/graph deleted file mode 100755 index 7ca5ed2..0000000 Binary files a/control/src/graph and /dev/null differ diff --git a/control/src/test_plot b/control/src/test_plot deleted file mode 100644 index e1c894d..0000000 Binary files a/control/src/test_plot and /dev/null differ diff --git a/firmware/Makefile b/firmware/Makefile index 875e034..7805486 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -1,5 +1,5 @@ # Name: Makefile -# Project: B15F (board15 Famulus Edition) +# Project: B15F (Board 15 Famulus Edition) # Author: Tristan Krause # Creation Date: 2019-03-22 @@ -8,7 +8,7 @@ LFUSE = D2 HFUSE = 91 EFUSE = FF F_CPU = 8000000 -DEBUG = -DB15F_DEBUG +DEBUG = -Db15f_DEBUG # Environment COMPILER_PATH = avr-g++ @@ -16,8 +16,8 @@ OBJCOPY_PATH = avr-objcopy # Optionen PROGRAMMER = avrispmkII -OUTPUT = B15F.elf -HEX = B15F.hex +OUTPUT = b15f.elf +HEX = b15f.hex MCU = atmega1284p CFLAGS = -Wall -Wextra -std=c++14 -O3 -mmcu=$(MCU) -DF_CPU=$(F_CPU) $(DEBUG) LDFLAGS = @@ -27,15 +27,15 @@ OBJECTS = main.o spi.o mcp23s17.o tlc5615.o adu.o selftest.o global_vars.o us COMPILE = $(COMPILER_PATH) $(CFLAGS) FUSES = (E:$(EFUSE), H:$(HFUSE), L:$(LFUSE)) -B15F: $(OBJECTS) - @echo "Linking..." +b15f: $(OBJECTS) + @echo "Linking binary..." $(COMPILE) $(OBJECTS) -o $(OUTPUT) $(LDFLAGS) $(OBJCOPY_PATH) -O ihex -R .eeprom -R .fuse -R .lock -R .signature $(OUTPUT) $(HEX) help: @echo "This Makefile has the following rules:" - @echo "make B15F .... to compile (default)" + @echo "make b15f .... to compile (default)" @echo "make clean ... to delete objects, elf and hex file" clean: @@ -43,11 +43,11 @@ clean: rm -f $(OBJECTS) $(OUTPUT) $(HEX) checkfuses: - @echo "" @echo "Checking fuses..." - bash -c 'diff -B <( echo "$(FUSES)" ) <( avrdude -Pusb -p $(MCU) -c $(PROGRAMMER) 2>&1 | grep "safemode: Fuses OK" | tail -c 19 ) >/dev/null || avrdude -Pusb -p $(MCU) -c $(PROGRAMMER) -U lfuse:w:0x$(LFUSE):m -U hfuse:w:0x$(HFUSE):m -U efuse:w:0x$(EFUSE):m' + @bash -c 'diff -B <( echo "$(FUSES)" ) <( avrdude -Pusb -p $(MCU) -c $(PROGRAMMER) 2>&1 | grep "safemode: Fuses OK" | tail -c 19 ) >/dev/null || avrdude -Pusb -p $(MCU) -c $(PROGRAMMER) -U lfuse:w:0x$(LFUSE):m -U hfuse:w:0x$(HFUSE):m -U efuse:w:0x$(EFUSE):m' -upload: B15F checkfuses +upload: b15f checkfuses + @echo "Uploading hex file..." avrdude -Pusb -p $(MCU) -c $(PROGRAMMER) -U flash:w:$(HEX) .cpp.o: