Adding source and Makefile
This commit is contained in:
parent
608fd01f29
commit
0e56f904d0
18
Makefile
Normal file
18
Makefile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
TARGETNAME = togglePin
|
||||||
|
BUILDFOLDER = ./build/
|
||||||
|
TARGET = $(BUILDFOLDER)$(TARGETNAME)
|
||||||
|
|
||||||
|
INC = -Isrc/include -I/usr/lib/avr/include/
|
||||||
|
CFLAGS = -Wall -Wpedantic -Wextra -g -Os -mmcu=atmega32u4
|
||||||
|
|
||||||
|
SRC = $(wildcard src/*.c)
|
||||||
|
|
||||||
|
all: $(TARGET)
|
||||||
|
|
||||||
|
$(TARGET): $(SRC)
|
||||||
|
mkdir -p build
|
||||||
|
avr-gcc -o $@.elf $^ $(CFLAGS) $(INC)
|
||||||
|
avr-objcopy -j .text -j .data -O ihex $@.elf $@.hex
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -fr ./src/*.o ./build/
|
9
src/togglePin.c
Normal file
9
src/togglePin.c
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user