Added pendulum
This commit is contained in:
31
sketches/pendulum/Makefile_old
Normal file
31
sketches/pendulum/Makefile_old
Normal file
@ -0,0 +1,31 @@
|
||||
CFLAGS = -Os -Wall --std=c11 -g
|
||||
CHIP = atmega328p
|
||||
SOURCE_FILES = ${wildcard *.c}
|
||||
OBJ_FILES = $(SOURCE_FILES:%.c=%.o)
|
||||
BIN = pendulum.bin
|
||||
HEX = pendulum.hex
|
||||
ASM = pendulum.asm
|
||||
|
||||
default: $(HEX)
|
||||
|
||||
%.o: %.c
|
||||
avr-gcc $(CFLAGS) -mmcu=$(CHIP) -o $@ $<
|
||||
|
||||
$(BIN): $(OBJ_FILES)
|
||||
avr-gcc $(CFLAGS) -o $@ $^
|
||||
|
||||
$(ASM): $(BIN)
|
||||
avr-objdump -d -g -l -S $^ > $@
|
||||
|
||||
$(HEX): $(BIN)
|
||||
avr-objcopy -O ihex -j .text -j .data $^ $@
|
||||
|
||||
asm: $(ASM)
|
||||
|
||||
flash: $(HEX)
|
||||
avrdude -p $(CHIP) -c arduino -B 115200 -P /dev/ttyACM0 -v -v -e -Uflash:w:$(HEX):a
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJ_FILES) $(BIN) $(HEX) $(ASM)
|
||||
|
||||
|
Reference in New Issue
Block a user