Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile - github.com/ssloy/penny.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dc26a2f46eecee1b3c0b3abfc9c0cb9679be2e4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
GCCFLAGS=-g -O3 -mmcu=atmega8a -std=gnu99 -Wall -Wextra -pedantic
LINKFLAGS=-lm
AVRDUDEFLAGS=-B 5 -c usbasp -p m8

all:    main-upload

main.hex:  main.c
	avr-gcc ${GCCFLAGS} ${LINKFLAGS} -o main.o main.c
	avr-objcopy -O ihex -R .eeprom main.o main.hex

main.ass:  main.hex
	avr-objdump -S -d main.o > main.ass

main-upload:       main.hex
	sudo avrdude ${AVRDUDEFLAGS} -U flash:w:main.hex:a

fuses:
	sudo avrdude -c usbasp -p m8 -U lfuse:w:0xff:m -U hfuse:w:0xC9:m