Skip to content

Commit 896398e

Browse files
committed
Initial commit
0 parents  commit 896398e

File tree

7 files changed

+140
-0
lines changed

7 files changed

+140
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "ot-ti"]
2+
path = ot-ti
3+
url = https://github.com/Koenkk/ot-ti.git

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# OpenThread-TexasInstruments-firmware
2+
3+
This repository contains OpenThread RCP firmwares for various Texas Instruments MCUs. The baudrate of the firmware is `460800`.
4+
5+
## Flashing
6+
7+
1. Download the firmware for your device from the [releases page](https://github.com/Koenkk/OpenThread-TexasInstruments-firmware/releases). Use the [adapters page](./docs/adapters.md) to figure out what firmware to use for your device.
8+
1. Flash the firmware; use e.g. the [SMLIGHT firmware updater](https://smlight.tech/flasher/#other_cc) which allows for easy flashing via the webbrowser (can be used to flash any adapter). Other ways of flashing can be found on the [Zigee2MQTT docs](https://www.zigbee2mqtt.io/guide/adapters/zstack.html#firmware-flashing-cc2652-cc1352).
9+
10+
## Example usage: Home Assistant OpenThread Border Router add-on
11+
12+
After having flashed the firmware with the instructions above:
13+
14+
1. Install the add-on ([docs](https://github.com/home-assistant/addons/blob/master/openthread_border_router/DOCS.md#installation))
15+
1. On the configuration page of the add-on, select the device and make sure the baudrate is set to `460800`.
16+
1. Start the add-on.
17+
18+
## Compiling
19+
20+
The firmware can be compiled on any Linux x86_64 machine with Docker installed, instructions:
21+
22+
23+
```bash
24+
# Setup repository
25+
git clone https://github.com/Koenkk/OpenThread-TexasInstruments-firmware.git
26+
cd OpenThread-TexasInstruments-firmware
27+
git submodule update --init --recursive
28+
29+
docker run -it --rm -v $(pwd):/data -w /data ubuntu:24.04 bash
30+
31+
# Bootstrap
32+
bash scripts/bootstrap.sh
33+
34+
# Build
35+
bash scripts/build.sh
36+
```
37+
38+
The firmwares can now be found in the `./dist` directory.

docs/adapters.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Adapter firmware compatibility
2+
3+
Use this page to figure out what firmware to use for your device.
4+
5+
- `CC2652R_ot_rcp_*.zip`
6+
- Electrolama zig-a-zig-ah! (zzh!)
7+
- Vision CC2652 dongle
8+
- Texas Instruments LAUNCHXL-CC26X2R1
9+
- `CC2652RB_ot_rcp_*.zip`
10+
- Slaesh's CC2652RB stick,
11+
- `CC1352P2_CC2652P_launchpad_ot_rcp_*.zip`
12+
- Tube's CC2652P2 USB Coordinator
13+
- ZigStar Stick v4
14+
- CircuitSetup's CC2652P2 USB Coordinator
15+
- SONOFF ZBDongle-P
16+
- Tube's Zigbee Gateways (CC2652P2 variant)
17+
- cyijun OpenZ3Gateway
18+
- XGG 52PZ2MGateway
19+
- ZigStar LAN Coordinator
20+
- ZigStar PoE Coordinator
21+
- SMLIGHT SLZB-06
22+
- cod.m Zigbee CC2652P RPi Module
23+
- ZigStar ZigiHAT PoE
24+
- Texas Instruments LAUNCHXL-CC1352P-2
25+
- `CC1352P2_CC2652P_other_ot_rcp_*.zip`
26+
- Egony Stick V4
27+
- SMLIGHT SLZB-02
28+
- SMLIGHT SLZB-05
29+
- Gio-dot Z-Bee Duo with CC2652P
30+
- `CC1352P7_ot_rcp_*.zip`
31+
- SMLIGHT SLZB-07p7
32+
- ZigStar UZG-01
33+
- SMLIGHT SLZB-06p7
34+
- cod.m Zigbee Coordinator CC2652P7
35+
- Texas Instruments LP-CC1352P7
36+
- `CC2652R7_ot_rcp_*.zip`
37+
- Texas Instruments LP-CC2652R7

ot-ti

Submodule ot-ti added at 1c2d087

scripts/bootstrap.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash -e
2+
3+
# Install dependencies
4+
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install git wget sudo tzdata make zip -y
5+
6+
# Bootstrap ot-ti
7+
cd ot-ti
8+
./script/bootstrap
9+
mkdir -p $HOME/ti
10+
ln -s /opt/ti/sysconfig_1.18.1 $HOME/ti/sysconfig_1.18.1
11+
12+
# Install ticlang (required for tiarmobjcopy)
13+
cd /tmp
14+
wget https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-ayxs93eZNN/4.0.1.LTS/ti_cgt_armllvm_4.0.1.LTS_linux-x64_installer.bin
15+
chmod +x ti_cgt_armllvm_4.0.1.LTS_linux-x64_installer.bin
16+
./ti_cgt_armllvm_4.0.1.LTS_linux-x64_installer.bin --mode unattended --prefix /opt/ti

scripts/build.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash -e
2+
3+
[ -z "$1" ] && echo "First argument is not set, set to the version, e.g. 2025.2.1" && exit 1
4+
version=$1
5+
6+
echo "Remove dist dir"
7+
dist_dir=$(realpath dist)
8+
rm -rf $dist_dir
9+
mkdir $dist_dir
10+
11+
echo "Clean before build"
12+
cd ot-ti
13+
git clean -dxf && \
14+
git restore . && \
15+
git submodule foreach 'git clean -dxf' && \
16+
git submodule foreach --recursive 'git restore .'
17+
18+
items=(
19+
# target name CC1352P_2_OTHER
20+
"LP_CC2652RB,CC2652RB,false"
21+
"CC1352P_2_LAUNCHXL,CC1352P2_CC2652P_launchpad,false"
22+
"CC1352P_2_LAUNCHXL,CC1352P2_CC2652P_other,true"
23+
"LP_CC1352P7_4,CC1352P7,false"
24+
"CC26X2R1_LAUNCHXL,CC2652R,false"
25+
"LP_CC2652R7,CC2652R7,false"
26+
)
27+
28+
for target in "${items[@]}"; do
29+
IFS=',' read -r -a values <<< "$target"
30+
target="${values[0]}"
31+
name="${values[1]}"
32+
CC1352P_2_OTHER="${values[2]}"
33+
34+
echo "Compiling: target=$target name=$name CC1352P_2_OTHER=$CC1352P_2_OTHER"
35+
file_name="${name}_ot_rcp_${version//./_}"
36+
CC1352P_2_OTHER="$CC1352P_2_OTHER" FW_VERSION="$version" ./script/build $target
37+
/opt/ti/ti-cgt-armllvm_4.0.1.LTS/bin/tiarmobjcopy build/bin/ot-rcp.out \
38+
--output-target ihex build/bin/$file_name.hex
39+
pushd build/bin
40+
zip $dist_dir/$file_name.zip $file_name.hex
41+
popd
42+
done
43+
44+
echo "Done!"

0 commit comments

Comments
 (0)