Skip to content

Commit 3f0a220

Browse files
committed
[Telink] Add tl7218_retention target
1 parent fd0ff22 commit 3f0a220

File tree

7 files changed

+39
-12
lines changed

7 files changed

+39
-12
lines changed

.github/workflows/chef.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
platform: telink
123123
- name: Update Zephyr to specific revision (for developers purpose)
124124
shell: bash
125-
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py a7da81c749aa3fba2e97089d62cd5bf04c7b4680"
125+
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 10c1c1cbee585531c7c1e09cd855b3d63b697a9e"
126126
- name: CI Examples Telink
127127
shell: bash
128128
run: |

.github/workflows/examples-telink.yaml

+12-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
gh-context: ${{ toJson(github) }}
7272

7373
- name: Update Zephyr to specific revision (for developers purpose)
74-
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py a7da81c749aa3fba2e97089d62cd5bf04c7b4680"
74+
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 10c1c1cbee585531c7c1e09cd855b3d63b697a9e"
7575

7676
- name: Build example Telink (B92 retention) Air Quality Sensor App
7777
# Run test for master and s07641069 PRs
@@ -203,6 +203,17 @@ jobs:
203203
- name: clean out build output (keep tools)
204204
run: rm -rf ./out/telink*
205205

206+
- name: Build example Telink (TL7218 retention) Light Switch App with OTA (LZMA), Factory Data
207+
# Run test for master and s07641069 PRs
208+
if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip'
209+
run: |
210+
./scripts/run_in_build_env.sh \
211+
"./scripts/build/build_examples.py --target 'telink-tl7218_retention-light-switch-ota-compress-lzma-factory-data' build"
212+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
213+
telink tl7218_retention light-switch-app-ota-compress-lzma-factory-data \
214+
out/telink-tl7218_retention-light-switch-ota-compress-lzma-factory-data/zephyr/zephyr.elf \
215+
/tmp/bloat_reports/
216+
206217
- name: Build example Telink (B92) Light Switch App with OTA (LZMA), Shell, Factory Data, 4Mb flash
207218
# Run test for master and all PRs
208219
run: |

config/telink/chip-module/Kconfig.defaults

+12
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,18 @@ config PWM
207207

208208
endif
209209

210+
if BOARD_TL7218_RETENTION || BOARD_TL3218_RETENTION
211+
config SOC_SERIES_RISCV_TELINK_TLX_NON_RETENTION_RAM_CODE
212+
default n if PM
213+
214+
config TELINK_TLX_MATTER_RETENTION_LAYOUT
215+
default y if PM
216+
217+
config PWM
218+
default n
219+
220+
endif
221+
210222
# Board non-retention config
211223
if BOARD_TLSR9118BDK40D || BOARD_TLSR9118BDK40D_V1 || \
212224
BOARD_TLSR9528A || BOARD_TLSR9258A || BOARD_TLSR9518ADK80D || BOARD_TL3218 || BOARD_TL7218

scripts/build/build/targets.py

+1
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,7 @@ def BuildTelinkTarget():
779779
TargetPart('tlsr9258a_retention', board=TelinkBoard.TLSR9258A_RETENTION),
780780
TargetPart('tl3218', board=TelinkBoard.TL3218),
781781
TargetPart('tl7218', board=TelinkBoard.TL7218),
782+
TargetPart('tl7218_retention', board=TelinkBoard.TL7218_RETENTION),
782783
])
783784

784785
target.AppendFixedTargets([

scripts/build/builders/telink.py

+3
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ class TelinkBoard(Enum):
123123
TLSR9258A_RETENTION = auto()
124124
TL3218 = auto()
125125
TL7218 = auto()
126+
TL7218_RETENTION = auto()
126127

127128
def GnArgName(self):
128129
if self == TelinkBoard.TLRS9118BDK40D:
@@ -141,6 +142,8 @@ def GnArgName(self):
141142
return 'tl3218'
142143
elif self == TelinkBoard.TL7218:
143144
return 'tl7218'
145+
elif self == TelinkBoard.TL7218_RETENTION:
146+
return 'tl7218_retention'
144147
else:
145148
raise Exception('Unknown board type: %r' % self)
146149

scripts/build/testdata/all_targets_linux_x64.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ nuttx-x64-light
2222
qpg-qpg6105-{lock,light,shell,persistent-storage,light-switch,thermostat}[-updateimage]
2323
stm32-stm32wb5mm-dk-light
2424
tizen-arm-{all-clusters,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan][-coverage][-with-ui]
25-
telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tlsr9258a,tlsr9258a_retention,tl3218,tl7218}-{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]
25+
telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tlsr9258a,tlsr9258a_retention,tl3218,tl7218,tl7218_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]
2626
openiotsdk-{shell,lock}[-mbedtls][-psa]

src/platform/telink/tl7218_2m_flash.overlay

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@
99

1010
boot_partition: partition@0 {
1111
label = "mcuboot";
12-
reg = <0x00000000 0xd000>;
12+
reg = <0x00000000 0xf000>;
1313
};
14-
slot0_partition: partition@d000 {
14+
slot0_partition: partition@f000 {
1515
label = "image-0";
16-
reg = <0xd000 0xf2000>;
16+
reg = <0xf000 0xf1000>;
1717
};
18-
factory_partition: partition@ff000 {
18+
factory_partition: partition@100000 {
1919
label = "factory-data";
20-
reg = <0xff000 0x1000>;
20+
reg = <0x100000 0x1000>;
2121
};
22-
storage_partition: partition@0x100000 {
22+
storage_partition: partition@101000 {
2323
label = "storage";
24-
reg = <0x100000 0xc000>;
24+
reg = <0x101000 0xc000>;
2525
};
26-
slot1_partition: partition@10c000 {
26+
slot1_partition: partition@10d000 {
2727
label = "image-1";
28-
reg = <0x10c000 0xf2000>;
28+
reg = <0x10d000 0xf1000>;
2929
};
3030
vendor_partition: partition@1fe000 {
3131
label = "vendor-data";

0 commit comments

Comments
 (0)