diff --git a/cpu/esp32/Makefile.features b/cpu/esp32/Makefile.features index 1f18447b51..098e647906 100644 --- a/cpu/esp32/Makefile.features +++ b/cpu/esp32/Makefile.features @@ -4,7 +4,7 @@ ifeq (esp32,$(CPU_FAM)) else ifneq (,$(filter esp32c3,$(CPU_FAM))) CPU_ARCH = rv32 CPU_CORE = rv32imc -else ifneq (,$(filter esp32s3,$(CPU_FAM))) +else ifneq (,$(filter esp32s2 esp32s3,$(CPU_FAM))) CPU_ARCH = xtensa CPU_CORE = xtensa-lx7 else @@ -23,7 +23,7 @@ ifeq (xtensa,$(CPU_ARCH)) FEATURES_PROVIDED += esp_hw_counter endif -ifneq (,$(filter esp32-wrover% esp32s3%r2 esp32s3%r8 esp32s3%r8v,$(CPU_MODEL))) +ifneq (,$(filter esp32-wrover% esp32s2%r2 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 diff --git a/cpu/esp32/Makefile.include b/cpu/esp32/Makefile.include index 1a9358c76a..89830bce12 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -13,6 +13,11 @@ else ifneq (,$(filter esp32c3 esp32s3,$(CPU_FAM))) export FLASH_FREQ ?= 80m export FLASH_SIZE ?= 2 BOOTLOADER_POS = 0x0000 +else ifneq (,$(filter esp32s2,$(CPU_FAM))) + FLASH_MODE ?= qio + FLASH_FREQ ?= 80m + FLASH_SIZE ?= 4 + BOOTLOADER_POS = 0x1000 else $(error Unkwnown ESP32x SoC variant (family)) endif @@ -151,7 +156,7 @@ 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 -ifeq (esp32,$(CPU_FAM)) +ifneq (,$(filter esp32 esp32s2,$(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