Here's a minimal makefile for tracking your code-size, etc...
(This doesn't yet create the hex-file for flashing!)
default: build lss size
#Compile, optimize for size
build:
avr-gcc -mmcu=atmega8515 -Os -o main.out main.c
#Create an assembly-listing (with C code alongside)
#Check out main.lss!
lss:
avr-objdump --disassemble-zeroes -h -S main.out > main.lss
#Output the sizes of the various sections
# written to flash = .text + .data
size:
avr-size main.out
clean:
rm -f main.out main.lss
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.