Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MCU = t13
- CC = avr-gcc
- STRIP = avr-strip
- OBJCOPY = avr-objcopy
- CFLAGS = -mmcu=${MCU} -nostdlib
- TARGET = firmware
- SRCS = main.S
- EEFILE = eeprom.bin
- LFUSE = 0x05
- HFUSE = 0xe5
- FW = -U flash:w:${TARGET}.hex:i
- FUSE = -U lfuse:w:${LFUSE}:m -U hfuse:w:${HFUSE}:m
- EEPROM = -U eeprom:w:${EEFILE}:r
- all:
- ${CC} ${CFLAGS} -o ${TARGET}.bin ${SRCS}
- ${STRIP} ${TARGET}.bin
- ${OBJCOPY} -j .text -j .data -O ihex ${TARGET}.bin ${TARGET}.hex
- flash:
- avrdude -p ${MCU} -c usbasp -e ${FW} ${FUSE} ${EEPROM}
- clean:
- rm -f ${TARGET}.bin ${TARGET}.hex
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement