You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2021/09/16 17:15:14 UTC

[incubator-nuttx] 02/02: tools/esp32: Set ESPTOOL_BINDIR if buildsystem provisioned the binaries

This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch feature/esp32_build_binaries
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 1ac578320678f8f48d84232fe48aee26cfba9a74
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Wed Sep 15 18:18:25 2021 -0300

    tools/esp32: Set ESPTOOL_BINDIR if buildsystem provisioned the binaries
    
    Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
 tools/esp32/Config.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/esp32/Config.mk b/tools/esp32/Config.mk
index 7605778..0f148b4 100644
--- a/tools/esp32/Config.mk
+++ b/tools/esp32/Config.mk
@@ -60,6 +60,14 @@ endif
 
 ESPTOOL_FLASH_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ)
 
+# Configure ESPTOOL_BINDIR if the build system either downloaded or
+# built the bootloader binaries from source.
+# NOTE: The user-provided value for ESPTOOL_BINDIR shall not be overridden.
+
+ifeq ($(CONFIG_ESP32_BINARIES_BUILD_FROM_SOURCE)$(CONFIG_ESP32_BINARIES_DOWNLOAD_PREBUILT),y)
+	ESPTOOL_BINDIR ?= $(TOPDIR)
+endif
+
 # Configure the variables according to build environment
 
 ifdef ESPTOOL_BINDIR