1
0
mirror of git://projects.qi-hardware.com/antorcha.git synced 2025-04-21 12:27:27 +03:00

RESET protocol to jump from application to boot loader without power cycling

This commit is contained in:
Werner Almesberger
2012-06-18 20:31:20 -03:00
parent 683056bca7
commit cc4b5607c7
8 changed files with 42 additions and 15 deletions

View File

@@ -30,7 +30,7 @@ OBJCOPY = $(AVR_PREFIX)objcopy
#OBJDUMP = $(AVR_PREFIX)objdump
SIZE = $(AVR_PREFIX)size
OBJS = $(NAME).o dispatch.o hash.o $(COMMON_OBJS)
OBJS = $(NAME).o dispatch.o hash.o reset.o $(COMMON_OBJS)
BOOT_OBJS = boot.o flash.o fw.o $(COMMON_OBJS)
COMMON_OBJS = rf.o spi.o
@@ -87,7 +87,7 @@ clean:
rm -f version.c version.d version.o
nosecrets:
rm -f unlock-secret.inc image-secret.inc
rm -f unlock-secret.inc reset-secret.inc image-secret.inc
# ----- Build version ---------------------------------------------------------
@@ -129,10 +129,14 @@ SECRET = { dd if=$(RANDOM) iflag=fullblock bs=$(1) count=1 status=noxfer | \
unlock-secret.inc:
$(BUILD) $(call SECRET,64) >$@ || { rm -f $@; exit 1; }
reset-secret.inc:
$(BUILD) $(call SECRET,64) >$@ || { rm -f $@; exit 1; }
image-secret.inc:
$(BUILD) $(call SECRET,128) >$@ || { rm -f $@; exit 1; }
fw.o: unlock-secret.inc
reset.o: unlock-secret.inc
# ----- Dependencies ----------------------------------------------------------