From f6a93a2f39c9689974d008e03acc9e71a9f96897 Mon Sep 17 00:00:00 2001 From: Serhii Salamakha Date: Wed, 15 Nov 2023 18:20:10 +0200 Subject: [PATCH] [Telink] Add Build example for B91 Mars board --- .github/workflows/examples-telink.yaml | 8 ++++---- scripts/build/build/targets.py | 1 + scripts/build/builders/telink.py | 7 ++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 58b9e3fa4deafa..524f1a47f5d1ac 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -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 diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index fd6132e9519dd8..d056281b6a539b 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -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 diff --git a/scripts/build/builders/telink.py b/scripts/build/builders/telink.py index 1dc75cfacc9c42..72ba965c69b1f5 100644 --- a/scripts/build/builders/telink.py +++ b/scripts/build/builders/telink.py @@ -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 @@ -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: @@ -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)}")