Skip to content

Commit

Permalink
Update CHIP Code to use ESP-IDF v4.3 (project-chip#6615)
Browse files Browse the repository at this point in the history
* update esp-idf version to release/v4.3

* update dockerfile and chip-build version

* update other apps esp-idf version to release/v4.3

* update test_driver README file
  • Loading branch information
wqx6 authored May 11, 2021
1 parent dbfe36c commit d5d7116
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion examples/all-clusters-app/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ set(EXTRA_COMPONENT_DIRS
)

project(chip-all-clusters-app)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND)
2 changes: 1 addition & 1 deletion examples/all-clusters-app/esp32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ EXTRA_COMPONENT_DIRS += $(PROJECT_PATH)/third_party/connectedhomeip/config/esp32
$(PROJECT_PATH)/../../common/QRCode \
$(PROJECT_PATH)/../../common/screen-framework \

CXXFLAGS += -std=c++14 -Os -DLWIP_IPV6_SCOPES=0
CXXFLAGS += -std=gnu++14 -Os -DLWIP_IPV6_SCOPES=0
CPPFLAGS += -Os -DLWIP_IPV6_SCOPES=0 -DCHIP_HAVE_CONFIG_H
CFLAGS += -Os -DLWIP_IPV6_SCOPES=0

Expand Down
4 changes: 2 additions & 2 deletions examples/all-clusters-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ Development Framework and the xtensa-esp32-elf toolchain.
The VSCode devcontainer has these components pre-installed, so you can skip this
step. To install these components manually, follow these steps:

- Clone the Espressif ESP-IDF and checkout release/v4.2 branch
- Clone the Espressif ESP-IDF and checkout release/v4.3 branch

$ mkdir ${HOME}/tools
$ cd ${HOME}/tools
$ git clone https://github.com/espressif/esp-idf.git
$ cd esp-idf
$ git checkout release/v4.2
$ git checkout release/v4.3
$ git submodule update --init
$ export IDF_PATH=${HOME}/tools/esp-idf
$ ./install.sh
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ set(EXTRA_COMPONENT_DIRS
)

project(chip-lock-app)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND)
4 changes: 2 additions & 2 deletions examples/lock-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Development Framework and the xtensa-esp32-elf toolchain.
The VSCode devcontainer has these components pre-installed, so you can skip this
step. To install these components manually, follow these steps:

- Clone the Espressif ESP-IDF and checkout release/v4.2 branch
- Clone the Espressif ESP-IDF and checkout release/v4.3 branch

$ mkdir ${HOME}/tools
$ cd ${HOME}/tools
$ git clone https://github.com/espressif/esp-idf.git
$ cd esp-idf
$ git checkout release/v4.2
$ git checkout release/v4.3
$ git submodule update --init
$ export IDF_PATH=${HOME}/tools/esp-idf
$ ./install.sh
Expand Down
2 changes: 1 addition & 1 deletion examples/persistent-storage/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ set(EXTRA_COMPONENT_DIRS
)

project(persistent-storage)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND)
2 changes: 1 addition & 1 deletion examples/persistent-storage/esp32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PROJECT_NAME := persistent-storage

EXTRA_COMPONENT_DIRS += $(PROJECT_PATH)/third_party/connectedhomeip/config/esp32/components \

CXXFLAGS += -std=gnu++17 -Os -DLWIP_IPV6_SCOPES=0
CXXFLAGS += -std=gnu++14 -Os -DLWIP_IPV6_SCOPES=0
CPPFLAGS += -Os -DLWIP_IPV6_SCOPES=0 -DCHIP_HAVE_CONFIG_H
CFLAGS += -Os -DLWIP_IPV6_SCOPES=0

Expand Down
4 changes: 2 additions & 2 deletions examples/persistent-storage/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ Development Framework and the xtensa-esp32-elf toolchain.
The VSCode devcontainer has these components pre-installed, so you can skip this
step. To install these components manually, follow these steps:

- Clone the Espressif ESP-IDF and checkout release/v4.2 branch
- Clone the Espressif ESP-IDF and checkout release/v4.3 branch

$ mkdir ${HOME}/tools
$ cd ${HOME}/tools
$ git clone https://github.com/espressif/esp-idf.git
$ cd esp-idf
$ git checkout release/v4.2
$ git checkout release/v4.3
$ git submodule update --init
$ export IDF_PATH=${HOME}/tools/esp-idf
$ ./install.sh
Expand Down
2 changes: 1 addition & 1 deletion examples/pigweed-app/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ set(EXTRA_COMPONENT_DIRS
)

project(chip-pigweed-app)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND)
4 changes: 2 additions & 2 deletions examples/pigweed-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ Development Framework and the xtensa-esp32-elf toolchain.
The VSCode devcontainer has these components pre-installed, so you can skip this
step. To install these components manually, follow these steps:

- Clone the Espressif ESP-IDF and checkout release/v4.2 branch
- Clone the Espressif ESP-IDF and checkout release/v4.3 branch

$ mkdir ${HOME}/tools
$ cd ${HOME}/tools
$ git clone https://github.com/espressif/esp-idf.git
$ cd esp-idf
$ git checkout release/v4.2
$ git checkout release/v4.3
$ git submodule update --init
$ export IDF_PATH=${HOME}/tools/esp-idf
$ ./install.sh
Expand Down
2 changes: 1 addition & 1 deletion examples/temperature-measurement-app/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ set(EXTRA_COMPONENT_DIRS
)

project(chip-temperature-measurement-app)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND)
2 changes: 1 addition & 1 deletion examples/temperature-measurement-app/esp32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ EXTRA_COMPONENT_DIRS += $(PROJECT_PATH)/third_party/connectedhomeip/config/esp32
$(PROJECT_PATH)/../../common/QRCode \
$(PROJECT_PATH)/../../common/screen-framework \

CXXFLAGS += -std=c++14 -Os -DLWIP_IPV6_SCOPES=0
CXXFLAGS += -std=gnu++14 -Os -DLWIP_IPV6_SCOPES=0
CPPFLAGS += -Os -DLWIP_IPV6_SCOPES=0 -DCHIP_HAVE_CONFIG_H
CFLAGS += -Os -DLWIP_IPV6_SCOPES=0

Expand Down
4 changes: 2 additions & 2 deletions examples/temperature-measurement-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Development Framework and the xtensa-esp32-elf toolchain.
The VSCode devcontainer has these components pre-installed, so you can skip this
step. To install these components manually, follow these steps:

- Clone the Espressif ESP-IDF and checkout release/v4.2 branch
- Clone the Espressif ESP-IDF and checkout release/v4.3 branch

$ mkdir ${HOME}/tools
$ cd ${HOME}/tools
$ git clone https://github.com/espressif/esp-idf.git
$ cd esp-idf
$ git checkout release/v4.2
$ git checkout release/v4.3
$ git submodule update --init
$ export IDF_PATH=${HOME}/tools/esp-idf
$ ./install.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ COMPONENT_SRCDIRS :=
../third_party/connectedhomeip/src/app/reporting \
../third_party/connectedhomeip/src/app/clusters/basic \
../third_party/connectedhomeip/src/app/clusters/bindings \
../third_party/connectedhomeip/src/app/clusters/general-commissioning-server \
../third_party/connectedhomeip/src/app/clusters/network-commissioning \
../third_party/connectedhomeip/src/app/clusters/temperature-measurement-server \

Expand Down
2 changes: 1 addition & 1 deletion integrations/docker/images/chip-build-esp32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y python libgcrypt20-dev \
&& mkdir -p /opt/espressif \
&& cd /opt/espressif \
&& git clone --progress -b release/v4.2 https://github.com/espressif/esp-idf.git \
&& git clone --progress -b release/v4.3 https://github.com/espressif/esp-idf.git \
&& cd esp-idf \
&& git submodule update --init --progress \
&& IDF_TOOLS_PATH=/opt/espressif/tools ./install.sh \
Expand Down
2 changes: 1 addition & 1 deletion src/platform/ESP32/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void)
esp_fill_random(ap_mac, sizeof(ap_mac));
/* Bit 0 of the first octet of MAC Address should always be 0 */
ap_mac[0] &= (uint8_t) ~0x01;
err = esp_wifi_set_mac(ESP_IF_WIFI_AP, ap_mac);
err = esp_wifi_set_mac(WIFI_IF_AP, ap_mac);
SuccessOrExit(err);
}

Expand Down
4 changes: 2 additions & 2 deletions src/test_driver/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ The `chip-build` Docker container and VSCode devcontainer has these components
pre-installed, so you can skip this step. To install these components manually,
follow these steps:

- Clone the Espressif ESP-IDF and checkout release/v4.2 branch
- Clone the Espressif ESP-IDF and checkout release/v4.3 branch

$ mkdir -p ${HOME}/tools
$ cd ${HOME}/tools
$ git clone https://github.com/espressif/esp-idf.git
$ cd esp-idf
$ git checkout release/v4.2
$ git checkout release/v4.3
$ git submodule update --init
$ export IDF_PATH=${HOME}/tools/esp-idf
$ ./install.sh
Expand Down

0 comments on commit d5d7116

Please sign in to comment.