Skip to content

Commit

Permalink
Fix esp32 IDF version number handling for patch releases (#2707)
Browse files Browse the repository at this point in the history
* Fix esp32 IDF version number handling for minor releases

For example where branch is tagged 'v5.0.5-173-g9d6770dfbb' we require just 'v5.0' to identify toolsets, python, etc.

* Fix bluetooth build with esp32s3 for latest IDF 5.0
  • Loading branch information
mikee47 authored Jan 11, 2024
1 parent eba0793 commit 45d0f95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sming/Arch/Esp32/Components/esp32/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ endif
endif

ifeq ($(ENABLE_BLUETOOTH),1)
ifeq (esp32s3-v5.2,$(ESP_VARIANT)-$(IDF_VERSION))
ifeq (esp32s3-1,$(ESP_VARIANT)-$(IDF_VERSION_5x))
ESP_BT_VARIANT := esp32c3
else
ESP_BT_VARIANT := $(ESP_VARIANT)
Expand Down
5 changes: 4 additions & 1 deletion Sming/Arch/Esp32/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ export IDF_PATH := $(call FixPath,$(IDF_PATH))

# Extract IDF version
ifndef IDF_VER
# e.g. v5.2-beta1-265-g405b8b5512 or v5.0.5-173-g9d6770dfbb
IDF_VER := $(shell (cd $$IDF_PATH && git describe --always --tags --dirty) | cut -c 1-31)
endif
IDF_VERSION := $(firstword $(subst -, ,$(IDF_VER)))
# Now just vmajor.minor
IDF_VERSION := $(subst ., ,$(firstword $(subst -, ,$(IDF_VER))))
IDF_VERSION := $(firstword $(IDF_VERSION)).$(word 2,$(IDF_VERSION))

# By default, downloaded tools will be installed under $HOME/.espressif directory
# (%USERPROFILE%/.espressif on Windows). This path can be modified by setting
Expand Down

0 comments on commit 45d0f95

Please sign in to comment.