Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.55 KB | None | 0 0
  1. MCU = t13
  2.  
  3. CC = avr-gcc
  4. STRIP = avr-strip
  5. OBJCOPY = avr-objcopy
  6.  
  7. CFLAGS = -mmcu=${MCU} -nostdlib
  8.  
  9. TARGET = firmware
  10. SRCS = main.S
  11.  
  12. EEFILE = eeprom.bin
  13. LFUSE = 0x05
  14. HFUSE = 0xe5
  15.  
  16. FW = -U flash:w:${TARGET}.hex:i
  17. FUSE = -U lfuse:w:${LFUSE}:m -U hfuse:w:${HFUSE}:m
  18. EEPROM = -U eeprom:w:${EEFILE}:r
  19.  
  20. all:
  21.     ${CC} ${CFLAGS} -o ${TARGET}.bin ${SRCS}
  22.     ${STRIP} ${TARGET}.bin
  23.     ${OBJCOPY} -j .text -j .data -O ihex ${TARGET}.bin ${TARGET}.hex
  24.  
  25. flash:
  26.     avrdude -p ${MCU} -c usbasp -e ${FW} ${FUSE} ${EEPROM}
  27.  
  28. clean:
  29.     rm -f ${TARGET}.bin ${TARGET}.hex
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement