2011-02-07 19:37:43 +01:00
|
|
|
ifndef TARGET
|
|
|
|
TARGET=avr-raven
|
|
|
|
MCU=atmega1284p
|
|
|
|
endif
|
2009-07-23 18:13:48 +02:00
|
|
|
ifndef WEBDIR
|
2011-02-07 19:37:43 +01:00
|
|
|
OUTFILE=webserver6-$(TARGET)
|
2009-07-23 18:13:48 +02:00
|
|
|
else
|
2011-02-07 19:37:43 +01:00
|
|
|
OUTFILE=webserver6-$(WEBDIR)-$(TARGET)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef MCU
|
|
|
|
#TODO:extract MCU from platform
|
|
|
|
MCU=atmega128rfa1
|
2009-07-23 18:13:48 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
all:
|
2011-02-07 19:37:43 +01:00
|
|
|
${MAKE} -f Makefile.webserver TARGET=$(TARGET) NOAVRSIZE=1 webserver6.elf
|
2009-07-23 18:13:48 +02:00
|
|
|
#can't just rename, webserver6 may be open in debugger
|
|
|
|
@if [ $(OUTFILE) != "webserver6" ]; then cp webserver6.elf $(OUTFILE).elf;fi
|
|
|
|
avr-objcopy -O ihex -R .eeprom -R .fuse -R .signature $(OUTFILE).elf $(OUTFILE).hex
|
2011-02-07 19:37:43 +01:00
|
|
|
# avr-size -C --mcu=atmega1284p $(OUTFILE).elf
|
|
|
|
avr-size -C --mcu=$(MCU) $(OUTFILE).elf
|
2008-10-15 00:04:16 +02:00
|
|
|
|
2008-10-15 22:52:03 +02:00
|
|
|
clean:
|
2011-02-07 19:37:43 +01:00
|
|
|
${MAKE} -f Makefile.webserver TARGET=$(TARGET) clean
|
2010-07-30 22:07:41 +02:00
|
|
|
# Delete httpd-fsdata.c only if your toolchain includes perl
|
|
|
|
# rm ../../platform/avr-raven/apps/raven-webserver/httpd-fsdata.c
|
2011-02-07 19:37:43 +01:00
|
|
|
rm symbols.c symbols.h webserver6.elf $(OUTFILE).elf $(OUTFILE).hex
|
2008-10-15 22:52:03 +02:00
|
|
|
rm -rf obj_avr-raven
|
2011-08-28 22:22:39 +02:00
|
|
|
|
|
|
|
connect:
|
|
|
|
#Connect to serial debug port for timestamp log (requires PERL).
|
|
|
|
#Change the baud rate and device to agree with your serial connection.
|
|
|
|
../../tools/serial-log.pl -b 57600 -t /dev/com1 -l
|