diff options
Diffstat (limited to 'src/makefile')
-rw-r--r-- | src/makefile | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/makefile b/src/makefile index 8c6b06d..7191432 100644 --- a/src/makefile +++ b/src/makefile @@ -4,16 +4,17 @@ CC=$(TOOLCHAIN_DIR)/bin/avr-gcc LD=$(TOOLCHAIN_DIR)/bin/avr-ld INC=$(TOOLCHAIN_DIR)/avr/include OUT=compiled_payload.elf -#DEVICE=atmega2560 -DEVICE=atmega328p +DEVICE=atmega2560 +#DEVICE=atmega328p F_CPU=16000000 DEBUG=1 #avrdude options -#PARTNO=ATmega2560 -PARTNO=ATmega328p +PARTNO=ATmega2560 +#PARTNO=ATmega328p PORT=/dev/ttyUSB0 +DEBUG_PORT=/dev/ttyACM0 #only works on atmega2560, intented for debugging flashing BAUD=115200 @@ -41,8 +42,8 @@ eeprom: ./compile_eeprom.py eeprom_install: - $(CC) -mmcu=$(DEVICE) -I $(INC) -o $(OUT) -DFLASH_EEPROM -DDEBUG_BUILD=$(DEBUG) -DBAUD=$(RUNTIME_BAUDRATE) -DF_CPU=$(F_CPU) -Wall -O1 main.c debug.c i2c.c ssd1306_display_driver.c uart.c br24t_eeprom_driver.c paint.c -Wall - doas avrdude -B 1 -v -p $(PARTNO) -c usbtiny -U flash:w:$(OUT):e + $(CC) -mmcu=atmega2560 -I $(INC) -o $(OUT) -DFLASH_EEPROM -DDEBUG_BUILD=$(DEBUG) -DBAUD=$(RUNTIME_BAUDRATE) -DF_CPU=$(F_CPU) -Wall -O1 main.c debug.c i2c.c ssd1306_display_driver.c uart.c br24t_eeprom_driver.c paint.c -Wall + doas avrdude -B 1 -v -p ATmega2560 -c usbtiny -U flash:w:$(OUT):e install: $(OUT) @@ -51,7 +52,8 @@ install: $(OUT) screen: doas avrdude -c usbtiny -p $(PARTNO) - doas screen $(PORT) $(RUNTIME_BAUDRATE) + #doas screen $(PORT) $(RUNTIME_BAUDRATE) + doas screen $(DEBUG_PORT) $(RUNTIME_BAUDRATE) clean: rm -f *.o *.elf compiled_eeprom |