0.6.3 Changes since last version
[digitaldcpower] / Makefile
index 0c37a99..a07cb92 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -25,10 +25,12 @@ OBJCOPY=avr-objcopy
 # optimize for size:
 CFLAGS=-g -mmcu=$(MCU) -Wall -W -Os -mcall-prologues
 # #-------------------
-.PHONY: test_lcd test_dac all main 
+.PHONY: test_lcd test_dac all main ddcp-script
 #
 all: main.hex test_lcd.hex test_dac.hex
 #
+ddcp-script: ddcp-script-setval ddcp-script-getval ddcp-script-ttyinit
+#
 main: main.hex 
 #
 test_lcd: test_lcd.hex
@@ -36,6 +38,13 @@ test_lcd: test_lcd.hex
 #
 test_dac: test_dac.hex
        echo "OK"
+#
+ddcp-script-setval: ddcp-script-setval.c
+       gcc -Wall -o ddcp-script-setval ddcp-script-setval.c
+ddcp-script-getval: ddcp-script-getval.c
+       gcc -Wall -o ddcp-script-getval ddcp-script-getval.c
+ddcp-script-ttyinit: ddcp-script-ttyinit.c
+       gcc -Wall -o ddcp-script-ttyinit ddcp-script-ttyinit.c
 #-------------------
 size:
        avr-size *.elf
@@ -47,10 +56,12 @@ help:
        @echo "       program using the avrdude programmer"
        @echo " "
        @echo "Usage: make clean"
-       @echo "       delete all generated files except the pre-compiled ones"
+       @echo "       delete all generated files"
        @echo "Test programs:"
        @echo "Usage: make test_lcd|load_test_lcd|test_dac|load_test_dac"
        @echo "       compile and load test programs"
+       @echo "Usage: make ddcp-script-ttyinit"
+       @echo "       compile unix program to set serial line speed such that one can use scripts to change settings"
 #-------------------
 main.hex: main.elf 
        $(OBJCOPY) -R .eeprom -O ihex main.elf main.hex 
@@ -104,7 +115,8 @@ load_test_dac: test_dac.hex
 #-------------------
 # fuse byte settings:
 #  Atmel AVR ATmega8 
-#  Fuse Low Byte      = 0xe1 (1MHz internal), 0xe3 (4MHz internal), 0xe4 (8MHz internal)
+#  Fuse Low Byte      = 0xe1 (1MHz internal), 0xe4 (8MHz internal)
+#  Fuse Low Byte with BOD  = 0xa1 (1MHz internal), 0xa4 (8MHz internal)
 #  Fuse High Byte     = 0xd9 
 #  Factory default is 0xe1 for low byte and 0xd9 for high byte
 # Check this with make rdfuses
@@ -112,12 +124,12 @@ rdfuses:
        $(LOADCMD) -p $(DUDECPUTYPE) -c stk500v2 -v -q
 # use internal RC oscillator 8 Mhz (lf=0xe4 hf=0xd9)
 fuses:
-       $(LOADCMD) -p  $(DUDECPUTYPE) -c stk500v2 -u -v -U lfuse:w:0xe4:m
+       $(LOADCMD) -p  $(DUDECPUTYPE) -c stk500v2 -u -v -U lfuse:w:0xa4:m
        $(LOADCMD) -p  $(DUDECPUTYPE) -c stk500v2 -u -v -U hfuse:w:0xd9:m
 fuse:
-       $(LOADCMD) -p  $(DUDECPUTYPE) -c stk500v2 -u -v -U lfuse:w:0xe4:m
+       $(LOADCMD) -p  $(DUDECPUTYPE) -c stk500v2 -u -v -U lfuse:w:0xa4:m
        $(LOADCMD) -p  $(DUDECPUTYPE) -c stk500v2 -u -v -U hfuse:w:0xd9:m
 #-------------------
 clean:
-       rm -f *.o *.map *.elf test*.hex main.hex 
+       rm -f *.o *.map *.elf test*.hex main.hex ddcp-script-ttyinit ddcp-script-getval ddcp-script-setval
 #-------------------