53
ATZB-EVB-XXX-XXX User Manual
AVR-09-2011
all: pds cs
\
$(PRJ_NAME).elf $(PRJ_NAME).srec
$(PRJ_NAME).hex $(PRJ_NAME).bin \
size
pds:
@echo
@echo -------PDS library creation-----------
-------------
make all -C $(PDS_PATH)
cs:
@echo
@echo -------Configuration Server library
creation-------
make all -C $(CS_PATH)
$(PRJ_NAME).o: %.o: %.c
@echo
@echo -------Application executable
creation-------------
$(CC) -c $(CFLAGS) $(INCLUDES) $^ -o $@
$(PRJ_NAME).elf: $(PRJ_NAME).o
$(CC) $(CFLAGS) $(INCLUDES)
$(PRJ_NAME).o $(LIB_PATH) $(LINK_OBJECTS) -
l$(STACK_LIB) -l$(CS_LIB) -l$(PDS_LIB) -
l$(BSP_LIB) -l$(STACK_LIB) $(LDSCRIPT)
$(LINKER_FLAGS)
rm -f *.o
%.srec: %.elf
$(OBJCOPY) -O srec --srec-len 128 $< $@
%.hex: %.elf
$(OBJCOPY) -O ihex $(HEX_FLASH_FLAGS) $< $@
%.bin: %.elf
$(OBJCOPY) --strip-debug --strip-unneeded -
O binary $< $@
size:
$(SIZE) -td $(PRJ_NAME).elf
flash:
jtagiceii -d ATmega1281 -f 0x1F62 -e -pf -if
$(PRJ_NAME).hex