mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/esp32: add ESP32-S3 support in makefiles
This commit is contained in:
parent
3f1ac8a6b3
commit
f0b619bed2
@ -93,12 +93,17 @@ endif
|
||||
|
||||
ifneq (,$(filter esp_spi_ram,$(USEMODULE)))
|
||||
FEATURES_REQUIRED += esp_spi_ram
|
||||
FEATURES_OPTIONAL += esp_spi_oct
|
||||
USEMODULE += esp_idf_gpio
|
||||
USEMODULE += esp_idf_heap
|
||||
USEMODULE += esp_idf_spi_flash
|
||||
USEMODULE += esp_idf_spi_ram
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp_spi_oct,$(FEATURES_USED)))
|
||||
USEMODULE += esp_spi_oct
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp_idf_heap,$(USEMODULE)))
|
||||
# The ESP-IDF heap component uses the TLSF implementation that is part of
|
||||
# the component. To avoid conflicts with modules and packages that use the
|
||||
|
@ -1,9 +1,12 @@
|
||||
ifneq (,$(filter esp32,$(CPU_FAM)))
|
||||
ifeq (esp32,$(CPU_FAM))
|
||||
CPU_ARCH = xtensa
|
||||
CPU_CORE = xtensa-lx6
|
||||
else ifneq (,$(filter esp32c3,$(CPU_FAM)))
|
||||
CPU_ARCH = rv32
|
||||
CPU_CORE = rv32imc
|
||||
else ifneq (,$(filter esp32s3,$(CPU_FAM)))
|
||||
CPU_ARCH = xtensa
|
||||
CPU_CORE = xtensa-lx7
|
||||
else
|
||||
$(error Unkwnown ESP32x SoC variant (family))
|
||||
endif
|
||||
@ -20,8 +23,11 @@ ifeq (xtensa,$(CPU_ARCH))
|
||||
FEATURES_PROVIDED += esp_hw_counter
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp32-wrover%,$(CPU_MODEL)))
|
||||
ifneq (,$(filter esp32-wrover% esp32s3%r2 esp32s3%r8 esp32s3%r8v,$(CPU_MODEL)))
|
||||
FEATURES_PROVIDED += esp_spi_ram
|
||||
ifneq (,$(filter esp32s3%r8 esp32s3%r8v,$(CPU_MODEL)))
|
||||
FEATURES_PROVIDED += esp_spi_oct
|
||||
endif
|
||||
endif
|
||||
|
||||
# This configuration enables modules that are only available when using Kconfig
|
||||
|
@ -8,7 +8,7 @@ ifeq (esp32,$(CPU_FAM))
|
||||
export FLASH_FREQ ?= 40m
|
||||
export FLASH_SIZE ?= 2
|
||||
BOOTLOADER_POS = 0x1000
|
||||
else ifeq (esp32c3,$(CPU_FAM))
|
||||
else ifneq (,$(filter esp32c3 esp32s3,$(CPU_FAM)))
|
||||
export FLASH_MODE ?= dio
|
||||
export FLASH_FREQ ?= 80m
|
||||
export FLASH_SIZE ?= 2
|
||||
@ -39,6 +39,7 @@ PSEUDOMODULES += esp_i2c_hw
|
||||
PSEUDOMODULES += esp_jtag
|
||||
PSEUDOMODULES += esp_rtc_timer_32k
|
||||
PSEUDOMODULES += esp_spi_ram
|
||||
PSEUDOMODULES += esp_spi_oct
|
||||
PSEUDOMODULES += esp_wifi_enterprise
|
||||
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/esp-idf/include
|
||||
@ -150,18 +151,22 @@ LINKFLAGS += -T$(ESP32_SDK_DIR)/components/soc/$(CPU_FAM)/ld/$(CPU_FAM).peripher
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.api.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.ld
|
||||
|
||||
ifneq (,$(filter xtensa%,$(TARGET_ARCH)))
|
||||
ifeq (esp32,$(CPU_FAM))
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.newlib-data.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.newlib-funcs.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.newlib-time.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.spiflash.ld
|
||||
endif
|
||||
|
||||
ifneq (,$(filter riscv%,$(TARGET_ARCH)))
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/esp32c3/ld/esp32c3.rom.libgcc.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/esp32c3/ld/esp32c3.rom.newlib.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/esp32c3/ld/esp32c3.rom.version.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/esp32c3/ld/esp32c3.rom.eco3.ld
|
||||
else ifeq (esp32c3,$(CPU_FAM))
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.libgcc.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.newlib.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.version.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.eco3.ld
|
||||
else ifeq (esp32s3,$(CPU_FAM))
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.libgcc.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.newlib.ld
|
||||
LINKFLAGS += -T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.version.ld
|
||||
else
|
||||
$(error Unkwnown ESP32x SoC variant (family))
|
||||
endif
|
||||
|
||||
LINKFLAGS += -nostdlib -lgcc -Wl,-gc-sections
|
||||
|
Loading…
Reference in New Issue
Block a user