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

Add VScode tasks to build and flash efr32 apps with selected boards. #12478

Merged
merged 7 commits into from
Dec 3, 2021
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
46 changes: 46 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,17 @@
"${workspaceFolder}/src/test_driver/mbed/unit_tests/build"
]
}
},
{
"label": "Flash EFR32 board",
"type": "shell",
"command": "python3",
"args": [
"${workspaceFolder}/out/${input:exampleTarget}/chip-efr32-*.flash.py"
],
"problemMatcher": {
"base": "$gcc"
}
}
],
"inputs": [
Expand Down Expand Up @@ -229,10 +240,45 @@
"android-x64-chip-tool",
"android-x86-chip-tool",
"efr32-brd4161a-light",
"efr32-brd4163a-light",
"efr32-brd4164a-light",
"efr32-brd4166a-light",
"efr32-brd4170a-light",
"efr32-brd4186a-light",
"efr32-brd4187a-light",
"efr32-brd4304a-light",
"efr32-brd4161a-light-rpc",
"efr32-brd4163a-light-rpc",
"efr32-brd4164a-light-rpc",
"efr32-brd4166a-light-rpc",
"efr32-brd4170a-light-rpc",
"efr32-brd4186a-light-rpc",
"efr32-brd4187a-light-rpc",
"efr32-brd4304a-light-rpc",
"efr32-brd4161a-lock",
"efr32-brd4163a-lock",
"efr32-brd4164a-lock",
"efr32-brd4166a-lock",
"efr32-brd4170a-lock",
"efr32-brd4186a-lock",
"efr32-brd4187a-lock",
"efr32-brd4304a-lock",
"efr32-brd4161a-unit-test",
"efr32-brd4163a-unit-test",
"efr32-brd4164a-unit-test",
"efr32-brd4166a-unit-test",
"efr32-brd4170a-unit-test",
"efr32-brd4186a-unit-test",
"efr32-brd4187a-unit-test",
"efr32-brd4304a-unit-test",
"efr32-brd4161a-window-covering",
"efr32-brd4163a-window-covering",
"efr32-brd4164a-window-covering",
"efr32-brd4166a-window-covering",
"efr32-brd4170a-window-covering",
"efr32-brd4186a-window-covering",
"efr32-brd4187a-window-covering",
"efr32-brd4304a-window-covering",
"esp32-c3devkit-all-clusters",
"esp32-devkitc-all-clusters",
"esp32-devkitc-all-clusters-ipv6only",
Expand Down
40 changes: 29 additions & 11 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,38 @@ def Esp32Targets():


def Efr32Targets():
efr_target = Target('efr32-brd4161a', Efr32Builder,
board=Efr32Board.BRD4161A)
efr_target = Target('efr32', Efr32Builder)

board_targets = [
efr_target.Extend('brd4161a', board=Efr32Board.BRD4161A),
efr_target.Extend('brd4163a', board=Efr32Board.BRD4163A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4164a', board=Efr32Board.BRD4164A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4166a', board=Efr32Board.BRD4166A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4170a', board=Efr32Board.BRD4170A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4186a', board=Efr32Board.BRD4186A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4187a', board=Efr32Board.BRD4187A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4304a', board=Efr32Board.BRD4304A).GlobBlacklist(
'only user requested')
]

yield efr_target.Extend('window-covering', app=Efr32App.WINDOW_COVERING)
yield efr_target.Extend('unit-test', app=Efr32App.UNIT_TEST)
for board_target in board_targets:
yield board_target.Extend('window-covering', app=Efr32App.WINDOW_COVERING)
yield board_target.Extend('unit-test', app=Efr32App.UNIT_TEST)

rpc_aware_targets = [
efr_target.Extend('light', app=Efr32App.LIGHT),
efr_target.Extend('lock', app=Efr32App.LOCK)
]
rpc_aware_targets = [
board_target.Extend('light', app=Efr32App.LIGHT),
board_target.Extend('lock', app=Efr32App.LOCK)
]

for target in rpc_aware_targets:
yield target
yield target.Extend('rpc', enable_rpcs=True)
for target in rpc_aware_targets:
yield target
yield target.Extend('rpc', enable_rpcs=True)


def NrfTargets():
Expand Down
23 changes: 23 additions & 0 deletions scripts/build/builders/efr32.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,33 @@ def BuildRoot(self, root):

class Efr32Board(Enum):
BRD4161A = 1
BRD4163A = 2
BRD4164A = 3
BRD4166A = 4
BRD4170A = 5
BRD4186A = 6
BRD4187A = 7
BRD4304A = 8

def GnArgName(self):
if self == Efr32Board.BRD4161A:
return 'BRD4161A'
elif self == Efr32Board.BRD4163A:
return 'BRD4163A'
elif self == Efr32Board.BRD4164A:
return 'BRD4164A'
elif self == Efr32Board.BRD4166A:
return 'BRD4166A'
elif self == Efr32Board.BRD4170A:
return 'BRD4170A'
elif self == Efr32Board.BRD4186A:
return 'BRD4186A'
elif self == Efr32Board.BRD4187A:
return 'BRD4187A'
elif self == Efr32Board.BRD4304A:
return 'BRD4304A'
else:
raise Exception('Unknown board #: %r' % self)


class Efr32Builder(GnBuilder):
Expand Down
42 changes: 42 additions & 0 deletions scripts/build/testdata/all_targets_except_host.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,48 @@ efr32-brd4161a-lock
efr32-brd4161a-lock-rpc
efr32-brd4161a-unit-test
efr32-brd4161a-window-covering
efr32-brd4163a-light (NOGLOB: only user requested)
efr32-brd4163a-light-rpc (NOGLOB: only user requested)
efr32-brd4163a-lock (NOGLOB: only user requested)
efr32-brd4163a-lock-rpc (NOGLOB: only user requested)
efr32-brd4163a-unit-test (NOGLOB: only user requested)
efr32-brd4163a-window-covering (NOGLOB: only user requested)
efr32-brd4164a-light (NOGLOB: only user requested)
efr32-brd4164a-light-rpc (NOGLOB: only user requested)
efr32-brd4164a-lock (NOGLOB: only user requested)
efr32-brd4164a-lock-rpc (NOGLOB: only user requested)
efr32-brd4164a-unit-test (NOGLOB: only user requested)
efr32-brd4164a-window-covering (NOGLOB: only user requested)
efr32-brd4166a-light (NOGLOB: only user requested)
efr32-brd4166a-light-rpc (NOGLOB: only user requested)
efr32-brd4166a-lock (NOGLOB: only user requested)
efr32-brd4166a-lock-rpc (NOGLOB: only user requested)
efr32-brd4166a-unit-test (NOGLOB: only user requested)
efr32-brd4166a-window-covering (NOGLOB: only user requested)
efr32-brd4170a-light (NOGLOB: only user requested)
efr32-brd4170a-light-rpc (NOGLOB: only user requested)
efr32-brd4170a-lock (NOGLOB: only user requested)
efr32-brd4170a-lock-rpc (NOGLOB: only user requested)
efr32-brd4170a-unit-test (NOGLOB: only user requested)
efr32-brd4170a-window-covering (NOGLOB: only user requested)
efr32-brd4186a-light (NOGLOB: only user requested)
efr32-brd4186a-light-rpc (NOGLOB: only user requested)
efr32-brd4186a-lock (NOGLOB: only user requested)
efr32-brd4186a-lock-rpc (NOGLOB: only user requested)
efr32-brd4186a-unit-test (NOGLOB: only user requested)
efr32-brd4186a-window-covering (NOGLOB: only user requested)
efr32-brd4187a-light (NOGLOB: only user requested)
efr32-brd4187a-light-rpc (NOGLOB: only user requested)
efr32-brd4187a-lock (NOGLOB: only user requested)
efr32-brd4187a-lock-rpc (NOGLOB: only user requested)
efr32-brd4187a-unit-test (NOGLOB: only user requested)
efr32-brd4187a-window-covering (NOGLOB: only user requested)
efr32-brd4304a-light (NOGLOB: only user requested)
efr32-brd4304a-light-rpc (NOGLOB: only user requested)
efr32-brd4304a-lock (NOGLOB: only user requested)
efr32-brd4304a-lock-rpc (NOGLOB: only user requested)
efr32-brd4304a-unit-test (NOGLOB: only user requested)
efr32-brd4304a-window-covering (NOGLOB: only user requested)
esp32-c3devkit-all-clusters
esp32-devkitc-all-clusters
esp32-devkitc-all-clusters-ipv6only
Expand Down
Loading