Working
This commit is contained in:
12
makefile
12
makefile
@@ -3,12 +3,13 @@ F_CPU=8000000
|
||||
PROG=dragon_jtag
|
||||
DEBUGGER = dragon
|
||||
PORT=/dev/ttyUSB0
|
||||
TYPE?=DEBUG
|
||||
|
||||
CC=avr-g++
|
||||
OBJCOPY=avr-objcopy
|
||||
CFLAGS=-Wall -g -mmcu=${MCU} -DF_CPU=${F_CPU} -I.
|
||||
CFLAGS=-Wall -g -O -mmcu=${MCU} -DF_CPU=${F_CPU} -I. -std=gnu++11 -D${TYPE} -Wno-write-strings
|
||||
TARGET=main
|
||||
SRCS=src/*.cpp test/main.cpp
|
||||
SRCS=src/*.cpp test/main.cpp
|
||||
|
||||
default: build flash
|
||||
|
||||
@@ -24,8 +25,11 @@ clean:
|
||||
rm -f bin/*
|
||||
|
||||
debug: flash avarice
|
||||
sleep 1
|
||||
avr-gdb -ex "target remote :4242" bin/main.elf
|
||||
|
||||
avarice:
|
||||
avarice --file bin/main.elf --part ${MCU} --${DEBUGGER} :4242
|
||||
sleep 1
|
||||
avarice --file bin/main.elf --part ${MCU} --${DEBUGGER} :4242 &
|
||||
|
||||
term:
|
||||
screen /dev/ttyUSB0 1000000
|
Reference in New Issue
Block a user