Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tools] remove zap auto-install and export #64

Merged
merged 3 commits into from
Feb 16, 2023
Merged
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: 0 additions & 15 deletions MATTER.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,6 @@ Make sure ambz2_matter and connectedhomeip are on the same directory level

source scripts/activate.sh

## ZAP Installation
- ZAP is automatically downloaded into `tools/matter/codegen_helpers/zap` during make
- If you need to export the path to `ZAP_INSTALL_PATH` outside of make (for eg, launching ZAP GUI, building `chip-tool`, etc), you can add below lines to your `~/.bashrc` file for convenience

```bash
# Matter - export zap path
export ZAP_INSTALL_PATH="<zap-path>"
```
- You may also choose to append the zap folder path to `PATH`

```bash
# Matter - export zap path
export PATH="<zap-path>":$PATH
```

## Make CHIP library by gn and Make lib_main.a
### all-clusters-app

Expand Down
8 changes: 1 addition & 7 deletions component/common/application/matter/example/light/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,8 @@ endif
endif
@echo Toolchain unzip done!

.PHONY: check_zap
check_zap:
cd $(MATTER_TOOLDIR)/codegen_helpers/ && \
./check_zap.sh

.PHONY: light
light: toolchain check_zap
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
light: toolchain
mkdir -p $(CHIPDIR)/examples/lighting-app/ameba/build/chip/codegen/zap-generated && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/matter-idl.json --output-dir examples/lighting-app/ameba/build/chip/codegen/zap-generated examples/lighting-app/lighting-common/lighting-app.zap && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/app-templates.json --output-dir examples/lighting-app/ameba/build/chip/codegen/zap-generated examples/lighting-app/lighting-common/lighting-app.zap && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ CHIP_CXXFLAGS += $(INCLUDES)
all: GENERATE_NINJA

GENERATE_NINJA:
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
echo "INSTALL CHIP..." && \
echo $(BASEDIR) && \
mkdir -p $(OUTPUT_DIR) && \
Expand Down
20 changes: 5 additions & 15 deletions project/realtek_amebaz2_v0_example/GCC-RELEASE/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ endif
mkdir_codegen:
if [ ! -d "$(MATTER_TOOLDIR)/codegen_helpers/gen" ]; then mkdir "$(MATTER_TOOLDIR)/codegen_helpers/gen"; fi

.PHONY: check_zap
check_zap:
cd $(MATTER_TOOLDIR)/codegen_helpers/ && \
./check_zap.sh

.PHONY: is
is: toolchain
cp partition_default.json partition.json
Expand All @@ -59,8 +54,7 @@ clean:
@$(MAKE) -f application.is.mk clean

.PHONY: all_clusters
all_clusters: toolchain check_zap
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
all_clusters: toolchain
mkdir -p $(CHIPDIR)/examples/all-clusters-app/ameba/build/chip/codegen/zap-generated && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/matter-idl.json --output-dir examples/all-clusters-app/ameba/build/chip/codegen/zap-generated examples/all-clusters-app/all-clusters-common/all-clusters-app.zap && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/app-templates.json --output-dir examples/all-clusters-app/ameba/build/chip/codegen/zap-generated examples/all-clusters-app/all-clusters-common/all-clusters-app.zap && \
Expand All @@ -71,8 +65,7 @@ all_clusters: toolchain check_zap
$(MAKE) -f lib_chip_main.mk all

.PHONY: light
light: toolchain check_zap
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
light: toolchain
mkdir -p $(CHIPDIR)/examples/lighting-app/ameba/build/chip/codegen/zap-generated && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/matter-idl.json --output-dir examples/lighting-app/ameba/build/chip/codegen/zap-generated examples/lighting-app/lighting-common/lighting-app.zap && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/app-templates.json --output-dir examples/lighting-app/ameba/build/chip/codegen/zap-generated examples/lighting-app/lighting-common/lighting-app.zap && \
Expand All @@ -83,8 +76,7 @@ light: toolchain check_zap
$(MAKE) -f lib_chip_light_main.mk all

.PHONY: switch
switch: toolchain check_zap
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
switch: toolchain
mkdir -p $(CHIPDIR)/examples/light-switch-app/ameba/build/chip/codegen/zap-generated && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/matter-idl.json --output-dir examples/light-switch-app/ameba/build/chip/codegen/zap-generated examples/light-switch-app/light-switch-common/light-switch-app.zap && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/app-templates.json --output-dir examples/light-switch-app/ameba/build/chip/codegen/zap-generated examples/light-switch-app/light-switch-common/light-switch-app.zap && \
Expand All @@ -95,8 +87,7 @@ switch: toolchain check_zap
$(MAKE) -f lib_chip_switch_main.mk all

.PHONY: otar
otar: toolchain check_zap
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
otar: toolchain
mkdir -p $(CHIPDIR)/examples/ota-requestor-app/ameba/build/chip/codegen/zap-generated && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/matter-idl.json --output-dir examples/ota-requestor-app/ameba/build/chip/codegen/zap-generated examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/app-templates.json --output-dir examples/ota-requestor-app/ameba/build/chip/codegen/zap-generated examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap && \
Expand All @@ -107,8 +98,7 @@ otar: toolchain check_zap
$(MAKE) -f lib_chip_otar_main.mk all

.PHONY: chef
chef: toolchain check_zap
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
chef: toolchain
mkdir -p $(CHIPDIR)/examples/chef/ameba/build/chip/codegen/zap-generated && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/matter-idl.json --output-dir examples/chef/ameba/build/chip/codegen/zap-generated examples/chef/devices/$(SAMPLE_NAME).zap && \
python3 $(CHIPDIR)/scripts/tools/zap/generate.py --no-prettify-output --templates src/app/zap-templates/app-templates.json --output-dir examples/chef/ameba/build/chip/codegen/zap-generated examples/chef/devices/$(SAMPLE_NAME).zap && \
Expand Down
1 change: 0 additions & 1 deletion project/realtek_amebaz2_v0_example/GCC-RELEASE/lib_chip.mk
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ CHIP_CXXFLAGS += $(INCLUDES)
all: GENERATE_NINJA

GENERATE_NINJA:
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
echo "INSTALL CHIP..." && \
echo $(BASEDIR) && \
if [ ! d "$(OUTPUT_DIR")" ]; then mkdir -p "$(OUTPUT_DIR)"; fi && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ CHIP_CXXFLAGS += $(INCLUDES)
all: GENERATE_NINJA

GENERATE_NINJA:
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
echo "INSTALL CHIP..." && \
echo $(BASEDIR) && \
mkdir -p $(OUTPUT_DIR) && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ CHIP_CXXFLAGS += $(INCLUDES)
all: GENERATE_NINJA

GENERATE_NINJA:
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
echo "INSTALL CHIP..." && \
echo $(BASEDIR) && \
mkdir -p $(OUTPUT_DIR) && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ CHIP_CXXFLAGS += $(INCLUDES)
all: GENERATE_NINJA

GENERATE_NINJA:
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
echo "INSTALL CHIP..." && \
echo $(BASEDIR) && \
mkdir -p $(OUTPUT_DIR) && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ CHIP_CXXFLAGS += $(INCLUDES)
all: GENERATE_NINJA

GENERATE_NINJA:
export ZAP_INSTALL_PATH="$(MATTER_TOOLDIR)/codegen_helpers/zap" && \
echo "INSTALL CHIP..." && \
echo $(BASEDIR) && \
mkdir -p $(OUTPUT_DIR) && \
Expand Down
20 changes: 0 additions & 20 deletions tools/matter/codegen_helpers/check_zap.sh

This file was deleted.