Skip to content

Commit

Permalink
Work around old IDF not liking modern build environments
Browse files Browse the repository at this point in the history
  • Loading branch information
jmattsson committed Oct 17, 2023
1 parent df99555 commit 090d4f0
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ bin
# ignore IDEA files
.idea
*.iml

.idf_patched
.idf_tools_installed
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,25 @@ THIS_MK_FILE:=$(notdir $(lastword $(MAKEFILE_LIST)))
THIS_DIR:=$(abspath $(dir $(lastword $(MAKEFILE_LIST))))
IDF_PATH=$(THIS_DIR)/sdk/esp32-esp-idf

all:
all: .idf_tools_installed
. $(IDF_PATH)/export.sh && $(MAKE) "$@"

%:
%: .idf_tools_installed
. $(IDF_PATH)/export.sh && $(MAKE) "$@"

IDF_PATCHES:=$(wildcard idf-patches/*)

.idf_patched: $(IDF_PATCHES)
@echo "Discarding local IDF changes..."
(cd "$(IDF_PATH)" && git checkout . )
@echo "Patching IDF..."
for f in $(IDF_PATCHES); do (cd "$(IDF_PATH)" && patch -p1 < "$(THIS_DIR)/$$f" ); done
touch "$@"

.idf_tools_installed: .idf_patched
"$(THIS_DIR)/install.sh"
touch "$@"

else

all:
Expand Down
24 changes: 24 additions & 0 deletions idf-patches/arm64-tools.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git i/tools/tools.json w/tools/tools.json
index 7dddff0d8d..bfbeb54de3 100644
--- i/tools/tools.json
+++ w/tools/tools.json
@@ -320,7 +320,8 @@
{
"install": "never",
"platforms": [
- "linux-i686"
+ "linux-i686",
+ "linux-arm64"
]
}
],
@@ -381,7 +382,8 @@
{
"install": "never",
"platforms": [
- "linux-i686"
+ "linux-i686",
+ "linux-arm64"
]
}
],
23 changes: 23 additions & 0 deletions idf-patches/python-deps.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git i/requirements.txt w/requirements.txt
index 0907e544f1..c697d74b91 100644
--- i/requirements.txt
+++ w/requirements.txt
@@ -19,13 +19,15 @@ pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
idf-component-manager>=0.2.99-beta

-gdbgui==0.13.2.0
+gdbgui==0.13.2.0; python_version < "3.11"
# 0.13.2.1 supports Python 3.6+ only
# Windows is not supported since 0.14.0.0. See https://github.com/cs01/gdbgui/issues/348
-pygdbmi<=0.9.0.2
+pygdbmi<=0.9.0.2; python_version < "3.11"
# The pygdbmi required max version 0.9.0.2 since 0.9.0.3 is not compatible with latest gdbgui (>=0.13.2.0)
# A compatible Socket.IO should be used. See https://github.com/miguelgrinberg/python-socketio/issues/578
-python-socketio<5
+python-socketio<5; python_version < "3.11"
+jinja2<3.1; python_version < "3.11" # See https://github.com/espressif/esp-idf/issues/8760
+itsdangerous<2.1; python_version < "3.11"

kconfiglib==13.7.1

0 comments on commit 090d4f0

Please sign in to comment.