From d0801b36b47d8f3da610597160fde92059fd7e62 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 7 Aug 2017 19:27:05 +0200 Subject: implementation for avr programmer the programmer will receive the binary in blocks of defined size by a program under sw/programmer/linux (moved from sw/linux). --- sw/programmer/avr/makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sw/programmer/avr/makefile (limited to 'sw/programmer/avr/makefile') diff --git a/sw/programmer/avr/makefile b/sw/programmer/avr/makefile new file mode 100644 index 0000000..95fb5fe --- /dev/null +++ b/sw/programmer/avr/makefile @@ -0,0 +1,31 @@ +### +# Project settings +# +TARGET := programmer +SOURCES := $(wildcard *.c) + +### +# Compiler settings +# +CC := avr-gcc +PORT := /dev/ttyUSB0 +MCU := atmega328p + +CFLAGS := -g -Wall -mcall-prologues -mmcu=$(MCU) -Os -I . \ + -DF_CPU=1000000UL +LDFLAGS := -Wl,-gc-sections -Wl,-relax + +.PHONY: all clean program +all: $(TARGET).hex + +clean: + rm -f *.o *.hex *.obj *.bin + +$(TARGET).hex: $(TARGET).bin + avr-objcopy -R .eeprom -O ihex $(TARGET).bin $@ + +$(TARGET).bin: $(SOURCES) + $(CC) $(CFLAGS) $(SOURCES) -o $@ $(LDFLAGS) + +program: $(TARGET).hex + avrdude -p $(MCU) -c usbasp -P usb -U flash:w:$(TARGET).hex -- cgit v1.2.1 From c7925cbb73f319a390507b33e4df44f106822683 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Wed, 23 Aug 2017 16:43:56 +0200 Subject: new programmer interface for linux there is a new program with GUI (gtk3) to send data to its avr conterpart. it needs to be tested, since there may be a few bugs in it; building a GUI was a terrible idea. --- sw/programmer/avr/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/programmer/avr/makefile') diff --git a/sw/programmer/avr/makefile b/sw/programmer/avr/makefile index 95fb5fe..ba2a709 100644 --- a/sw/programmer/avr/makefile +++ b/sw/programmer/avr/makefile @@ -12,7 +12,7 @@ PORT := /dev/ttyUSB0 MCU := atmega328p CFLAGS := -g -Wall -mcall-prologues -mmcu=$(MCU) -Os -I . \ - -DF_CPU=1000000UL + -DF_CPU=1000000UL -DDEBUG LDFLAGS := -Wl,-gc-sections -Wl,-relax .PHONY: all clean program -- cgit v1.2.1