esp32: Create chip selection config to improve capabilities refinement
This commit is contained in:
parent
84daebf2cc
commit
a8cf8abfaa
@ -5,6 +5,131 @@
|
||||
|
||||
if ARCH_CHIP_ESP32
|
||||
|
||||
comment "ESP32 Configuration Options"
|
||||
|
||||
choice
|
||||
prompt "ESP32 Chip Selection"
|
||||
default ARCH_CHIP_ESP32WROVER
|
||||
depends on ARCH_CHIP_ESP32
|
||||
|
||||
config ARCH_CHIP_ESP32S0WD
|
||||
bool "ESP32-S0WD"
|
||||
select ESP32_ESP32SXWDXX
|
||||
---help---
|
||||
ESP32 chip with a single Xtensa LX6 core, no embedded Flash memory
|
||||
|
||||
config ARCH_CHIP_ESP32D0WD
|
||||
bool "ESP32-D0WD"
|
||||
select ESP32_ESP32DXWDXX
|
||||
---help---
|
||||
ESP32 chip with a dual Xtensa LX6 core, no embedded Flash memory
|
||||
|
||||
config ARCH_CHIP_ESP32D2WD
|
||||
bool "ESP32-D2WD"
|
||||
select ESP32_ESP32DXWDXX
|
||||
select ESP32_FLASH_2M
|
||||
---help---
|
||||
ESP32 chip with a dual Xtensa LX6 core, 2 MB of in-package Flash memory
|
||||
|
||||
config ARCH_CHIP_ESP32U4WD
|
||||
bool "ESP32-U4WD"
|
||||
select ESP32_ESP32UXWDXX
|
||||
select ESP32_FLASH_4M
|
||||
---help---
|
||||
ESP32 chip with a single Xtensa LX6 core, 4 MB of in-package Flash memory
|
||||
|
||||
config ARCH_CHIP_ESP32WROOM32
|
||||
bool "ESP32-WROOM-32"
|
||||
select ESP32_ESP32DXWDXX
|
||||
select ESP32_FLASH_4M
|
||||
---help---
|
||||
Generic module with an embedded ESP32-D0WD chip, 4 MB of Flash memory
|
||||
|
||||
config ARCH_CHIP_ESP32WROOM32_8MB
|
||||
bool "ESP32-WROOM-32 (8MB)"
|
||||
select ESP32_ESP32DXWDXX
|
||||
select ESP32_FLASH_8M
|
||||
---help---
|
||||
Generic module with an embedded ESP32-D0WD chip, 8 MB of Flash memory
|
||||
|
||||
config ARCH_CHIP_ESP32WROOM32_16MB
|
||||
bool "ESP32-WROOM-32 (16MB)"
|
||||
select ESP32_ESP32DXWDXX
|
||||
select ESP32_FLASH_16M
|
||||
---help---
|
||||
Generic module with an embedded ESP32-D0WD chip, 16 MB of Flash memory
|
||||
|
||||
config ARCH_CHIP_ESP32WROVER
|
||||
bool "ESP32-WROVER"
|
||||
select ESP32_ESP32DXWDXX
|
||||
select ESP32_FLASH_4M
|
||||
select ESP32_PSRAM_8M
|
||||
---help---
|
||||
Generic module with an embedded ESP32-D0WD chip, 4 MB of Flash memory,
|
||||
8 MB of PSRAM
|
||||
|
||||
config ARCH_CHIP_ESP32MINI1
|
||||
bool "ESP32-MINI-1"
|
||||
select ESP32_ESP32UXWDXX
|
||||
select ESP32_FLASH_4M
|
||||
---help---
|
||||
Generic module with an embedded ESP32-U4WD chip
|
||||
|
||||
config ARCH_CHIP_ESP32SOLO1
|
||||
bool "ESP32-SOLO-1"
|
||||
select ESP32_ESP32SXWDXX
|
||||
select ESP32_FLASH_4M
|
||||
---help---
|
||||
Generic module with an embedded ESP32-S0WD chip, 4 MB of Flash memory
|
||||
|
||||
endchoice # ESP32 Chip Selection
|
||||
|
||||
comment "Selected ESP32 chip without embedded Flash, an external Flash memory is required."
|
||||
depends on ARCH_CHIP_ESP32S0WD || ARCH_CHIP_ESP32D0WD
|
||||
|
||||
config ESP32_SINGLE_CPU
|
||||
bool
|
||||
default n
|
||||
|
||||
config ESP32_DUAL_CPU
|
||||
bool
|
||||
default n
|
||||
|
||||
config ESP32_FLASH_2M
|
||||
bool
|
||||
default n
|
||||
|
||||
config ESP32_FLASH_4M
|
||||
bool
|
||||
default n
|
||||
|
||||
config ESP32_FLASH_8M
|
||||
bool
|
||||
default n
|
||||
|
||||
config ESP32_FLASH_16M
|
||||
bool
|
||||
default n
|
||||
|
||||
config ESP32_PSRAM_8M
|
||||
bool
|
||||
default n
|
||||
|
||||
config ESP32_ESP32SXWDXX
|
||||
bool
|
||||
default n
|
||||
select ESP32_SINGLE_CPU
|
||||
|
||||
config ESP32_ESP32UXWDXX
|
||||
bool
|
||||
default n
|
||||
select ESP32_SINGLE_CPU
|
||||
|
||||
config ESP32_ESP32DXWDXX
|
||||
bool
|
||||
default n
|
||||
select ESP32_DUAL_CPU
|
||||
|
||||
choice ESP32_DEFAULT_CPU_FREQ
|
||||
prompt "CPU frequency"
|
||||
default ESP32_DEFAULT_CPU_FREQ_240
|
||||
|
@ -197,7 +197,7 @@ config ARCH_BOARD_QUICKFEATHER
|
||||
|
||||
config ARCH_BOARD_ESP32_DEVKITC
|
||||
bool "Espressif ESP32 DevkitC board V4"
|
||||
depends on ARCH_CHIP_ESP32
|
||||
depends on ARCH_CHIP_ESP32WROOM32 || ARCH_CHIP_ESP32WROOM32_8MB || ARCH_CHIP_ESP32WROOM32_16MB || ARCH_CHIP_ESP32WROVER || ARCH_CHIP_ESP32SOLO1
|
||||
select ARCH_HAVE_LEDS
|
||||
---help---
|
||||
The ESP32 is a dual-core system from Espressif with two Harvard
|
||||
@ -209,7 +209,7 @@ config ARCH_BOARD_ESP32_DEVKITC
|
||||
|
||||
config ARCH_BOARD_ESP32_ETHERNETKIT
|
||||
bool "Espressif ESP32 Ethernet Kit"
|
||||
depends on ARCH_CHIP_ESP32
|
||||
depends on ARCH_CHIP_ESP32WROVER
|
||||
---help---
|
||||
The ESP32-Ethernet-Kit is an Ethernet-to-Wi-Fi development board that enables
|
||||
Ethernet devices to be interconnected over Wi-Fi. At the same time, to provide
|
||||
@ -218,7 +218,7 @@ config ARCH_BOARD_ESP32_ETHERNETKIT
|
||||
|
||||
config ARCH_BOARD_ESP32_WROVERKIT
|
||||
bool "Espressif ESP-WROVER-KIT"
|
||||
depends on ARCH_CHIP_ESP32
|
||||
depends on ARCH_CHIP_ESP32WROVER
|
||||
select ARCH_HAVE_LEDS
|
||||
---help---
|
||||
ESP-WROVER-KIT is an ESP32-based development board produced by Espressif.
|
||||
|
@ -32,6 +32,16 @@ else
|
||||
PARTITION_TABLE=$(IDF_PATH)/hello_world/build/partition_table/partition-table.bin
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32_FLASH_2M),y)
|
||||
FLASH_SIZE="2MB"
|
||||
else ifeq ($(CONFIG_ESP32_FLASH_4M),y)
|
||||
FLASH_SIZE="4MB"
|
||||
else ifeq ($(CONFIG_ESP32_FLASH_8M),y)
|
||||
FLASH_SIZE="8MB"
|
||||
else ifeq ($(CONFIG_ESP32_FLASH_16M),y)
|
||||
FLASH_SIZE="16MB"
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32_QEMU_IMAGE),y)
|
||||
MK_QEMU_IMG=$(TOPDIR)/tools/esp32/mk_qemu_img.sh $(BOOTLOADER) $(PARTITION_TABLE)
|
||||
else
|
||||
@ -39,16 +49,20 @@ else
|
||||
endif
|
||||
|
||||
define POSTBUILD
|
||||
$(Q)echo "MKIMAGE: ESP32 binary"
|
||||
$(Q) echo "MKIMAGE: ESP32 binary"
|
||||
$(Q) if ! esptool.py version 1>/dev/null 2>&1; then \
|
||||
echo ""; \
|
||||
echo "esptool.py not found. Please run: \"pip install esptool.py\""; \
|
||||
echo "Or run: \"make -C tools/esp32\" to install all IDF tools."; \
|
||||
echo "Or run: \"make -C $(TOPDIR)/tools/esp32\" to install all IDF tools."; \
|
||||
echo ""; \
|
||||
echo "Run make again to create the nuttx.bin image."; \
|
||||
else \
|
||||
esptool.py --chip esp32 elf2image --flash_mode dio --flash_size 4MB -o nuttx.bin nuttx; \
|
||||
if [ -z $(FLASH_SIZE) ]; then \
|
||||
echo "Missing Flash memory size configuration for the ESP32 chip."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
esptool.py --chip esp32 elf2image --flash_mode dio --flash_size $(FLASH_SIZE) -o nuttx.bin nuttx; \
|
||||
echo "Generated: nuttx.bin (ESP32 compatible)"; \
|
||||
fi
|
||||
$(MK_QEMU_IMG)
|
||||
$(Q) $(MK_QEMU_IMG)
|
||||
endef
|
||||
|
Loading…
x
Reference in New Issue
Block a user