eel4746_avr_piano

For our Microprocessor's class final project, we chose to make a chiptune piano using AVR C on two Arduino UNOs.
Log | Files | Refs | README | LICENSE

Makefile (688B)


      1 CC 	= avr-gcc
      2 CFLAGS	= -O2 -Wall -Wextra -mmcu=atmega328p --param=min-pagesize=0
      3 OBJCOPY	= avr-objcopy
      4 
      5 PORT	?= /dev/ttyACM0
      6 
      7 all: notes lcd
      8 
      9 notes:
     10 	${CC} ${CFLAGS} notes.c
     11 	${OBJCOPY} -j .text -j .data -O ihex a.out notes.hex
     12 	rm -f a.out
     13 
     14 flash_notes: notes
     15 	avrdude -p atmega328p -c arduino -P ${PORT} -b 115200 -U flash:w:notes.hex:i
     16 
     17 lcd:
     18 	${CC} ${CFLAGS} lcd.c
     19 	${OBJCOPY} -j .text -j .data -O ihex a.out lcd.hex
     20 	rm -f a.out
     21 
     22 flash_lcd: lcd
     23 	avrdude -p atmega328p -c arduino -P ${PORT} -b 115200 -U flash:w:lcd.hex:i
     24 
     25 serial_setup:
     26 	stty -F ${PORT} raw speed 9600 cs8 -cstopb -parenb
     27 
     28 serial_open:
     29 	od -x --endian=big -w4 ${PORT}
     30 
     31 serial_obsd:
     32 	cu -l ${PORT} -s 9600 | hexdump -C