diff --git a/bootloaders/eboot/Makefile b/bootloaders/eboot/Makefile index 7a07d7615..e078263ca 100644 --- a/bootloaders/eboot/Makefile +++ b/bootloaders/eboot/Makefile @@ -1,5 +1,5 @@ XTENSA_TOOLCHAIN ?= ../../tools/xtensa-lx106-elf/bin/ -ESPTOOL ?= ../../tools/esptool +ESPTOOL ?= ../../tools/esptool/esptool BIN_DIR := ./ TARGET_DIR := ./ @@ -7,7 +7,7 @@ TARGET_DIR := ./ TARGET_OBJ_FILES := \ eboot.o \ eboot_command.o \ - + TARGET_OBJ_PATHS := $(addprefix $(TARGET_DIR)/,$(TARGET_OBJ_FILES)) @@ -50,4 +50,3 @@ clean: .PHONY: all clean default - diff --git a/bootloaders/eboot/eboot.c b/bootloaders/eboot/eboot.c index 3c0bc1cce..f53d3c912 100644 --- a/bootloaders/eboot/eboot.c +++ b/bootloaders/eboot/eboot.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015 Ivan Grokhotkov. All rights reserved. +/* Copyright (c) 2015-2016 Ivan Grokhotkov. All rights reserved. * This file is part of eboot bootloader. * * Redistribution and use is permitted according to the conditions of the @@ -115,14 +115,16 @@ void main() int res = 9; struct eboot_command cmd; - if (eboot_command_read(&cmd)) { + if (eboot_command_read(&cmd) == 0) { + // valid command was passed via RTC_MEM + eboot_command_clear(); + ets_putc('@'); + } else { + // no valid command found cmd.action = ACTION_LOAD_APP; cmd.args[0] = 0; ets_putc('~'); - } else { - ets_putc('@'); } - eboot_command_clear(); if (cmd.action == ACTION_COPY_RAW) { ets_putc('c'); ets_putc('p'); ets_putc(':'); diff --git a/bootloaders/eboot/eboot.elf b/bootloaders/eboot/eboot.elf index 7fb4f5f93..aa61b97f0 100755 Binary files a/bootloaders/eboot/eboot.elf and b/bootloaders/eboot/eboot.elf differ