Skip to content

Commit

Permalink
riscv: telink: add compile support for tl3218x .
Browse files Browse the repository at this point in the history
- fix retention ram.

Signed-off-by: Haiwen Xia <haiwen.xia@telink-semi.com>
  • Loading branch information
haiwentelink committed Jan 15, 2025
1 parent dedef1f commit 3b339bb
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ jobs:
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: telink
# - name: Update Zephyr to specific revision (for developers purpose)
# shell: bash
# run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py c05c461b1119782cc839cf436fa04ec5e1fb2c8c"
- name: Update Zephyr to specific revision (for developers purpose)
shell: bash
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py c932a121fa785e02a57c80b80a494ad75f728a29"
- name: CI Examples Telink
shell: bash
run: |
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
with:
gh-context: ${{ toJson(github) }}

# - name: Update Zephyr to specific revision (for developers purpose)
# run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py c05c461b1119782cc839cf436fa04ec5e1fb2c8c"
- name: Update Zephyr to specific revision (for developers purpose)
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py c932a121fa785e02a57c80b80a494ad75f728a29"

- name: Build example Telink (B92 retention) Air Quality Sensor App
# Run test for master and s07641069 PRs
Expand Down Expand Up @@ -190,6 +190,16 @@ jobs:
out/telink-tl7218x-light-ota-shell-factory-data/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example Telink (tl721x) Light Switch App with OTA (LZMA), Factory Data
# Run test for master and all PRs
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tl7218x_retention-light-switch-ota-compress-lzma-factory-data' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
telink tl7218x_retention light-switch-app-ota-compress-lzma-factory-data \
out/telink-tl7218x_retention-light-switch-ota-compress-lzma-factory-data/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: clean out build output (keep tools)
run: rm -rf ./out/telink*

Expand Down
12 changes: 12 additions & 0 deletions config/telink/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,18 @@ config PWM

endif

if BOARD_TL7218X_RETENTION || BOARD_TL3218X_RETENTION
config SOC_SERIES_RISCV_TELINK_TLX_NON_RETENTION_RAM_CODE
default n if PM

config TELINK_TLX_MATTER_RETENTION_LAYOUT
default y if PM

config PWM
default n

endif

# Board non-retention config
if BOARD_TLSR9118BDK40D || BOARD_TLSR9118BDK40D_V1 || \
BOARD_TLSR9528A || BOARD_TLSR9258A || BOARD_TLSR9518ADK80D || BOARD_TL3218X || BOARD_TL7218X
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 @@ -779,6 +779,7 @@ def BuildTelinkTarget():
TargetPart('tlsr9258a_retention', board=TelinkBoard.TLSR9258A_RETENTION),
TargetPart('tl3218x', board=TelinkBoard.TL3218X),
TargetPart('tl7218x', board=TelinkBoard.TL7218X),
TargetPart('tl7218x_retention', board=TelinkBoard.TL7218X_RETENTION),
])

target.AppendFixedTargets([
Expand Down
3 changes: 3 additions & 0 deletions scripts/build/builders/telink.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class TelinkBoard(Enum):
TLSR9258A_RETENTION = auto()
TL3218X = auto()
TL7218X = auto()
TL7218X_RETENTION = auto()

def GnArgName(self):
if self == TelinkBoard.TLRS9118BDK40D:
Expand All @@ -141,6 +142,8 @@ def GnArgName(self):
return 'tl3218x'
elif self == TelinkBoard.TL7218X:
return 'tl7218x'
elif self == TelinkBoard.TL7218X_RETENTION:
return 'tl7218x_retention'
else:
raise Exception('Unknown board type: %r' % self)

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 @@ nuttx-x64-light
qpg-qpg6105-{lock,light,shell,persistent-storage,light-switch,thermostat}[-updateimage]
stm32-stm32wb5mm-dk-light
tizen-arm-{all-clusters,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan][-coverage][-with-ui]
telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tlsr9258a,tlsr9258a_retention,tl3218x,tl7218x}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars][-usb][-compress-lzma][-thread-analyzer]
telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tlsr9258a,tlsr9258a_retention,tl3218x,tl7218x,tl7218x_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars][-usb][-compress-lzma][-thread-analyzer]
openiotsdk-{shell,lock}[-mbedtls][-psa]

0 comments on commit 3b339bb

Please sign in to comment.