Skip to content

Commit

Permalink
[Telink] Add Tercel A1 (tl721x) support
Browse files Browse the repository at this point in the history
  • Loading branch information
s07641069 committed Dec 10, 2024
1 parent 8606290 commit 3788949
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,19 @@ jobs:
- name: clean out build output (keep tools)
run: rm -rf ./out/telink*

- name: Build example Telink (tl721x) Lighting App with OTA, Shell, Factory Data
# Run test for master and all PRs
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tl7218x-light-ota-shell-factory-data' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
telink tl7218x light-app-ota-shell-factory-data \
out/telink-tl7218x-light-ota-shell-factory-data/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: clean out build output (keep tools)
run: rm -rf ./out/telink*

- name: Build example Telink (B92) Light Switch App with OTA (LZMA), Shell, Factory Data
# Run test for master and all PRs
run: |
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 @@ -771,6 +771,7 @@ def BuildTelinkTarget():
TargetPart('tlsr9258a', board=TelinkBoard.TLSR9258A),
TargetPart('tlsr9258a_retention', board=TelinkBoard.TLSR9258A_RETENTION),
TargetPart('tl3218x', board=TelinkBoard.TL3218X),
TargetPart('tl7218x', board=TelinkBoard.TL7218X),
])

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 @@ -122,6 +122,7 @@ class TelinkBoard(Enum):
TLSR9258A = auto()
TLSR9258A_RETENTION = auto()
TL3218X = auto()
TL7218X = auto()

def GnArgName(self):
if self == TelinkBoard.TLRS9118BDK40D:
Expand All @@ -138,6 +139,8 @@ def GnArgName(self):
return 'tlsr9258a_retention'
elif self == TelinkBoard.TL3218X:
return 'tl3218x'
elif self == TelinkBoard.TL7218X:
return 'tl7218x'
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}-{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}-{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]
39 changes: 39 additions & 0 deletions src/platform/telink/tl7218x_2m_flash.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
&flash {
reg = <0x20000000 0x200000>;

/delete-node/ partitions;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x13000>;
};
slot0_partition: partition@13000 {
label = "image-0";
reg = <0x13000 0xef000>;
};
factory_partition: partition@102000 {
label = "factory-data";
reg = <0x102000 0x800>;
};
factory_rfu_partition: partition@102800 {
label = "factory-data-rfu";
reg = <0x102800 0x800>;
};
storage_partition: partition@103000 {
label = "storage";
reg = <0x103000 0xc000>;
};
slot1_partition: partition@10f000 {
label = "image-1";
reg = <0x10f000 0xef000>;
};
vendor_partition: partition@1fe000 {
label = "vendor-data";
reg = <0x1fe000 0x2000>;
};
};
};

0 comments on commit 3788949

Please sign in to comment.