Skip to content

Commit

Permalink
Merge pull request #152 from darkxst/SiSDK-rt
Browse files Browse the repository at this point in the history
Add router builds for SLZB devices
  • Loading branch information
darkxst authored Nov 24, 2024
2 parents fa7322f + 80e5e7a commit b36248a
Show file tree
Hide file tree
Showing 10 changed files with 1,460 additions and 15 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" \) -not -path "*/nabucasa/*" -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
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ RUN \
&& unzip -q -d simplicity_sdk_2024.6.2 simplicity_sdk_2024.6.2.zip \
&& rm simplicity_sdk_2024.6.2.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

ENV STUDIO_ADAPTER_PACK_PATH="/opt/zap"

ARG USERNAME=builder
ARG USER_UID=1000
ARG USER_GID=$USER_UID
Expand Down
64 changes: 64 additions & 0 deletions manifests/smlight/slzb06m_zigbee_router.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: SLZB-07 Zigbee Router
device: EFR32MG21A020F768IM32
base_project: src/zigbee_router
filename: "{manifest_name}_{ezsp_version}_{baudrate}"
sdk: "simplicity_sdk:2024.6.2"
toolchain: "12.2.1.20221205"

gbl:
fw_type: zigbee_router
ezsp_version: dynamic
baudrate: 115200

json_config:
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "model identifier"))
.defaultValue = "SLZB-06M"
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "manufacturer name"))
.defaultValue = "SMLIGHT"
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "date code"))
.defaultValue = "20241104"
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "sw build id"))
.defaultValue = "2024.6.2"
add_components:
- id: simple_led
instance: [led0]

configuration:
SL_IOSTREAM_USART_VCOM_BAUDRATE: 115200
SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE: usartHwFlowControlCtsAndRts

c_defines:
SL_CLI_LOCAL_ECHO: 0
SL_ZIGBEE_BINDING_TABLE_SIZE: 32
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_SIMPLE_LED_LED0_POLARITY: SL_SIMPLE_LED_POLARITY_ACTIVE_HIGH
SL_SIMPLE_LED_LED0_PORT: gpioPortC
SL_SIMPLE_LED_LED0_PIN: 0

SL_CLOCK_MANAGER_HFXO_EN: 1
SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE: SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_HFXO
65 changes: 65 additions & 0 deletions manifests/smlight/slzb07Mg24_zigbee_router.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: SLZB-07Mg24 Zigbee Router
device: EFR32MG24A020F1024IM40
base_project: src/zigbee_router
filename: "{manifest_name}_{ezsp_version}_{baudrate}"
sdk: "simplicity_sdk:2024.6.2"
toolchain: "12.2.1.20221205"

gbl:
fw_type: zigbee_router
ezsp_version: dynamic
baudrate: 115200

json_config:
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "model identifier"))
.defaultValue = "SLZB-07Mg24"
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "manufacturer name"))
.defaultValue = "SMLIGHT"
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "date code"))
.defaultValue = "20241104"
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "sw build id"))
.defaultValue = "2024.6.2"
add_components:
- id: simple_led
instance: [led0]

configuration:
SL_IOSTREAM_USART_VCOM_BAUDRATE: 115200
SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE: usartHwFlowControlCtsAndRts

c_defines:
SL_CLI_LOCAL_ECHO: 0
SL_ZIGBEE_BINDING_TABLE_SIZE: 32
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: 6

SL_IOSTREAM_USART_VCOM_RX_PORT: gpioPortA
SL_IOSTREAM_USART_VCOM_RX_PIN: 5

SL_IOSTREAM_USART_VCOM_CTS_PORT: gpioPortB
SL_IOSTREAM_USART_VCOM_CTS_PIN: 1

SL_IOSTREAM_USART_VCOM_RTS_PORT: gpioPortB
SL_IOSTREAM_USART_VCOM_RTS_PIN: 0

SL_SIMPLE_LED_LED0_POLARITY: SL_SIMPLE_LED_POLARITY_ACTIVE_HIGH
SL_SIMPLE_LED_LED0_PORT: gpioPortC
SL_SIMPLE_LED_LED0_PIN: 0

SL_CLOCK_MANAGER_HFXO_EN: 1
SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE: SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_HFXO
65 changes: 65 additions & 0 deletions manifests/smlight/slzb07_zigbee_router.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: SLZB-07 Zigbee Router
device: EFR32MG21A020F768IM32
base_project: src/zigbee_router
filename: "{manifest_name}_{ezsp_version}_{baudrate}"
sdk: "simplicity_sdk:2024.6.2"
toolchain: "12.2.1.20221205"

gbl:
fw_type: zigbee_router
ezsp_version: dynamic
baudrate: 115200

json_config:
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "model identifier"))
.defaultValue = "SLZB-07"
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "manufacturer name"))
.defaultValue = "SMLIGHT"
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "date code"))
.defaultValue = "20241104"
- file: "config/zcl/zcl_config.zap"
jq: |
( .endpointTypes[].clusters[].attributes[] | select(.name == "sw build id"))
.defaultValue = "2024.6.2"
add_components:
- id: simple_led
instance: [led0]

configuration:
SL_IOSTREAM_USART_VCOM_BAUDRATE: 115200
SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE: usartHwFlowControlCtsAndRts

c_defines:
SL_CLI_LOCAL_ECHO: 0
SL_ZIGBEE_BINDING_TABLE_SIZE: 32
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: 6

SL_IOSTREAM_USART_VCOM_RX_PORT: gpioPortA
SL_IOSTREAM_USART_VCOM_RX_PIN: 5

SL_IOSTREAM_USART_VCOM_CTS_PORT: gpioPortB
SL_IOSTREAM_USART_VCOM_CTS_PIN: 1

SL_IOSTREAM_USART_VCOM_RTS_PORT: gpioPortB
SL_IOSTREAM_USART_VCOM_RTS_PIN: 0

SL_SIMPLE_LED_LED0_POLARITY: SL_SIMPLE_LED_POLARITY_ACTIVE_HIGH
SL_SIMPLE_LED_LED0_PORT: gpioPortC
SL_SIMPLE_LED_LED0_PIN: 0

SL_CLOCK_MANAGER_HFXO_EN: 1
SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE: SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_HFXO
Loading

0 comments on commit b36248a

Please sign in to comment.