Skip to content

Commit

Permalink
Enable builds for m5stack for more apps as m5stack and devkitc are th…
Browse files Browse the repository at this point in the history
…e same MCU except screen support -i.e. defaults should work (#25527)

Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Feb 2, 2024
1 parent bc19cb7 commit 1852289
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def BuildEsp32Target():

# boards
target.AppendFixedTargets([
TargetPart('m5stack', board=Esp32Board.M5Stack).OnlyIfRe('-(all-clusters|ota-requestor)'),
TargetPart('m5stack', board=Esp32Board.M5Stack),
TargetPart('c3devkit', board=Esp32Board.C3DevKit),
TargetPart('devkitc', board=Esp32Board.DevKitC),
TargetPart('qemu', board=Esp32Board.QEMU).OnlyIfRe('-tests'),
Expand Down
21 changes: 14 additions & 7 deletions scripts/build/builders/esp32.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,19 @@ def FlashBundleName(self):
def IsCompatible(self, board: Esp32Board):
if board == Esp32Board.QEMU:
return self == Esp32App.TESTS
elif board == Esp32Board.M5Stack:
return (self == Esp32App.ALL_CLUSTERS or self == Esp32App.ALL_CLUSTERS_MINIMAL or
self == Esp32App.OTA_REQUESTOR or self == Esp32App.OTA_PROVIDER)
elif board == Esp32Board.C3DevKit:
return self == Esp32App.ALL_CLUSTERS or self == Esp32App.ALL_CLUSTERS_MINIMAL
else:
return (board == Esp32Board.DevKitC) and (self != Esp32App.TESTS)
return (board in {Esp32Board.M5Stack, Esp32Board.DevKitC}) and (self != Esp32App.TESTS)


def DefaultsFileName(board: Esp32Board, app: Esp32App, enable_rpcs: bool):
rpc_enabled_apps = [Esp32App.ALL_CLUSTERS,
rpc_enabled_apps = {Esp32App.ALL_CLUSTERS,
Esp32App.ALL_CLUSTERS_MINIMAL,
Esp32App.LIGHT,
Esp32App.OTA_REQUESTOR,
Esp32App.OTA_PROVIDER,
Esp32App.TEMPERATURE_MEASUREMENT]
Esp32App.TEMPERATURE_MEASUREMENT}
if app == Esp32App.TESTS:
return 'sdkconfig_qemu.defaults'
elif app not in rpc_enabled_apps:
Expand All @@ -124,7 +121,17 @@ def DefaultsFileName(board: Esp32Board, app: Esp32App, enable_rpcs: bool):
if board == Esp32Board.DevKitC:
return 'sdkconfig{}.defaults'.format(rpc)
elif board == Esp32Board.M5Stack:
return 'sdkconfig_m5stack{}.defaults'.format(rpc)
# a subset of apps have m5stack specific configurations. However others
# just compile for the same devices as aDevKitC
specific_apps = {
Esp32App.ALL_CLUSTERS,
Esp32App.ALL_CLUSTERS_MINIMAL,
Esp32App.OTA_REQUESTOR,
}
if app in specific_apps:
return 'sdkconfig_m5stack{}.defaults'.format(rpc)
else:
return 'sdkconfig{}.defaults'.format(rpc)
elif board == Esp32Board.C3DevKit:
return 'sdkconfig_c3devkit{}.defaults'.format(rpc)
else:
Expand Down

0 comments on commit 1852289

Please sign in to comment.