mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/esp32: use CPU_FAM instead of CPU in Makefiles
To support ESP32x families with the existing Makefiles, CPU_FAM is used instead of CPU in the Makefiles.
This commit is contained in:
parent
365fbed906
commit
0bec8a81ac
@ -1,16 +1,17 @@
|
||||
# ESP32x specific flashing options
|
||||
FLASH_CHIP = $(CPU)
|
||||
ifneq (,$(filter esp32,$(CPU)))
|
||||
FLASH_CHIP = $(CPU_FAM)
|
||||
ifeq (esp32,$(CPU_FAM))
|
||||
FLASH_MODE ?= dout
|
||||
FLASH_FREQ = 40m # DO NOT CHANGE
|
||||
FLASH_SIZE ?= 4
|
||||
BOOTLOADER_POS = 0x1000
|
||||
endif
|
||||
ifneq (,$(filter esp32c3,$(CPU)))
|
||||
else ifeq (esp32c3,$(CPU_FAM))
|
||||
FLASH_MODE ?= dio
|
||||
FLASH_FREQ = 80m # DO NOT CHANGE
|
||||
FLASH_SIZE ?= 4
|
||||
BOOTLOADER_POS = 0x0000
|
||||
else
|
||||
$(error Unkwnown ESP32x SoC variant (family))
|
||||
endif
|
||||
|
||||
ESPTOOL ?= $(RIOTTOOLS)/esptools/esptool_v3.2.py
|
||||
@ -19,16 +20,13 @@ include $(RIOTCPU)/esp_common/Makefile.include
|
||||
|
||||
# regular Makefile
|
||||
|
||||
ifneq (,$(filter esp32,$(CPU)))
|
||||
TARGET_ARCH_$(CPU) ?= xtensa-$(CPU)-elf
|
||||
ifeq (xtensa,$(CPU_ARCH))
|
||||
TARGET_ARCH ?= xtensa-$(CPU_FAM)-elf
|
||||
else ifeq (riscv_esp32,$(CPU_ARCH))
|
||||
TARGET_ARCH ?= riscv32-esp-elf
|
||||
else
|
||||
$(error Unkwnown ESP32x SoC architecture)
|
||||
endif
|
||||
ifneq (,$(filter esp32c3,$(CPU)))
|
||||
TARGET_ARCH_$(CPU) ?= riscv32-esp-elf
|
||||
endif
|
||||
|
||||
TARGET_ARCH ?= $(TARGET_ARCH_$(CPU))
|
||||
|
||||
CPU_UC = $(shell echo '$(CPU)' | tr '[:lower:]' '[:upper:]')
|
||||
|
||||
PSEUDOMODULES += esp_bootloader
|
||||
PSEUDOMODULES += esp_gdbstub
|
||||
@ -49,20 +47,20 @@ INCLUDES += -I$(ESP32_SDK_DIR)/components/driver/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_common/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/include/soc
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_rom/$(CPU)
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_rom/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_rom/include/$(CPU)
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_rom/include/$(CPU_FAM)
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_system/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_system/port/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_timer/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/$(CPU)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/$(CPU_FAM)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/platform_port/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/heap/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/log/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/newlib/platform_include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/$(CPU)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/$(CPU_FAM)/include
|
||||
|
||||
ifneq (,$(filter riscv32%,$(TARGET_ARCH)))
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/riscv/include
|
||||
@ -70,11 +68,11 @@ endif
|
||||
|
||||
ifneq (,$(filter xtensa%,$(TARGET_ARCH)))
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/xtensa/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/xtensa/$(CPU)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/xtensa/$(CPU_FAM)/include
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp_spi_ram,$(USEMODULE)))
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/include/soc/$(CPU)
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/include/soc/$(CPU_FAM)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp_idf_spi_flash,$(USEMODULE)))
|
||||
@ -103,12 +101,14 @@ ifneq (,$(filter esp_eth,$(USEMODULE)))
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_wifi/include
|
||||
endif
|
||||
|
||||
CFLAGS += -DCPU_FAM_$(call uppercase_and_underscore,$(CPU_FAM))
|
||||
|
||||
# we use ESP32 only in single core mode
|
||||
CFLAGS += -DCONFIG_ESP_SYSTEM_SINGLE_CORE_MODE
|
||||
CFLAGS += -DCONFIG_FREERTOS_UNICORE
|
||||
|
||||
# other ESP-IDF configurations
|
||||
CFLAGS += -DCONFIG_IDF_TARGET_$(CPU_UC)
|
||||
CFLAGS += -DCONFIG_IDF_TARGET_$(call uppercase_and_underscore,$(CPU_FAM))
|
||||
CFLAGS += -DESP_PLATFORM
|
||||
CFLAGS += -DLOG_TAG_IN_BRACKETS
|
||||
|
||||
@ -123,7 +123,7 @@ ifneq (,$(filter riscv%,$(TARGET_ARCH)))
|
||||
endif
|
||||
|
||||
ifneq (,$(filter xtensa%,$(TARGET_ARCH)))
|
||||
LINKFLAGS += -L$(ESP32_SDK_DIR)/components/xtensa/$(CPU)
|
||||
LINKFLAGS += -L$(ESP32_SDK_DIR)/components/xtensa/$(CPU_FAM)
|
||||
ARCHIVES += -lxt_hal
|
||||
endif
|
||||
|
||||
@ -152,11 +152,11 @@ LINKFLAGS += -nostdlib -lgcc -Wl,-gc-sections
|
||||
|
||||
# Libraries needed when using esp_wifi_any pseudomodule
|
||||
ifneq (,$(filter esp_wifi_any,$(USEMODULE)))
|
||||
LINKFLAGS += -L$(ESP32_SDK_LIB_WIFI_DIR)/$(CPU)
|
||||
LINKFLAGS += -L$(ESP32_SDK_LIB_PHY_DIR)/$(CPU)
|
||||
LINKFLAGS += -L$(ESP32_SDK_LIB_WIFI_DIR)/$(CPU_FAM)
|
||||
LINKFLAGS += -L$(ESP32_SDK_LIB_PHY_DIR)/$(CPU_FAM)
|
||||
ARCHIVES += -lcoexist -lcore -lmesh -lnet80211 -lpp
|
||||
ARCHIVES += -lphy -lstdc++
|
||||
ifneq (,$(filter esp32,$(CPU)))
|
||||
ifneq (,$(filter esp32,$(CPU_FAM)))
|
||||
ARCHIVES += -lrtc
|
||||
endif
|
||||
endif
|
||||
|
@ -24,39 +24,39 @@ ESP_SDK_BOOTLOADER_SRCS = \
|
||||
components/bootloader_support/src/bootloader_common_loader.c \
|
||||
components/bootloader_support/src/bootloader_console.c \
|
||||
components/bootloader_support/src/bootloader_console_loader.c \
|
||||
components/bootloader_support/src/bootloader_efuse_$(CPU).c \
|
||||
components/bootloader_support/src/bootloader_efuse_$(CPU_FAM).c \
|
||||
components/bootloader_support/src/bootloader_flash.c \
|
||||
components/bootloader_support/src/bootloader_flash_config_$(CPU).c \
|
||||
components/bootloader_support/src/bootloader_flash_config_$(CPU_FAM).c \
|
||||
components/bootloader_support/src/bootloader_init.c \
|
||||
components/bootloader_support/src/bootloader_mem.c \
|
||||
components/bootloader_support/src/bootloader_panic.c \
|
||||
components/bootloader_support/src/bootloader_random.c \
|
||||
components/bootloader_support/src/bootloader_random_$(CPU).c \
|
||||
components/bootloader_support/src/bootloader_random_$(CPU_FAM).c \
|
||||
components/bootloader_support/src/bootloader_utility.c \
|
||||
components/bootloader_support/src/$(CPU)/bootloader_$(CPU).c \
|
||||
components/bootloader_support/src/$(CPU)/bootloader_sha.c \
|
||||
components/bootloader_support/src/$(CPU)/bootloader_soc.c \
|
||||
components/bootloader_support/src/$(CPU_FAM)/bootloader_$(CPU_FAM).c \
|
||||
components/bootloader_support/src/$(CPU_FAM)/bootloader_sha.c \
|
||||
components/bootloader_support/src/$(CPU_FAM)/bootloader_soc.c \
|
||||
components/bootloader_support/src/esp_image_format.c \
|
||||
components/bootloader_support/src/flash_encrypt.c \
|
||||
components/bootloader_support/src/flash_partitions.c \
|
||||
components/bootloader_support/src/flash_qio_mode.c \
|
||||
components/bootloader_support/src/secure_boot.c \
|
||||
components/efuse/$(CPU)/esp_efuse_fields.c \
|
||||
components/efuse/$(CPU)/esp_efuse_table.c \
|
||||
components/efuse/$(CPU)/esp_efuse_utility.c \
|
||||
components/efuse/$(CPU_FAM)/esp_efuse_fields.c \
|
||||
components/efuse/$(CPU_FAM)/esp_efuse_table.c \
|
||||
components/efuse/$(CPU_FAM)/esp_efuse_utility.c \
|
||||
components/efuse/src/esp_efuse_api.c \
|
||||
components/efuse/src/esp_efuse_fields.c \
|
||||
components/efuse/src/esp_efuse_utility.c \
|
||||
components/esp_common/src/esp_err_to_name.c \
|
||||
components/esp_hw_support/compare_set.c \
|
||||
components/esp_hw_support/cpu_util.c \
|
||||
components/esp_hw_support/port/$(CPU)/chip_info.c \
|
||||
components/esp_hw_support/port/$(CPU)/rtc_clk.c \
|
||||
components/esp_hw_support/port/$(CPU)/rtc_clk_init.c \
|
||||
components/esp_hw_support/port/$(CPU)/rtc_init.c \
|
||||
components/esp_hw_support/port/$(CPU)/rtc_pm.c \
|
||||
components/esp_hw_support/port/$(CPU)/rtc_sleep.c \
|
||||
components/esp_hw_support/port/$(CPU)/rtc_time.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/chip_info.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/rtc_clk.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/rtc_clk_init.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/rtc_init.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/rtc_pm.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/rtc_sleep.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/rtc_time.c \
|
||||
components/esp_rom/patches/esp_rom_crc.c \
|
||||
components/esp_rom/patches/esp_rom_sys.c \
|
||||
components/esp_rom/patches/esp_rom_tjpgd.c \
|
||||
@ -69,54 +69,54 @@ ESP_SDK_BOOTLOADER_SRCS = \
|
||||
components/log/log.c \
|
||||
components/log/log_noos.c \
|
||||
components/newlib/syscalls.c \
|
||||
components/soc/$(CPU)/adc_periph.c \
|
||||
components/soc/$(CPU)/gpio_periph.c \
|
||||
components/soc/$(CPU)/i2c_periph.c \
|
||||
components/soc/$(CPU)/i2s_periph.c \
|
||||
components/soc/$(CPU)/interrupts.c \
|
||||
components/soc/$(CPU)/ledc_periph.c \
|
||||
components/soc/$(CPU)/rmt_periph.c \
|
||||
components/soc/$(CPU)/sigmadelta_periph.c \
|
||||
components/soc/$(CPU)/spi_periph.c \
|
||||
components/soc/$(CPU)/timer_periph.c \
|
||||
components/soc/$(CPU)/uart_periph.c \
|
||||
components/soc/$(CPU_FAM)/adc_periph.c \
|
||||
components/soc/$(CPU_FAM)/gpio_periph.c \
|
||||
components/soc/$(CPU_FAM)/i2c_periph.c \
|
||||
components/soc/$(CPU_FAM)/i2s_periph.c \
|
||||
components/soc/$(CPU_FAM)/interrupts.c \
|
||||
components/soc/$(CPU_FAM)/ledc_periph.c \
|
||||
components/soc/$(CPU_FAM)/rmt_periph.c \
|
||||
components/soc/$(CPU_FAM)/sigmadelta_periph.c \
|
||||
components/soc/$(CPU_FAM)/spi_periph.c \
|
||||
components/soc/$(CPU_FAM)/timer_periph.c \
|
||||
components/soc/$(CPU_FAM)/uart_periph.c \
|
||||
components/soc/lldesc.c \
|
||||
components/spi_flash/$(CPU)/spi_flash_rom_patch.c \
|
||||
components/spi_flash/$(CPU_FAM)/spi_flash_rom_patch.c \
|
||||
#
|
||||
|
||||
ifneq (,$(filter xtensa%,$(TARGET_ARCH)))
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/esp_hw_support/port/$(CPU)/rtc_wdt.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU)/lcd_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU)/pcnt_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU)/rtc_io_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU)/touch_sensor_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/esp_hw_support/port/$(CPU_FAM)/rtc_wdt.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU_FAM)/lcd_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU_FAM)/pcnt_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU_FAM)/rtc_io_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU_FAM)/touch_sensor_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/xtensa/eri.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/xtensa/xt_trax.c
|
||||
else
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/esp_hw_support/port/$(CPU)/cpu_util_$(CPU).c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/esp_hw_support/port/$(CPU_FAM)/cpu_util_$(CPU_FAM).c
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp32 esp32s2,$(CPU)))
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU)/dac_periph.c
|
||||
ifneq (,$(filter esp32 esp32s2,$(CPU_FAM)))
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU_FAM)/dac_periph.c
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp32 esp32s3,$(CPU)))
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU)/mcpwm_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU)/sdio_slave_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU)/sdmmc_periph.c
|
||||
ifneq (,$(filter esp32 esp32s3,$(CPU_FAM)))
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU_FAM)/mcpwm_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU_FAM)/sdio_slave_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU_FAM)/sdmmc_periph.c
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp32c3 esp32h2 esp32s3,$(CPU)))
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/efuse/$(CPU)/esp_efuse_rtc_calib.c
|
||||
ifneq (,$(filter esp32c3 esp32h2 esp32s3,$(CPU_FAM)))
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/efuse/$(CPU_FAM)/esp_efuse_rtc_calib.c
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp32,$(CPU)))
|
||||
ifneq (,$(filter esp32,$(CPU_FAM)))
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/efuse/src/esp_efuse_api_key_esp32.c
|
||||
ESP_SDK_BOOTLOADER_ASMSRC = components/esp_rom/patches/esp_rom_longjmp.S
|
||||
else
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/efuse/src/esp_efuse_api_key_esp32xx.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU)/dedic_gpio_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU)/gdma_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU_FAM)/dedic_gpio_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/$(CPU_FAM)/gdma_periph.c
|
||||
ESP_SDK_BOOTLOADER_SRCS += components/soc/soc_include_legacy_warn.c
|
||||
endif
|
||||
|
||||
@ -132,24 +132,24 @@ INCLUDES = \
|
||||
-I$(ESP32_SDK_DIR)/components/bootloader_support/include_bootloader \
|
||||
-I$(ESP32_SDK_DIR)/components/efuse/include \
|
||||
-I$(ESP32_SDK_DIR)/components/efuse/private_include \
|
||||
-I$(ESP32_SDK_DIR)/components/efuse/$(CPU)/include \
|
||||
-I$(ESP32_SDK_DIR)/components/efuse/$(CPU)/private_include \
|
||||
-I$(ESP32_SDK_DIR)/components/efuse/$(CPU_FAM)/include \
|
||||
-I$(ESP32_SDK_DIR)/components/efuse/$(CPU_FAM)/private_include \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_common/include \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_hw_support/include \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_hw_support/include/soc \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_hw_support/include/soc/$(CPU) \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU) \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU)/private_include \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_rom/$(CPU) \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_hw_support/include/soc/$(CPU_FAM) \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU_FAM) \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU_FAM)/private_include \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM) \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_rom/include \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_rom/include/$(CPU) \
|
||||
-I$(ESP32_SDK_DIR)/components/hal/$(CPU)/include \
|
||||
-I$(ESP32_SDK_DIR)/components/esp_rom/include/$(CPU_FAM) \
|
||||
-I$(ESP32_SDK_DIR)/components/hal/$(CPU_FAM)/include \
|
||||
-I$(ESP32_SDK_DIR)/components/hal/include \
|
||||
-I$(ESP32_SDK_DIR)/components/hal/platform_port/include \
|
||||
-I$(ESP32_SDK_DIR)/components/log/include \
|
||||
-I$(ESP32_SDK_DIR)/components/newlib/platform_include \
|
||||
-I$(ESP32_SDK_DIR)/components/soc/$(CPU)/. \
|
||||
-I$(ESP32_SDK_DIR)/components/soc/$(CPU)/include \
|
||||
-I$(ESP32_SDK_DIR)/components/soc/$(CPU_FAM)/. \
|
||||
-I$(ESP32_SDK_DIR)/components/soc/$(CPU_FAM)/include \
|
||||
-I$(ESP32_SDK_DIR)/components/soc/include \
|
||||
-I$(ESP32_SDK_DIR)/components/spi_flash/include \
|
||||
-I$(ESP32_SDK_DIR)/components/spi_flash/include/spi_flash \
|
||||
@ -168,7 +168,7 @@ endif
|
||||
|
||||
ifneq (,$(filter xtensa%,$(TARGET_ARCH)))
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/xtensa/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/xtensa/$(CPU)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/xtensa/$(CPU_FAM)/include
|
||||
CFLAGS += -mlongcalls -mtext-section-literals
|
||||
endif
|
||||
|
||||
@ -208,14 +208,14 @@ CFLAGS += \
|
||||
|
||||
ifneq (,$(filter xtensa%,$(TARGET_ARCH)))
|
||||
LINKFLAGS = -mlongcalls
|
||||
ESP_SDK_BOOTLOADER_ADD_LINK_FLAGS += -L$(ESP32_SDK_DIR)/components/xtensa/$(CPU) -lxt_hal
|
||||
ESP_SDK_BOOTLOADER_ADD_LINK_FLAGS += -L$(ESP32_SDK_DIR)/components/xtensa/$(CPU_FAM) -lxt_hal
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp32 esp32s2,$(CPU)))
|
||||
ifneq (,$(filter esp32 esp32s2,$(CPU_FAM)))
|
||||
LINKFLAGS =
|
||||
ESP_SDK_BOOTLOADER_ADD_LINK_FLAGS += \
|
||||
-T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU)/ld/$(CPU).rom.newlib-funcs.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU)/ld/$(CPU).rom.spiflash.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.newlib-funcs.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.spiflash.ld \
|
||||
#
|
||||
endif
|
||||
|
||||
@ -240,12 +240,12 @@ LINKFLAGS += \
|
||||
$(ESP_SDK_BOOTLOADER_ASMOBJS) \
|
||||
-Lgcc \
|
||||
$(ESP_SDK_BOOTLOADER_ADD_LINK_FLAGS) \
|
||||
-T$(ESP32_SDK_DIR)/components/bootloader/subproject/main/ld/$(CPU)/bootloader.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/bootloader/subproject/main/ld/$(CPU)/bootloader.rom.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/soc/$(CPU)/ld/$(CPU).peripherals.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU)/ld/$(CPU).rom.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU)/ld/$(CPU).rom.api.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU)/ld/$(CPU).rom.libgcc.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/bootloader/subproject/main/ld/$(CPU_FAM)/bootloader.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/bootloader/subproject/main/ld/$(CPU_FAM)/bootloader.rom.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/soc/$(CPU_FAM)/ld/$(CPU_FAM).peripherals.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.api.ld \
|
||||
-T$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)/ld/$(CPU_FAM).rom.libgcc.ld \
|
||||
-Wl,--end-group \
|
||||
-Wl,-EL \
|
||||
|
||||
@ -309,7 +309,7 @@ $(ESP_SDK_BOOTLOADER_ELF): \
|
||||
$(ESP_SDK_BOOTLOADER_ADDOBJS) | $(ESP_SDK_BOOTLOADER_DIR)
|
||||
$(Q)$(CC) -o $@ $(LINKFLAGS) -Wl,-Map=$(@:%.elf=%.map)
|
||||
|
||||
FLASH_CHIP = $(CPU)
|
||||
FLASH_CHIP = $(CPU_FAM)
|
||||
ESPTOOL ?= $(RIOTTOOLS)/esptools/esptool_v3.2.py
|
||||
# TODO: These should be exported/configurable from the app side. That would
|
||||
# require to export these values.
|
||||
|
@ -10,8 +10,8 @@ PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/platform_port/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/include
|
||||
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/$(CPU)/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/$(CPU)/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/$(CPU_FAM)/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/$(CPU_FAM)/include
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
||||
|
@ -5,16 +5,16 @@ ESP32_SDK_SRC = \
|
||||
components/driver/adc.c \
|
||||
components/driver/adc_common.c \
|
||||
components/hal/adc_hal.c \
|
||||
components/soc/$(CPU)/adc_periph.c \
|
||||
components/soc/$(CPU_FAM)/adc_periph.c \
|
||||
#
|
||||
|
||||
ifneq (,$(filter esp32c3 esp32s3,$(CPU)))
|
||||
ESP32_SDK_SRC += components/driver/$(CPU)/adc2_init_cal.c
|
||||
ifneq (,$(filter esp32c3 esp32s3,$(CPU_FAM)))
|
||||
ESP32_SDK_SRC += components/driver/$(CPU_FAM)/adc2_init_cal.c
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/driver/include/driver
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp32c3 esp32h2 esp32s3,$(CPU)))
|
||||
ESP32_SDK_SRC += components/efuse/$(CPU)/esp_efuse_rtc_calib.c
|
||||
ifneq (,$(filter esp32c3 esp32h2 esp32s3,$(CPU_FAM)))
|
||||
ESP32_SDK_SRC += components/efuse/$(CPU_FAM)/esp_efuse_rtc_calib.c
|
||||
endif
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -2,19 +2,19 @@ MODULE = esp_idf_common
|
||||
|
||||
# source files required from ESP-IDF in any case, regardless of additional modules
|
||||
ESP32_SDK_SRC = \
|
||||
components/bootloader_support/src/bootloader_flash_config_$(CPU).c \
|
||||
components/bootloader_support/src/bootloader_flash_config_$(CPU_FAM).c \
|
||||
components/bootloader_support/src/bootloader_flash.c \
|
||||
components/bootloader_support/src/bootloader_efuse_$(CPU).c \
|
||||
components/bootloader_support/src/bootloader_efuse_$(CPU_FAM).c \
|
||||
components/bootloader_support/src/bootloader_mem.c \
|
||||
components/bootloader_support/src/bootloader_random_$(CPU).c \
|
||||
components/bootloader_support/src/bootloader_random_$(CPU_FAM).c \
|
||||
components/driver/periph_ctrl.c \
|
||||
components/esp_hw_support/cpu_util.c \
|
||||
components/esp_hw_support/esp_clk.c \
|
||||
components/esp_hw_support/port/$(CPU)/rtc_clk.c \
|
||||
components/esp_hw_support/port/$(CPU)/rtc_clk_init.c \
|
||||
components/esp_hw_support/port/$(CPU)/rtc_init.c \
|
||||
components/esp_hw_support/port/$(CPU)/rtc_sleep.c \
|
||||
components/esp_hw_support/port/$(CPU)/rtc_time.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/rtc_clk.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/rtc_clk_init.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/rtc_init.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/rtc_sleep.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/rtc_time.c \
|
||||
components/esp_hw_support/regi2c_ctrl.c \
|
||||
components/esp_hw_support/sleep_modes.c \
|
||||
components/esp_pm/pm_impl.c \
|
||||
@ -22,9 +22,9 @@ ESP32_SDK_SRC = \
|
||||
components/esp_system/esp_err.c \
|
||||
components/esp_system/esp_system.c \
|
||||
components/esp_system/port/cpu_start.c \
|
||||
components/esp_system/port/soc/$(CPU)/cache_err_int.c \
|
||||
components/esp_system/port/soc/$(CPU)/clk.c \
|
||||
components/esp_system/port/soc/$(CPU)/reset_reason.c \
|
||||
components/esp_system/port/soc/$(CPU_FAM)/cache_err_int.c \
|
||||
components/esp_system/port/soc/$(CPU_FAM)/clk.c \
|
||||
components/esp_system/port/soc/$(CPU_FAM)/reset_reason.c \
|
||||
components/esp_system/system_time.c \
|
||||
components/esp_timer/src/esp_timer.c \
|
||||
components/esp_timer/src/system_time.c \
|
||||
@ -51,7 +51,7 @@ endif
|
||||
# TODO separate module
|
||||
ifneq (,$(filter periph_dac,$(USEMODULE)))
|
||||
ESP32_SDK_SRC += components/driver/dac_common.c
|
||||
ESP32_SDK_SRC += components/soc/$(CPU)/dac_periph.c
|
||||
ESP32_SDK_SRC += components/soc/$(CPU_FAM)/dac_periph.c
|
||||
endif
|
||||
|
||||
# TODO separate module
|
||||
@ -64,25 +64,25 @@ ifneq (,$(filter periph_i2c%,$(USEMODULE)))
|
||||
ESP32_SDK_SRC += components/driver/i2c.c
|
||||
ESP32_SDK_SRC += components/hal/i2c_hal.c
|
||||
ESP32_SDK_SRC += components/hal/i2c_hal_iram.c
|
||||
ESP32_SDK_SRC += components/soc/$(CPU)/i2c_periph.c
|
||||
ESP32_SDK_SRC += components/soc/$(CPU_FAM)/i2c_periph.c
|
||||
endif
|
||||
|
||||
# TODO separate module
|
||||
ifneq (,$(filter periph_pwm%,$(USEMODULE)))
|
||||
ESP32_SDK_SRC += components/hal/ledc_hal.c
|
||||
ESP32_SDK_SRC += components/hal/ledc_hal_iram.c
|
||||
ESP32_SDK_SRC += components/soc/$(CPU)/ledc_periph.c
|
||||
ESP32_SDK_SRC += components/soc/$(CPU_FAM)/ledc_periph.c
|
||||
endif
|
||||
|
||||
# TODO separate module
|
||||
ifneq (,$(filter periph_spi,$(USEMODULE)))
|
||||
ESP32_SDK_SRC += components/hal/spi_hal.c
|
||||
ESP32_SDK_SRC += components/soc/$(CPU)/spi_periph.c
|
||||
ESP32_SDK_SRC += components/soc/$(CPU_FAM)/spi_periph.c
|
||||
endif
|
||||
|
||||
ifneq (,$(filter xtensa%,$(TARGET_ARCH)))
|
||||
ESP32_SDK_SRC += components/esp_hw_support/port/$(CPU)/rtc_wdt.c
|
||||
ESP32_SDK_SRC += components/soc/$(CPU)/rtc_io_periph.c
|
||||
ESP32_SDK_SRC += components/esp_hw_support/port/$(CPU_FAM)/rtc_wdt.c
|
||||
ESP32_SDK_SRC += components/soc/$(CPU_FAM)/rtc_io_periph.c
|
||||
endif
|
||||
|
||||
ifneq (,$(filter riscv%,$(TARGET_ARCH)))
|
||||
@ -91,15 +91,15 @@ ifneq (,$(filter riscv%,$(TARGET_ARCH)))
|
||||
ESP32_SDK_ASMSRC += components/riscv/vectors.S
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp32,$(CPU)))
|
||||
ifneq (,$(filter esp32,$(CPU_FAM)))
|
||||
ESP32_SDK_SRC += components/esp_timer/src/esp_timer_impl_frc_legacy.c
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp32c3,$(CPU)))
|
||||
ESP32_SDK_SRC += components/esp_hw_support/port/$(CPU)/cpu_util_$(CPU).c
|
||||
ifneq (,$(filter esp32c3,$(CPU_FAM)))
|
||||
ESP32_SDK_SRC += components/esp_hw_support/port/$(CPU_FAM)/cpu_util_$(CPU_FAM).c
|
||||
ESP32_SDK_SRC += components/esp_hw_support/sleep_retention.c
|
||||
ESP32_SDK_SRC += components/esp_timer/src/esp_timer_impl_systimer.c
|
||||
ESP32_SDK_SRC += components/hal/$(CPU)/rtc_cntl_hal.c
|
||||
ESP32_SDK_SRC += components/hal/$(CPU_FAM)/rtc_cntl_hal.c
|
||||
ESP32_SDK_SRC += components/hal/systimer_hal.c
|
||||
endif
|
||||
|
||||
|
@ -2,15 +2,15 @@ MODULE = esp_idf_efuse
|
||||
|
||||
# source files to be compiled for this module
|
||||
ESP32_SDK_SRC = \
|
||||
components/efuse/$(CPU)/esp_efuse_fields.c \
|
||||
components/efuse/$(CPU)/esp_efuse_table.c \
|
||||
components/efuse/$(CPU)/esp_efuse_utility.c \
|
||||
components/efuse/$(CPU_FAM)/esp_efuse_fields.c \
|
||||
components/efuse/$(CPU_FAM)/esp_efuse_table.c \
|
||||
components/efuse/$(CPU_FAM)/esp_efuse_utility.c \
|
||||
components/efuse/src/esp_efuse_api.c \
|
||||
components/efuse/src/esp_efuse_utility.c \
|
||||
components/esp_hw_support/mac_addr.c \
|
||||
#
|
||||
|
||||
ifneq (,$(filter esp32,$(CPU)))
|
||||
ifneq (,$(filter esp32,$(CPU_FAM)))
|
||||
ESP32_SDK_SRC += components/efuse/src/esp_efuse_api_key_esp32.c
|
||||
else
|
||||
ESP32_SDK_SRC += components/efuse/src/esp_efuse_api_key_esp32xx.c
|
||||
@ -19,7 +19,7 @@ endif
|
||||
# additional include pathes required by this module
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/private_include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/$(CPU)/private_include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/$(CPU_FAM)/private_include
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
||||
|
@ -3,12 +3,12 @@
|
||||
# additional include pathes required by als ESP-IDF module
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/bootloader_support/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/bootloader_support/include_bootloader
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/driver/$(CPU)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/driver/$(CPU_FAM)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/$(CPU)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/$(CPU)/private_include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU)
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU)/private_include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/$(CPU_FAM)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/$(CPU_FAM)/private_include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU_FAM)
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU_FAM)/private_include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_ipc/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_pm/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_system/port/public_compat
|
||||
@ -19,11 +19,11 @@ INCLUDES += -I$(ESP32_SDK_DIR)/components/spi_flash/include
|
||||
|
||||
ifneq (,$(filter xtensa%,$(TARGET_ARCH)))
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/xtensa/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/xtensa/$(CPU)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/xtensa/$(CPU_FAM)/include
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp32c3 esp32h2 esp32s3,$(CPU)))
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU)/private_include
|
||||
ifneq (,$(filter esp32c3 esp32h2 esp32s3,$(CPU_FAM)))
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU_FAM)/private_include
|
||||
endif
|
||||
|
||||
SRC := $(addprefix $(ESP32_SDK_DIR)/,$(ESP32_SDK_SRC))
|
||||
|
@ -6,7 +6,7 @@ ESP32_SDK_SRC = \
|
||||
components/driver/rtc_io.c \
|
||||
components/driver/rtc_module.c \
|
||||
components/hal/gpio_hal.c \
|
||||
components/soc/$(CPU)/gpio_periph.c \
|
||||
components/soc/$(CPU_FAM)/gpio_periph.c \
|
||||
#
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -8,7 +8,7 @@ ESP32_SDK_SRC = \
|
||||
components/heap/heap_trace_standalone.c \
|
||||
components/heap/multi_heap.c \
|
||||
components/heap/multi_heap_poisoning.c \
|
||||
components/heap/port/$(CPU)/memory_layout.c \
|
||||
components/heap/port/$(CPU_FAM)/memory_layout.c \
|
||||
components/heap/port/memory_layout_utils.c \
|
||||
#
|
||||
|
||||
|
@ -4,25 +4,25 @@ MODULE = esp_idf_spi_flash
|
||||
ESP32_SDK_SRC = \
|
||||
components/bootloader_support/src/bootloader_common.c \
|
||||
components/driver/spi_common.c \
|
||||
components/spi_flash/$(CPU)/flash_ops_$(CPU).c \
|
||||
components/spi_flash/$(CPU)/spi_flash_rom_patch.c \
|
||||
components/spi_flash/$(CPU_FAM)/flash_ops_$(CPU_FAM).c \
|
||||
components/spi_flash/$(CPU_FAM)/spi_flash_rom_patch.c \
|
||||
components/spi_flash/esp_flash_api.c \
|
||||
components/spi_flash/partition.c \
|
||||
#
|
||||
|
||||
ifeq (,$(filter periph_spi,$(USEMODULE)))
|
||||
# no need to compile it here if it is already compiled for periph_spi
|
||||
ESP32_SDK_SRC += components/soc/$(CPU)/spi_periph.c
|
||||
ESP32_SDK_SRC += components/soc/$(CPU_FAM)/spi_periph.c
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp32,$(CPU)))
|
||||
ifneq (,$(filter esp32,$(CPU_FAM)))
|
||||
ESP32_SDK_SRC += components/spi_flash/flash_mmap.c
|
||||
endif
|
||||
|
||||
# additional include pathes required by this module
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/app_update/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/bootloader_support/include_bootloader
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_rom/$(CPU)
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_rom/$(CPU_FAM)
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/spi_flash/include/spi_flash
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -2,13 +2,13 @@ MODULE = esp_idf_spi_ram
|
||||
|
||||
# source files to be compiled for this module
|
||||
ESP32_SDK_SRC = \
|
||||
components/esp_hw_support/port/$(CPU)/spiram.c \
|
||||
components/esp_hw_support/port/$(CPU)/spiram_psram.c \
|
||||
components/esp_hw_support/port/$(CPU)/cache_sram_mmu.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/spiram.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/spiram_psram.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/cache_sram_mmu.c \
|
||||
#
|
||||
|
||||
# additional include pathes required by this module
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/$(CPU)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/$(CPU_FAM)/include
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
||||
|
@ -3,15 +3,15 @@ MODULE = esp_idf_wifi
|
||||
# source files to be compiled for this module
|
||||
ESP32_SDK_SRC = \
|
||||
components/esp_event/event_send.c \
|
||||
components/esp_hw_support/port/$(CPU)/dport_access.c \
|
||||
components/esp_hw_support/port/$(CPU_FAM)/dport_access.c \
|
||||
components/esp_phy/src/phy_init.c \
|
||||
components/esp_wifi/$(CPU)/esp_adapter.c \
|
||||
components/esp_wifi/$(CPU_FAM)/esp_adapter.c \
|
||||
components/esp_wifi/src/wifi_init.c \
|
||||
#
|
||||
|
||||
# additional include pathes required by this module
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_phy/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_phy/$(CPU)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_phy/$(CPU_FAM)/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/tcpip_adapter/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/esp_supplicant/include
|
||||
|
Loading…
Reference in New Issue
Block a user