Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions arch/risc-v/src/common/espressif/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,22 @@ endif
GIT_DEPTH_PARAMETER = --depth=$(GIT_DEPTH)
endif

# When set USE_NXTMPDIR_ESP_REPO_DIRECTLY=y, will directly use esp-hal-3rdparty
# under nxtmpdir without CHECK_COMMITSHA, reset, checkout and update.

USE_NXTMPDIR_ESP_REPO_DIRECTLY ?= n

ifeq ($(STORAGETMP),y)
ifeq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO),$(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO))
endef
else
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CHECK_COMMITSHA, $(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO),$(ESP_HAL_3RDPARTY_VERSION))
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO),$(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO))
endef
endif
else
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO))
Expand All @@ -223,13 +234,17 @@ endif
chip/$(ESP_HAL_3RDPARTY_REPO):
$(Q) echo "Cloning Espressif HAL for 3rd Party Platforms"
$(Q) $(call CLONE_ESP_HAL_3RDPARTY_REPO)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: ${ESP_HAL_3RDPARTY_VERSION}"
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) checkout --quiet $(ESP_HAL_3RDPARTY_VERSION)
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init $(GIT_DEPTH_PARAMETER) components/mbedtls/mbedtls
endif
ifeq ($(CONFIG_ESP_WIRELESS),y)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: initializing submodules..."
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init $(GIT_DEPTH_PARAMETER) components/esp_phy/lib components/esp_wifi/lib components/bt/controller/lib_esp32c3_family components/esp_coex/lib
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls reset --quiet --hard
endif
$(Q) echo "Applying patches..."
$(Q) cd chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls && git apply ../../../nuttx/patches/components/mbedtls/mbedtls/*.patch
endif
Expand Down
13 changes: 13 additions & 0 deletions arch/risc-v/src/esp32c3-legacy/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,22 @@ ifndef ESP_HAL_3RDPARTY_URL
ESP_HAL_3RDPARTY_URL = https://github.com/espressif/esp-hal-3rdparty.git
endif

# When set USE_NXTMPDIR_ESP_REPO_DIRECTLY=y, will directly use esp-hal-3rdparty
# under nxtmpdir without CHECK_COMMITSHA, reset, checkout and update.

USE_NXTMPDIR_ESP_REPO_DIRECTLY ?= n

ifeq ($(STORAGETMP),y)
ifeq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO),$(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO))
endef
else
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CHECK_COMMITSHA, $(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO),$(ESP_HAL_3RDPARTY_VERSION))
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO),$(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO))
endef
endif
else
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO))
Expand All @@ -262,8 +273,10 @@ endif
chip/$(ESP_HAL_3RDPARTY_REPO):
$(Q) echo "Cloning Espressif HAL for 3rd Party Platforms"
$(Q) $(call CLONE_ESP_HAL_3RDPARTY_REPO)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: ${ESP_HAL_3RDPARTY_VERSION}"
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) checkout --quiet $(ESP_HAL_3RDPARTY_VERSION)
endif

# Silent preprocessor warnings

Expand Down
17 changes: 17 additions & 0 deletions arch/xtensa/src/esp32/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,22 @@ endif
GIT_DEPTH_PARAMETER = --depth=$(GIT_DEPTH)
endif

# When set USE_NXTMPDIR_ESP_REPO_DIRECTLY=y, will directly use esp-hal-3rdparty
# under nxtmpdir without CHECK_COMMITSHA, reset, checkout and update.

USE_NXTMPDIR_ESP_REPO_DIRECTLY ?= n

ifeq ($(STORAGETMP),y)
ifeq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO),$(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO))
endef
else
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CHECK_COMMITSHA, $(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO),$(ESP_HAL_3RDPARTY_VERSION))
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO),$(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO))
endef
endif
else
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO))
Expand All @@ -251,8 +262,10 @@ endif
chip/$(ESP_HAL_3RDPARTY_REPO):
$(Q) echo "Cloning Espressif HAL for 3rd Party Platforms"
$(Q) $(call CLONE_ESP_HAL_3RDPARTY_REPO)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: ${ESP_HAL_3RDPARTY_VERSION}"
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) checkout --quiet $(ESP_HAL_3RDPARTY_VERSION)
endif

# Silent preprocessor warnings

Expand All @@ -273,14 +286,18 @@ include chip/hal.mk
include common/espressif/Make.defs

context:: chip/$(ESP_HAL_3RDPARTY_REPO)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: initializing submodules..."
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init $(GIT_DEPTH_PARAMETER) components/mbedtls/mbedtls components/esp_phy/lib components/esp_wifi/lib components/bt/controller/lib_esp32 components/esp_coex/lib
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls reset --quiet --hard
endif
$(Q) echo "Applying patches..."
$(Q) cd chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls && git apply ../../../nuttx/patches/components/mbedtls/mbedtls/*.patch
ifeq ($(CONFIG_ESPRESSIF_WIRELESS),y)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init $(GIT_DEPTH_PARAMETER) components/esp_phy/lib components/esp_wifi/lib components/bt/controller/lib_esp32 components/esp_coex/lib
endif
endif

distclean::
$(call DELDIR,chip/$(ESP_HAL_3RDPARTY_REPO))
Expand Down
17 changes: 17 additions & 0 deletions arch/xtensa/src/esp32s2/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,22 @@ ifndef ESP_HAL_3RDPARTY_URL
ESP_HAL_3RDPARTY_URL = https://github.com/espressif/esp-hal-3rdparty.git
endif

# When set USE_NXTMPDIR_ESP_REPO_DIRECTLY=y, will directly use esp-hal-3rdparty
# under nxtmpdir without CHECK_COMMITSHA, reset, checkout and update.

USE_NXTMPDIR_ESP_REPO_DIRECTLY ?= n

ifeq ($(STORAGETMP),y)
ifeq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO),$(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO))
endef
else
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CHECK_COMMITSHA, $(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO),$(ESP_HAL_3RDPARTY_VERSION))
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO),$(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO))
endef
endif
else
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO))
Expand All @@ -154,8 +165,10 @@ endif
chip/$(ESP_HAL_3RDPARTY_REPO):
$(Q) echo "Cloning Espressif HAL for 3rd Party Platforms"
$(Q) $(call CLONE_ESP_HAL_3RDPARTY_REPO)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: ${ESP_HAL_3RDPARTY_VERSION}"
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) checkout --quiet $(ESP_HAL_3RDPARTY_VERSION)
endif

# Silent preprocessor warnings

Expand All @@ -174,14 +187,18 @@ include common/espressif/Make.defs
include chip/Bootloader.mk

context:: chip/$(ESP_HAL_3RDPARTY_REPO)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: initializing submodules..."
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init $(GIT_DEPTH_PARAMETER) components/mbedtls/mbedtls
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls reset --quiet --hard
endif
$(Q) echo "Applying patches..."
$(Q) cd chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls && git apply ../../../nuttx/patches/components/mbedtls/mbedtls/*.patch
ifeq ($(CONFIG_ESPRESSIF_WIRELESS),y)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init $(GIT_DEPTH_PARAMETER) components/esp_phy/lib components/esp_wifi/lib
endif
endif

distclean::
$(call DELDIR,chip/$(ESP_HAL_3RDPARTY_REPO))
Expand Down
17 changes: 17 additions & 0 deletions arch/xtensa/src/esp32s3/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,22 @@ endif
GIT_DEPTH_PARAMETER = --depth=$(GIT_DEPTH)
endif

# When set USE_NXTMPDIR_ESP_REPO_DIRECTLY=y, will directly use esp-hal-3rdparty
# under nxtmpdir without CHECK_COMMITSHA, reset, checkout and update.

USE_NXTMPDIR_ESP_REPO_DIRECTLY ?= n

ifeq ($(STORAGETMP),y)
ifeq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO),$(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO))
endef
else
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CHECK_COMMITSHA, $(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO),$(ESP_HAL_3RDPARTY_VERSION))
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO),$(NXTMPDIR)/$(ESP_HAL_3RDPARTY_REPO))
endef
endif
else
define CLONE_ESP_HAL_3RDPARTY_REPO
$(call CLONE, $(ESP_HAL_3RDPARTY_URL),chip/$(ESP_HAL_3RDPARTY_REPO))
Expand All @@ -235,8 +246,10 @@ endif
chip/$(ESP_HAL_3RDPARTY_REPO):
$(Q) echo "Cloning Espressif HAL for 3rd Party Platforms"
$(Q) $(call CLONE_ESP_HAL_3RDPARTY_REPO)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: ${ESP_HAL_3RDPARTY_VERSION}"
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) checkout --quiet $(ESP_HAL_3RDPARTY_VERSION)
endif

# Silent preprocessor warnings

Expand All @@ -260,14 +273,18 @@ include chip/hal.mk
include common/espressif/Make.defs

context:: chip/$(ESP_HAL_3RDPARTY_REPO)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: initializing submodules..."
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init $(GIT_DEPTH_PARAMETER) components/mbedtls/mbedtls
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls reset --quiet --hard
endif
$(Q) echo "Applying patches..."
$(Q) cd chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls && git apply ../../../nuttx/patches/components/mbedtls/mbedtls/*.patch
ifeq ($(CONFIG_ESPRESSIF_WIRELESS),y)
ifneq ($(USE_NXTMPDIR_ESP_REPO_DIRECTLY),y)
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init $(GIT_DEPTH_PARAMETER) components/esp_phy/lib components/esp_wifi/lib components/bt/controller/lib_esp32c3_family components/esp_coex/lib
endif
endif

distclean::
$(call DELDIR,chip/$(ESP_HAL_3RDPARTY_REPO))
Expand Down
Loading