From 612187c85eb8c2c0e473f11a6bdfc79b3e718d99 Mon Sep 17 00:00:00 2001 From: Wu Jian Gang Date: Thu, 14 Jun 2018 23:28:47 +0800 Subject: [PATCH] feat: Add target platform choise, default esp8266 Not support esp32 now. --- Kconfig | 16 ++++++++++++++-- components/bootloader/Kconfig.projbuild | 10 +++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Kconfig b/Kconfig index af67d313..90d71012 100644 --- a/Kconfig +++ b/Kconfig @@ -4,11 +4,23 @@ # mainmenu "Espressif IoT Development Framework Configuration" +choice TARGET_PLATFORM + bool "Espressif target platform choose" + default TARGET_PLATFORM_ESP8266 + help + Choose the specific target platform which you will use. + +config TARGET_PLATFORM_ESP32 + bool "esp32" +config TARGET_PLATFORM_ESP8266 + bool "esp8266" +endchoice menu "SDK tool configuration" config TOOLPREFIX - string "Compiler toolchain path/prefix" - default "xtensa-lx106-elf-" + string + default "xtensa-esp32-elf-" if TARGET_PLATFORM_ESP32 + default "xtensa-lx106-elf-" if TARGET_PLATFORM_ESP8266 help The prefix/path that is used to call the toolchain. The default setting assumes a crosstool-ng gcc setup that is in your PATH. diff --git a/components/bootloader/Kconfig.projbuild b/components/bootloader/Kconfig.projbuild index f5394dc2..4c204a7b 100644 --- a/components/bootloader/Kconfig.projbuild +++ b/components/bootloader/Kconfig.projbuild @@ -32,7 +32,7 @@ config BOOTLOADER_SPI_WP_PIN int "SPI Flash WP Pin when customising pins via efuse (read help)" range 0 33 default 7 - depends on FLASHMODE_QIO || FLASHMODE_QOUT + depends on (FLASHMODE_QIO || FLASHMODE_QOUT) && TARGET_PLATFORM_ESP32 help This value is ignored unless flash mode is set to QIO or QOUT *and* the SPI flash pins have been overriden by setting the efuses SPI_PAD_CONFIG_xxx. @@ -46,6 +46,7 @@ config BOOTLOADER_SPI_WP_PIN choice BOOTLOADER_VDDSDIO_BOOST bool "VDDSDIO LDO voltage" default BOOTLOADER_VDDSDIO_BOOST_1_9V + depends on TARGET_PLATFORM_ESP32 help If this option is enabled, and VDDSDIO LDO is set to 1.8V (using EFUSE or MTDI bootstrapping pin), bootloader will change LDO settings to @@ -57,7 +58,7 @@ choice BOOTLOADER_VDDSDIO_BOOST config BOOTLOADER_VDDSDIO_BOOST_1_8V bool "1.8V" - depends on !ESPTOOLPY_FLASHFREQ_80M + depends on !ESPTOOLPY_FLASHFREQ_80M && TARGET_PLATFORM_ESP32 config BOOTLOADER_VDDSDIO_BOOST_1_9V bool "1.9V" endchoice @@ -65,6 +66,7 @@ endchoice config BOOTLOADER_FACTORY_RESET bool "GPIO triggers factory reset" default N + depends on TARGET_PLATFORM_ESP32 help Allows to reset the device to factory settings: - clear one or more data partitions; @@ -74,7 +76,7 @@ config BOOTLOADER_FACTORY_RESET config BOOTLOADER_NUM_PIN_FACTORY_RESET int "Number of the GPIO input for factory reset" - depends on BOOTLOADER_FACTORY_RESET + depends on BOOTLOADER_FACTORY_RESET && TARGET_PLATFORM_ESP32 range 0 39 default 4 help @@ -102,6 +104,7 @@ config BOOTLOADER_DATA_FACTORY_RESET config BOOTLOADER_APP_TEST bool "GPIO triggers boot from test app partition" default N + depends on TARGET_PLATFORM_ESP32 help Allows to run the test app from "TEST" partition. A boot from "test" partition will occur if there is a GPIO input pulled low while device starts up. @@ -131,6 +134,7 @@ endmenu # Bootloader menu "Security features" + depends on TARGET_PLATFORM_ESP32 config SECURE_BOOT_ENABLED bool "Enable secure boot in bootloader (READ DOCS FIRST)"