Skip to content

Commit

Permalink
Added builder for energy-management-app for Linux (host) and ESP32
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesharrow committed Jan 10, 2024
1 parent caea3ec commit 5e68670
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def BuildHostTarget():
TargetPart('lit-icd', app=HostApp.LIT_ICD),
TargetPart('air-quality-sensor', app=HostApp.AIR_QUALITY_SENSOR),
TargetPart('network-manager', app=HostApp.NETWORK_MANAGER),
TargetPart('energy-management', app=HostApp.ENERGY_MANAGEMENT),
]

if (HostBoard.NATIVE.PlatformName() == 'darwin'):
Expand Down Expand Up @@ -199,6 +200,7 @@ def BuildEsp32Target():
target.AppendFixedTargets([
TargetPart('all-clusters', app=Esp32App.ALL_CLUSTERS),
TargetPart('all-clusters-minimal', app=Esp32App.ALL_CLUSTERS_MINIMAL),
TargetPart('energy-management', app=Esp32App.ENERGY_MANAGEMENT),
TargetPart('ota-provider', app=Esp32App.OTA_PROVIDER),
TargetPart('ota-requestor', app=Esp32App.OTA_REQUESTOR),
TargetPart('shell', app=Esp32App.SHELL),
Expand Down
5 changes: 5 additions & 0 deletions scripts/build/builders/esp32.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Esp32Board(Enum):
class Esp32App(Enum):
ALL_CLUSTERS = auto()
ALL_CLUSTERS_MINIMAL = auto()
ENERGY_MANAGEMENT = auto()
LIGHT = auto()
LOCK = auto()
SHELL = auto()
Expand All @@ -45,6 +46,8 @@ def ExamplePath(self):
return 'examples/all-clusters-app'
elif self == Esp32App.ALL_CLUSTERS_MINIMAL:
return 'examples/all-clusters-minimal-app'
elif self == Esp32App.ENERGY_MANAGEMENT:
return 'examples/energy-management-app'
elif self == Esp32App.LIGHT:
return 'examples/lighting-app'
elif self == Esp32App.LOCK:
Expand All @@ -70,6 +73,8 @@ def AppNamePrefix(self):
return 'chip-all-clusters-app'
elif self == Esp32App.ALL_CLUSTERS_MINIMAL:
return 'chip-all-clusters-minimal-app'
elif self == Esp32App.ENERGY_MANAGEMENT:
return 'chip-energy-management-app'
elif self == Esp32App.LIGHT:
return 'chip-lighting-app'
elif self == Esp32App.LOCK:
Expand Down
6 changes: 6 additions & 0 deletions scripts/build/builders/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class HostApp(Enum):
LIT_ICD = auto()
AIR_QUALITY_SENSOR = auto()
NETWORK_MANAGER = auto()
ENERGY_MANAGEMENT = auto()

def ExamplePath(self):
if self == HostApp.ALL_CLUSTERS:
Expand Down Expand Up @@ -139,6 +140,8 @@ def ExamplePath(self):
return 'air-quality-sensor-app/linux'
elif self == HostApp.NETWORK_MANAGER:
return 'network-manager-app/linux'
elif self == HostApp.ENERGY_MANAGEMENT:
return 'energy-management-app/linux'
else:
raise Exception('Unknown app type: %r' % self)

Expand Down Expand Up @@ -239,6 +242,9 @@ def OutputNames(self):
elif self == HostApp.LIT_ICD:
yield 'lit-icd-app'
yield 'lit-icd-app.map'
elif self == HostApp.ENERGY_MANAGEMENT:
yield 'chip-energy-management-app'
yield 'chip-energy-management-app.map'
else:
raise Exception('Unknown app type: %r' % self)

Expand Down

0 comments on commit 5e68670

Please sign in to comment.