Skip to content

Commit

Permalink
[Telink] Add Build example for B91 Mars board (#30495)
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiiSalamakha authored and pull[bot] committed Dec 22, 2023
1 parent df4f330 commit 2373213
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,13 @@ jobs:
- name: clean out build output
run: rm -rf ./out

- name: Build example Telink (B92 retention) Temperature Measurement App
- name: Build example Telink (B91 Mars) Temperature Measurement App with OTA
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-temperature-measurement' build"
"./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-temperature-measurement-mars-ota' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
telink tlsr9528a_retention temperature-measurement-app \
out/telink-tlsr9528a_retention-temperature-measurement/zephyr/zephyr.elf \
telink tlsr9518adk80d temperature-measurement-app-mars-ota \
out/telink-tlsr9518adk80d-temperature-measurement-mars-ota/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: clean out build output
Expand Down
1 change: 1 addition & 0 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ def BuildTelinkTarget():
target.AppendModifier('rpc', enable_rpcs=True)
target.AppendModifier('factory-data', enable_factory_data=True)
target.AppendModifier('4mb', enable_4mb_flash=True)
target.AppendModifier('mars', mars_board_config=True)

return target

Expand Down
7 changes: 6 additions & 1 deletion scripts/build/builders/telink.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def __init__(self,
enable_shell: bool = False,
enable_rpcs: bool = False,
enable_factory_data: bool = False,
enable_4mb_flash: bool = False):
enable_4mb_flash: bool = False,
mars_board_config: bool = False):
super(TelinkBuilder, self).__init__(root, runner)
self.app = app
self.board = board
Expand All @@ -154,6 +155,7 @@ def __init__(self,
self.enable_rpcs = enable_rpcs
self.enable_factory_data = enable_factory_data
self.enable_4mb_flash = enable_4mb_flash
self.mars_board_config = mars_board_config

def get_cmd_prefixes(self):
if not self._runner.dry_run:
Expand Down Expand Up @@ -192,6 +194,9 @@ def generate(self):
if self.enable_4mb_flash:
flags.append("-DFLASH_SIZE=4m")

if self.mars_board_config:
flags.append("-DTLNK_MARS_BOARD=y")

if self.options.pregen_dir:
flags.append(f"-DCHIP_CODEGEN_PREGEN_DIR={shlex.quote(self.options.pregen_dir)}")

Expand Down
2 changes: 1 addition & 1 deletion scripts/build/testdata/all_targets_linux_x64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ nrf-native-posix-64-tests
qpg-qpg6105-{lock,light,shell,persistent-storage}[-updateimage]
stm32-stm32wb5mm-dk-light
tizen-arm-{all-clusters,all-clusters-minimal,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan][-with-ui]
telink-{tlsr9518adk80d,tlsr9528a,tlsr9528a_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,resource-monitoring,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb]
telink-{tlsr9518adk80d,tlsr9528a,tlsr9528a_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,resource-monitoring,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars]
openiotsdk-{shell,lock}[-mbedtls][-psa]

0 comments on commit 2373213

Please sign in to comment.