You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/03/23 18:24:47 UTC

[incubator-nuttx] 02/02: esp32: Guard the binary generation with CONFIG_ESP32CORE_BINARY

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

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

commit 37950091d337817c5735f7092e9854dcc79bb321
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Mar 23 14:04:40 2020 +0800

    esp32: Guard the binary generation with CONFIG_ESP32CORE_BINARY
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 boards/xtensa/esp32/esp32-core/Kconfig           | 6 ++++++
 boards/xtensa/esp32/esp32-core/scripts/Config.mk | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/boards/xtensa/esp32/esp32-core/Kconfig b/boards/xtensa/esp32/esp32-core/Kconfig
index 4b4a9ce..aaaa657 100644
--- a/boards/xtensa/esp32/esp32-core/Kconfig
+++ b/boards/xtensa/esp32/esp32-core/Kconfig
@@ -38,4 +38,10 @@ config ESP32CORE_RUN_IRAM
 		allows interoperability with the esp-idf system but makes you
 		reliant on the esp-idf design for these parts. Both are possible.
 
+config ESP32CORE_FLASH_IMAGE
+	bool "esp32 flash image"
+	default n
+	---help---
+		Create flash_image.bin mainly used for QEMU.
+
 endif # ARCH_BOARD_ESP32CORE
diff --git a/boards/xtensa/esp32/esp32-core/scripts/Config.mk b/boards/xtensa/esp32/esp32-core/scripts/Config.mk
index ee7710c..4e60251 100644
--- a/boards/xtensa/esp32/esp32-core/scripts/Config.mk
+++ b/boards/xtensa/esp32/esp32-core/scripts/Config.mk
@@ -24,6 +24,7 @@
 
 # POSTBUILD -- Perform post build operations
 
+ifeq ($(CONFIG_ESP32CORE_FLASH_IMAGE),y)
 define POSTBUILD
 	@echo "MKIMAGE: ESP32 binary"
         $(Q) if ! esptool.py version ; then \
@@ -47,3 +48,4 @@ define POSTBUILD
 		echo "Generated: flash_image.bin (it can be run with 'qemu-system-xtensa -nographic -machine esp32 -drive file=flash_image.bin,if=mtd,format=raw')"; \
 	fi
 endef
+endif