Skip to content

Commit

Permalink
Reset to nabucasa, with reconfigured manifests. (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerivec authored Oct 29, 2024
1 parent 5055f0d commit 5db311f
Show file tree
Hide file tree
Showing 51 changed files with 5,731 additions and 588 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
name: Run pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install pre-commit
run: |
pip install pre-commit
Expand All @@ -37,9 +37,9 @@ jobs:
permissions:
packages: write
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4
- name: Log in to the GitHub container registry
uses: docker/login-action@v3.1.0
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
Expand Down Expand Up @@ -85,10 +85,10 @@ jobs:
echo "image_name=$image_name" >> $GITHUB_OUTPUT
echo "container_name=${{ env.REGISTRY }}/$image_name:$tag_name" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.3.0
uses: docker/setup-buildx-action@v3
if: steps.read-repo-info.outputs.build_image == 'true'
- name: Build and Push
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6
if: steps.read-repo-info.outputs.build_image == 'true'
with:
context: .
Expand All @@ -109,7 +109,7 @@ jobs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4
- id: set-matrix
run: |
echo "matrix=$(find manifests -type f \( -name "*.yaml" -o -name "*.yml" \) -print | sort | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
Expand All @@ -125,7 +125,7 @@ jobs:
matrix:
manifest: ${{ fromJson(needs.list-manifests.outputs.matrix) }}
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4

- name: Install SDK extensions
run: |
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
apt-get install -y nodejs
- name: Upload artifact
uses: actions/upload-artifact@v4.3.3
uses: actions/upload-artifact@v4
with:
name: firmware-build-${{ steps.build-firmware.outputs.output_basename }}
path: outputs/*
Expand All @@ -204,6 +204,6 @@ jobs:
pattern: firmware-build-*

- name: Upload artifacts
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: artifacts/*.gbl
17 changes: 5 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN \

ENV PATH="$PATH:/opt/slc_cli"

# GCC Embedded Toolchain 12.2.rel1 (for Gecko SDK 4.4.0+)
# GCC Embedded Toolchain 12.2.rel1 (for Simplicity SDK)
RUN \
curl -O https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz \
&& tar -C /opt -xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz \
Expand All @@ -51,18 +51,11 @@ RUN \
&& unzip -q -d simplicity_sdk_2024.6.2 simplicity_sdk_2024.6.2.zip \
&& rm simplicity_sdk_2024.6.2.zip

# Gecko SDK 4.4.4
# ZCL Advanced Platform (ZAP) v2024.10.24
RUN \
curl -o gecko_sdk_4.4.4.zip -L https://github.com/SiliconLabs/gecko_sdk/releases/download/v4.4.4/gecko-sdk.zip \
&& unzip -q -d gecko_sdk_4.4.4 gecko_sdk_4.4.4.zip \
&& rm gecko_sdk_4.4.4.zip

# ZCL Advanced Platform (ZAP) v2024.09.27
RUN \
curl -o zap_2024.09.27.zip -L https://github.com/project-chip/zap/releases/download/v2024.09.27/zap-linux-x64.zip \
&& unzip -q -d /opt/zap zap_2024.09.27.zip \
&& rm zap_2024.09.27.zip

curl -o zap_2024.10.24.zip -L https://github.com/project-chip/zap/releases/download/v2024.10.24/zap-linux-x64.zip \
&& unzip -q -d /opt/zap zap_2024.10.24.zip \
&& rm zap_2024.10.24.zip
ENV STUDIO_ADAPTER_PACK_PATH="/opt/zap"

ARG USERNAME=builder
Expand Down
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ZBT-1/SkyConnect and the Home Assistant Yellow's IEEE 802.15.4 radio. The firmwa
manifests are entirely generic, however, and are intended to be written easily for any
Silicon Labs EFR32 device.

It uses the Silicon Labs Gecko SDK and proprietary Silicon Labs tools such as the
Silicon Labs Configurator (slc) and the Simplicity Commander standalone utility.
It uses the Silicon Labs Gecko/Simplicity SDK and proprietary Silicon Labs tools such as
the Silicon Labs Configurator (slc) and the Simplicity Commander standalone utility.

## Background
The project templates in this repository are configured and built for specific boards
Expand All @@ -14,34 +14,32 @@ manifest file configures the Zigbee firmware for the SkyConnect/Connect ZBT-1.

## Setting up Simplicity Studio (for development)
If you are going to be developing using Simplicity Studio, note that each project can
potentially use a different Gecko SDK release. It is recommended to forego the typical
potentially use a different Simplicity SDK release. It is recommended to forego the typical
Simplicity Studio SDK management workflow and manually manage SDKs:

1. Clone a specific version of the Gecko SDK:
1. Clone a specific version of the Simplicity SDK:
```bash
# For macOS
mkdir ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2
cd ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2
mkdir ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.2
cd ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.2

git clone -b v4.4.2 https://github.com/SiliconLabs/gecko_sdk .
git clone -b v2024.6.2 https://github.com/SiliconLabs/simplicity_sdk .
git checkout -b branch_tag
```

2. Open preferences, navigate to **Simplicity Studio > SDKs**, click the `Add SDK...` button, and browse to the above location.
3. Once the SDK is added, select its entry and click `Add Extension...`.
4. In this repo, add the extensions under `gecko_sdk_extensions`.

Repeat this process for every necessary SDK version.

> [!TIP]
> If you have build issues after switching commits, make sure to delete any
> `gecko_sdk_*` and `template` folders from the Simplicity working tree.
> `simplicity_sdk_*`, `gecko_sdk_*`, and `template` folders from the project working tree.
## Building with a firmware manifest (for building device firmware)
Command line building requires:
- [`slc-cli`](https://docs.silabs.com/simplicity-studio-5-users-guide/latest/ss-5-users-guide-tools-slc-cli/02-installation)
- [Simplicity Commander](https://www.silabs.com/developers/mcu-programming-options) (`commander`)
- The exact Gecko SDK version required by the project. Note that this doesn't have to be a Git working tree, you can use [a GitHub release](https://github.com/SiliconLabs/gecko_sdk/releases).
- The exact Simplicity SDK version required by the project. Note that this doesn't have to be a Git working tree, you can use [a GitHub release](https://github.com/SiliconLabs/gecko_sdk/releases).
- A compatible toolchain. Take a look at the `Dockerfile` for the necessary toolchains.

> [!TIP]
Expand All @@ -57,8 +55,8 @@ Command line building requires:
SDK extensions for every SDK you plan to use:

```bash
slc signature trust --sdk ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2
slc signature trust --sdk ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2 --extension-path ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2/extension/nc_efr32_watchdog_extension
slc signature trust --sdk ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.2
slc signature trust --sdk ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.2 --extension-path ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.2/extension/nc_efr32_watchdog_extension
```

`tools/build_project.py` is the main entry point for building firmwares. Provide paths
Expand All @@ -73,9 +71,9 @@ tool will automatically determine which SDK and toolchain to use.
pip install ruamel.yaml # Only dependency

python tools/build_project.py \
# The following SDK and toolchain flags can be omitted on macOS
--sdk ~/SimplicityStudio/SDKs/gecko_sdk_4.4.0 \
--sdk ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2 \
# The following SDK and toolchain flags can be omitted on macOS, they are all autodetected
--sdk ~/SimplicityStudio/SDKs/gecko_sdk_4.4.4 \
--sdk ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.0 \
--toolchain '/Applications/Simplicity Studio.app/Contents/Eclipse/developer/toolchains/gnu_arm/10.3_2021.10' \
--toolchain '/Applications/Simplicity Studio.app/Contents/Eclipse/developer/toolchains/gnu_arm/12.2.rel1_2023.7' \

Expand Down
33 changes: 33 additions & 0 deletions manifests/aeotec/aeotec_zga008_openthread_rcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: ZGA008 OpenThread RCP
device: EFR32MG21A020F1024IM32
base_project: src/openthread_rcp
filename: "{manifest_name}_{ot_version}_{baudrate}"
sdk: "simplicity_sdk:2024.6.2"
toolchain: "12.2.1.20221205"

gbl:
fw_type: openthread_rcp
ot_version: dynamic
baudrate: 460800

c_defines:
SL_UARTDRV_USART_VCOM_PERIPHERAL: USART0
SL_UARTDRV_USART_VCOM_PERIPHERAL_NO: 0
SL_UARTDRV_USART_VCOM_BAUDRATE: 460800

SL_UARTDRV_USART_VCOM_TX_PORT: gpioPortA
SL_UARTDRV_USART_VCOM_TX_PIN: 5

SL_UARTDRV_USART_VCOM_RX_PORT: gpioPortA
SL_UARTDRV_USART_VCOM_RX_PIN: 6

SL_UARTDRV_USART_VCOM_CTS_PORT: gpioPortC
SL_UARTDRV_USART_VCOM_CTS_PIN: 1

SL_UARTDRV_USART_VCOM_RTS_PORT: gpioPortA
SL_UARTDRV_USART_VCOM_RTS_PIN: 4

SL_CLOCK_MANAGER_HFXO_EN: 1
SL_CLOCK_MANAGER_HFXO_CTUNE: 140

SL_RAIL_UTIL_RSSI_OFFSET: -11
50 changes: 50 additions & 0 deletions manifests/aeotec/aeotec_zga008_zigbee_ncp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: ZGA008 Zigbee
device: EFR32MG21A020F1024IM32
base_project: src/zigbee_ncp
filename: "{manifest_name}_{ezsp_version}_{baudrate}"
sdk: "simplicity_sdk:2024.6.2"
toolchain: "12.2.1.20221205"

gbl:
fw_type: zigbee_ncp
ezsp_version: dynamic
baudrate: 115200

slcp_defines:
SL_ZIGBEE_ADDRESS_TABLE_SIZE: 32
SL_ZIGBEE_MULTICAST_TABLE_SIZE: 26
SL_ZIGBEE_ROUTE_TABLE_SIZE: 16
SL_ZIGBEE_DISCOVERY_TABLE_SIZE: 8

c_defines:
SL_IOSTREAM_USART_VCOM_BAUDRATE: 115200
SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE: usartHwFlowControlCtsAndRts

SL_IOSTREAM_USART_VCOM_PERIPHERAL: USART0
SL_IOSTREAM_USART_VCOM_PERIPHERAL_NO: 0

SL_IOSTREAM_USART_VCOM_TX_PORT: gpioPortA
SL_IOSTREAM_USART_VCOM_TX_PIN: 5

SL_IOSTREAM_USART_VCOM_RX_PORT: gpioPortA
SL_IOSTREAM_USART_VCOM_RX_PIN: 6

SL_IOSTREAM_USART_VCOM_CTS_PORT: gpioPortC
SL_IOSTREAM_USART_VCOM_CTS_PIN: 1

SL_IOSTREAM_USART_VCOM_RTS_PORT: gpioPortA
SL_IOSTREAM_USART_VCOM_RTS_PIN: 4

SL_IOSTREAM_USART_VCOM_RX_BUFFER_SIZE: 64

SL_CLOCK_MANAGER_HFXO_EN: 1
SL_CLOCK_MANAGER_HFXO_CTUNE: 140

SL_ZIGBEE_APS_UNICAST_MESSAGE_COUNT: 64
SL_ZIGBEE_BROADCAST_TABLE_SIZE: 30
SL_ZIGBEE_NEIGHBOR_TABLE_SIZE: 26
SL_ZIGBEE_SOURCE_ROUTE_TABLE_SIZE: 254
SL_ZIGBEE_MAX_END_DEVICE_CHILDREN: 32
SL_ZIGBEE_BINDING_TABLE_SIZE: 64

SL_RAIL_UTIL_RSSI_OFFSET: -11
36 changes: 36 additions & 0 deletions manifests/easyiot/easyiot_zb-gw04-1v1_openthread_rcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: ZB-GW04-1v1 OpenThread RCP
device: EFR32MG21A020F768IM32
base_project: src/openthread_rcp
filename: "{manifest_name}_{ot_version}_{baudrate}_{fw_variant}"
sdk: "simplicity_sdk:2024.6.2"
toolchain: "12.2.1.20221205"

gbl:
fw_type: openthread_rcp
ot_version: dynamic
baudrate: 230400
fw_variant: no_flow

c_defines:
SL_UARTDRV_USART_VCOM_FLOW_CONTROL_TYPE: usartHwFlowControlNone

SL_UARTDRV_USART_VCOM_PERIPHERAL: USART0
SL_UARTDRV_USART_VCOM_PERIPHERAL_NO: 0
SL_UARTDRV_USART_VCOM_BAUDRATE: 230400

SL_UARTDRV_USART_VCOM_TX_PORT: gpioPortB
SL_UARTDRV_USART_VCOM_TX_PIN: 1

SL_UARTDRV_USART_VCOM_RX_PORT: gpioPortB
SL_UARTDRV_USART_VCOM_RX_PIN: 0

SL_UARTDRV_USART_VCOM_CTS_PORT: 0
SL_UARTDRV_USART_VCOM_CTS_PIN: 0

SL_UARTDRV_USART_VCOM_RTS_PORT: 0
SL_UARTDRV_USART_VCOM_RTS_PIN: 0

SL_CLOCK_MANAGER_HFXO_EN: 1
SL_CLOCK_MANAGER_HFXO_CTUNE: 128

SL_RAIL_UTIL_RSSI_OFFSET: -11
51 changes: 51 additions & 0 deletions manifests/easyiot/easyiot_zb-gw04-1v1_zigbee_ncp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: ZB-GW04-1v1 Zigbee
device: EFR32MG21A020F768IM32
base_project: src/zigbee_ncp
filename: "{manifest_name}_{ezsp_version}_{baudrate}_{fw_variant}"
sdk: "simplicity_sdk:2024.6.2"
toolchain: "12.2.1.20221205"

gbl:
fw_type: zigbee_ncp
ezsp_version: dynamic
baudrate: 115200
fw_variant: sw_flow

slcp_defines:
SL_ZIGBEE_ADDRESS_TABLE_SIZE: 32
SL_ZIGBEE_MULTICAST_TABLE_SIZE: 26
SL_ZIGBEE_ROUTE_TABLE_SIZE: 16
SL_ZIGBEE_DISCOVERY_TABLE_SIZE: 8

c_defines:
SL_IOSTREAM_USART_VCOM_BAUDRATE: 115200
SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE: uartFlowControlSoftware

SL_IOSTREAM_USART_VCOM_PERIPHERAL: USART0
SL_IOSTREAM_USART_VCOM_PERIPHERAL_NO: 0

SL_IOSTREAM_USART_VCOM_TX_PORT: gpioPortB
SL_IOSTREAM_USART_VCOM_TX_PIN: 1

SL_IOSTREAM_USART_VCOM_RX_PORT: gpioPortB
SL_IOSTREAM_USART_VCOM_RX_PIN: 0

SL_IOSTREAM_USART_VCOM_CTS_PORT: 0
SL_IOSTREAM_USART_VCOM_CTS_PIN: 0

SL_IOSTREAM_USART_VCOM_RTS_PORT: 0
SL_IOSTREAM_USART_VCOM_RTS_PIN: 0

SL_IOSTREAM_USART_VCOM_RX_BUFFER_SIZE: 64

SL_CLOCK_MANAGER_HFXO_EN: 1
SL_CLOCK_MANAGER_HFXO_CTUNE: 128

SL_ZIGBEE_APS_UNICAST_MESSAGE_COUNT: 64
SL_ZIGBEE_BROADCAST_TABLE_SIZE: 30
SL_ZIGBEE_NEIGHBOR_TABLE_SIZE: 26
SL_ZIGBEE_SOURCE_ROUTE_TABLE_SIZE: 200
SL_ZIGBEE_MAX_END_DEVICE_CHILDREN: 32
SL_ZIGBEE_BINDING_TABLE_SIZE: 64

SL_RAIL_UTIL_RSSI_OFFSET: -11
33 changes: 33 additions & 0 deletions manifests/easyiot/easyiot_zb-gw04-1v2_openthread_rcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: ZB-GW04-1v2 OpenThread RCP
device: EFR32MG21A020F768IM32
base_project: src/openthread_rcp
filename: "{manifest_name}_{ot_version}_{baudrate}"
sdk: "simplicity_sdk:2024.6.2"
toolchain: "12.2.1.20221205"

gbl:
fw_type: openthread_rcp
ot_version: dynamic
baudrate: 230400

c_defines:
SL_UARTDRV_USART_VCOM_PERIPHERAL: USART0
SL_UARTDRV_USART_VCOM_PERIPHERAL_NO: 0
SL_UARTDRV_USART_VCOM_BAUDRATE: 230400

SL_UARTDRV_USART_VCOM_TX_PORT: gpioPortB
SL_UARTDRV_USART_VCOM_TX_PIN: 1

SL_UARTDRV_USART_VCOM_RX_PORT: gpioPortB
SL_UARTDRV_USART_VCOM_RX_PIN: 0

SL_UARTDRV_USART_VCOM_CTS_PORT: gpioPortD
SL_UARTDRV_USART_VCOM_CTS_PIN: 3

SL_UARTDRV_USART_VCOM_RTS_PORT: gpioPortD
SL_UARTDRV_USART_VCOM_RTS_PIN: 4

SL_CLOCK_MANAGER_HFXO_EN: 1
SL_CLOCK_MANAGER_HFXO_CTUNE: 128

SL_RAIL_UTIL_RSSI_OFFSET: -11
Loading

0 comments on commit 5db311f

Please sign in to comment.