Skip to content

Commit

Permalink
[Telink] Add Build example for B91 Mars board
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiiSalamakha committed Nov 15, 2023
1 parent 4460db1 commit f6a93a2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 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

0 comments on commit f6a93a2

Please sign in to comment.