makefile eeprom loading to avr

Discussion in 'The Projects Forum' started by eminthepooh, Apr 24, 2013.

  1. eminthepooh

    Thread Starter New Member

    Aug 26, 2012
    27
    0
    I have this makefile and need to create .eep file to upload to the avr with the initialized values.
    I know the upload section will need to include -U eeprom:w:controller_13.eep:a
    But how do I output controller_13.eep?

    Thank you,



    GCCFLAGS=-g -Os -Wall -mmcu=atmega324p
    AVRDUDEFLAGS=-c usbtiny -p m324p -F
    LINKOBJECTS=../libnerdkits/lcd.o -lm

    all: controller_13-upload

    controller_13.hex: controller_13.c
    avr-gcc ${GCCFLAGS} -o controller_13.o controller_13.c ${LINKOBJECTS}
    avr-objcopy -j .text -O ihex controller_13.o controller_13.hex

    controller_13.ass: controller_13.hex
    avr-objdump -S -d controller_13.o > controller_13.ass

    controller_13-upload: controller_13.hex
    avrdude ${AVRDUDEFLAGS} -U flash:w:controller_13.hex:a​
     
Loading...