From 42646898c702da26e7655630d14bbd6860aa3a7e Mon Sep 17 00:00:00 2001 From: mideayanghui Date: Fri, 28 Jul 2023 17:53:14 +0800 Subject: [PATCH] Add refrigerator example build script --- docs/examples/index.md | 8 ++++++++ scripts/build/build/targets.py | 2 ++ scripts/build/builders/asr.py | 5 +++++ scripts/build/builders/host.py | 6 ++++++ scripts/build/testdata/all_targets_linux_x64.txt | 4 ++-- 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/examples/index.md b/docs/examples/index.md index 3f16f71f69d024..a64b995fe6b8d3 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -200,6 +200,14 @@ pump-app/cc13x2x7_26x2x7/doc/programming* pump-controller-app/**/README pump-controller-app/cc13x2x7_26x2x7/doc/programming* ``` +## Refrigerator example + +```{toctree} +:glob: +:maxdepth: 1 + +refrigerator-app/**/README +``` ## Shell example diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 609400764e0c72..483f8a365b69d0 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -130,6 +130,7 @@ def BuildHostTarget(): TargetPart('address-resolve-tool', app=HostApp.ADDRESS_RESOLVE), TargetPart('contact-sensor', app=HostApp.CONTACT_SENSOR), TargetPart('dishwasher', app=HostApp.DISHWASHER), + TargetPart('refrigerator', app=HostApp.REFRIGERATOR), ] if (HostBoard.NATIVE.PlatformName() == 'darwin'): @@ -434,6 +435,7 @@ def BuildASRTarget(): TargetPart('thermostat', app=ASRApp.THERMOSTAT), TargetPart('ota-requestor', app=ASRApp.OTA_REQUESTOR), TargetPart('dishwasher', app=ASRApp.DISHWASHER), + TargetPart('refrigerator', app=ASRApp.REFRIGERATOR), ]) # modifiers diff --git a/scripts/build/builders/asr.py b/scripts/build/builders/asr.py index 98062b3bbc7c8b..d7351a1daec289 100644 --- a/scripts/build/builders/asr.py +++ b/scripts/build/builders/asr.py @@ -29,6 +29,7 @@ class ASRApp(Enum): THERMOSTAT = auto() OTA_REQUESTOR = auto() DISHWASHER = auto() + REFRIGERATOR = auto() def ExampleName(self): if self == ASRApp.ALL_CLUSTERS: @@ -51,6 +52,8 @@ def ExampleName(self): return 'ota-requestor-app' elif self == ASRApp.DISHWASHER: return 'dishwasher-app' + elif self == ASRApp.REFRIGERATOR: + return 'refrigerator-app' else: raise Exception('Unknown app type: %r' % self) @@ -75,6 +78,8 @@ def AppNamePrefix(self): return 'chip-asr-ota-requestor-example' elif self == ASRApp.DISHWASHER: return 'chip-asr-dishwasher-example' + elif self == ASRApp.REFRIGERATOR: + return 'chip-asr-refrigerator-example' else: raise Exception('Unknown app type: %r' % self) diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 84d8a47a9cbcd8..4666e2d8e0b97a 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -69,6 +69,7 @@ class HostApp(Enum): JAVA_MATTER_CONTROLLER = auto() CONTACT_SENSOR = auto() DISHWASHER = auto() + REFRIGERATOR = auto() def ExamplePath(self): if self == HostApp.ALL_CLUSTERS: @@ -115,6 +116,8 @@ def ExamplePath(self): return 'contact-sensor-app/linux' elif self == HostApp.DISHWASHER: return 'dishwasher-app/linux' + elif self == HostApp.REFRIGERATOR: + return 'refrigerator-app/linux' else: raise Exception('Unknown app type: %r' % self) @@ -197,6 +200,9 @@ def OutputNames(self): elif self == HostApp.DISHWASHER: yield 'dishwasher-app' yield 'dishwasher-app.map' + elif self == HostApp.REFRIGERATOR: + yield 'refrigerator-app' + yield 'refrigerator-app.map' else: raise Exception('Unknown app type: %r' % self) diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index 1ac764d6f1afb0..a4d27e6fb004bc 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -1,5 +1,5 @@ ameba-amebad-{all-clusters,all-clusters-minimal,light,light-switch,pigweed} -asr-{asr582x,asr595x,asr550x}-{all-clusters,all-clusters-minimal,lighting,light-switch,lock,bridge,temperature-measurement,thermostat,ota-requestor,dishwasher}[-ota][-shell][-no_logging][-factory][-rotating_id][-rio] +asr-{asr582x,asr595x,asr550x}-{all-clusters,all-clusters-minimal,lighting,light-switch,lock,bridge,temperature-measurement,thermostat,ota-requestor,dishwasher,refrigerator}[-ota][-shell][-no_logging][-factory][-rotating_id][-rio] android-{arm,arm64,x86,x64,androidstudio-arm,androidstudio-arm64,androidstudio-x86,androidstudio-x64}-{chip-tool,chip-test,tv-server,tv-casting-app,java-matter-controller,virtual-device-app}[-no-debug] bouffalolab-{bl602-iot-matter-v1,bl602-night-light,xt-zb6-devkit,bl706-night-light,bl706-eth,bl704l-dvk}-light[-shell][-115200][-rpc][-cdc][-resetcnt][-rotating_device_id] cc32xx-lock @@ -10,7 +10,7 @@ efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,b esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only] genio-lighting-app linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang] -linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui] +linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,refrigerator}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui] linux-x64-efr32-test-runner[-clang] imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release] infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage]