Last active
April 25, 2023 00:50
-
-
Save bradford-hamilton/e6e9844b899074b3e25aa5effeb7f8ab to your computer and use it in GitHub Desktop.
ATtiny85 Makefile for part 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compile for attiny85 - optimize for size | |
compile: | |
avr-gcc -Wall -Os -mmcu=attiny85 src/main.c | |
# Get the assembly | |
assembly: | |
avr-gcc -S -Os -mmcu=attiny85 src/main.c -o assembly.asm | |
# Dump hex from out file | |
dump: compile | |
hexdump a.out | |
# Create Intel hex from out file | |
hex: compile | |
avr-objcopy -O ihex -j .text -j .data a.out a.hex | |
# Flash ATtiny85 with hex through usbtiny | |
flash: hex | |
avrdude -C /opt/homebrew/etc/avrdude.conf -v -p t85 -c usbtiny -U flash:w:a.hex:i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment