Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template projects #82

Merged
merged 27 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0ac46ee
Remove `ncp-uart-hw`
puddly Sep 25, 2024
1b52705
Create `skyconnect_zigbee_ncp`
puddly Sep 25, 2024
66a5766
Create a `zigbee_ncp` project template
puddly Sep 25, 2024
d8c586b
Make project generation work
puddly Sep 25, 2024
9c463fd
Migrate bootloader next
puddly Sep 25, 2024
39f34fa
Migrate `ot-rcp` to `openthread_rcp`
puddly Sep 25, 2024
b514cfd
Drop multi-PAN
puddly Sep 25, 2024
eb3d334
Drop firmware eraser
puddly Sep 25, 2024
204352c
Fix existing manifests for Zigbee, Thread, and bootloader firmwares
puddly Sep 25, 2024
dd20b54
Drop Z-Wave
puddly Sep 25, 2024
67f191a
Clean up Zigbee firmware config
puddly Sep 26, 2024
057df8e
Clean up OpenThread configs as well
puddly Sep 26, 2024
6765c35
Add the `rail_util_rssi` component
puddly Sep 26, 2024
7b4a3b9
Update the README
puddly Sep 26, 2024
59bc5e5
Rename `ot-rcp` to `openthread_rcp`
puddly Sep 26, 2024
3d92d81
Rename `ncp-uart-hw` to `zigbee_ncp`
puddly Sep 26, 2024
7c2beb4
Initial commit of zwave firmware
puddly Oct 3, 2024
03664df
Z-Wave tweaks
puddly Oct 3, 2024
fb75292
Upgrade Z-Wave to Simplicity SDK
puddly Oct 3, 2024
032a4e2
Z-Wave tweaks
puddly Oct 3, 2024
f5b6919
Support Simplicity SDK as well
puddly Oct 3, 2024
bf823e6
Add Simplicity SDK to `Dockerfile`
puddly Oct 3, 2024
f099254
Adjust URL in Dockerfile
puddly Oct 3, 2024
fa8c273
Drop cproject normalization
puddly Oct 7, 2024
b7b919c
Make the GBL config clearer by specifying the dynamic version keys
puddly Oct 7, 2024
a2046ee
Implement support for the `fw_variant` key
puddly Oct 7, 2024
e9d29fc
Bump metadata version
puddly Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
- name: Install SDK extensions
run: |
# XXX: slc-cli does not actually work when the extensions aren't in the SDK!
for sdk in /gecko_sdk_*; do
for sdk in /*_sdk_*; do
slc signature trust --sdk "$sdk"

ln -s $PWD/gecko_sdk_extensions "$sdk"/extension
Expand All @@ -148,7 +148,7 @@ jobs:

# Pass all SDKs as consecutive `--sdk ...` arguments
sdk_args=""
for sdk_dir in /gecko_sdk*; do
for sdk_dir in /*_sdk*; do
sdk_args="$sdk_args --sdk $sdk_dir"
done

Expand Down
9 changes: 0 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
repos:
- repo: local
hooks:
- id: normalize-cproject
name: Normalize Eclipse .cproject files
entry: python tools/normalize_cproject.py
language: system
files: \.cproject$
pass_filenames: true

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.3
hooks:
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ RUN \
&& tar -C /opt -xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz \
&& rm arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz

# Simplicity SDK 2024.6.2
RUN \
curl -o simplicity_sdk_2024.6.2.zip -L https://github.com/SiliconLabs/simplicity_sdk/releases/download/v2024.6.2/gecko-sdk.zip \
&& 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
RUN \
curl -o gecko_sdk_4.4.4.zip -L https://github.com/SiliconLabs/gecko_sdk/releases/download/v4.4.4/gecko-sdk.zip \
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ It uses the Silicon Labs Gecko SDK and proprietary Silicon Labs tools such as th
Silicon Labs Configurator (slc) and the Simplicity Commander standalone utility.

## Background
The projects contained within this repository are configured for the BRD4001A dev kit
with a BRD4179B (EFR32MG21) module. This allows base projects to be debugged using
the Simplicity Studio IDE. These base projects are then retargeted for other boards
using manifest files. For example, the [`skyconnect_ncp-uart-hw.yaml`](https://github.com/NabuCasa/silabs-firmware-builder/blob/main/manifests/skyconnect_ncp-uart-hw.yaml)
manifest file retargets the base firmware to the SkyConnect/Connect ZBT-1.
The project templates in this repository are configured and built for specific boards
using manifest files. For example, the [`skyconnect_zigbee_ncp.yaml`](https://github.com/NabuCasa/silabs-firmware-builder/blob/main/manifests/skyconnect_zigbee_ncp.yaml)
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
Expand All @@ -35,11 +33,9 @@ Simplicity Studio SDK management workflow and manually manage SDKs:

Repeat this process for every necessary SDK version.

Base projects can now be built normally.

> [!TIP]
> If you have build issues after switching commits, make sure to delete any
> `gecko_sdk_*` folders from the Simplicity working tree.
> `gecko_sdk_*` and `template` folders from the Simplicity working tree.

## Building with a firmware manifest (for building device firmware)
Command line building requires:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: SkyConnect Bootloader
device: EFR32MG21A020F512IM32
base_project: src/bootloader-uart-xmodem
base_project: src/bootloader
filename: "{manifest_name}_{gecko_bootloader_version}"
sdk: "gecko_sdk:4.4.4"
toolchain: "12.2.1.20221205"

gbl:
fw_type: gecko-bootloader
dynamic: ["gecko_bootloader_version"]
gecko_bootloader_version: dynamic
baudrate: 115200

remove_components:
Expand Down
6 changes: 0 additions & 6 deletions manifests/nabucasa/skyconnect_firmware-eraser.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: SkyConnect OpenThread RCP
device: EFR32MG21A020F512IM32
base_project: src/ot-rcp
base_project: src/openthread_rcp
filename: "{manifest_name}_{ot_rcp_version.split('/')[-1]}_gsdk_{sdk_version}"
sdk: "gecko_sdk:4.4.4"
toolchain: "12.2.1.20221205"

gbl:
fw_type: ot-rcp
dynamic: ["ot_rcp_version"]
fw_type: openthread_rcp
ot_rcp_version: dynamic
baudrate: 460800

configuration:
SL_UARTDRV_USART_VCOM_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: 6
Expand Down
32 changes: 0 additions & 32 deletions manifests/nabucasa/skyconnect_rcp-uart-802154.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
name: SkyConnect Zigbee
device: EFR32MG21A020F512IM32
base_project: src/ncp-uart-hw
base_project: src/zigbee_ncp
filename: "{manifest_name}_{ezsp_version}"
sdk: "gecko_sdk:4.4.4"
toolchain: "12.2.1.20221205"

gbl:
fw_type: ncp-uart-hw
dynamic: ["ezsp_version"]
fw_type: zigbee_ncp
ezsp_version: dynamic
baudrate: 115200

configuration:
EMBER_CHILD_TABLE_SIZE: 32

c_defines:
EMBER_APS_UNICAST_MESSAGE_COUNT: 32
EMBER_BINDING_TABLE_SIZE: 32
EMBER_BROADCAST_TABLE_SIZE: 64
EMBER_KEY_TABLE_SIZE: 12
EMBER_MAX_END_DEVICE_CHILDREN: 32
EMBER_PACKET_BUFFER_COUNT: 255
EMBER_SOURCE_ROUTE_TABLE_SIZE: 200

SL_IOSTREAM_USART_VCOM_BAUDRATE: 115200
SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE: usartHwFlowControlCtsAndRts

c_defines:
SL_IOSTREAM_USART_VCOM_PERIPHERAL: USART0
SL_IOSTREAM_USART_VCOM_PERIPHERAL_NO: 0

Expand Down

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions manifests/nabucasa/slusb001a_zwave_ncp_serial_api_controller.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Yellow Bootloader
device: MGM210PA32JIA
base_project: src/bootloader-uart-xmodem
base_project: src/bootloader
filename: "{manifest_name}_{gecko_bootloader_version}"
sdk: "gecko_sdk:4.4.4"
toolchain: "12.2.1.20221205"

gbl:
fw_type: gecko-bootloader
dynamic: ["gecko_bootloader_version"]
gecko_bootloader_version: dynamic
baudrate: 115200

c_defines:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: Yellow OpenThread RCP
device: MGM210PA32JIA
base_project: src/ot-rcp
base_project: src/openthread_rcp
filename: "{manifest_name}_{ot_rcp_version.split('/')[-1]}_gsdk_{sdk_version}"
sdk: "gecko_sdk:4.4.4"
toolchain: "12.2.1.20221205"

gbl:
fw_type: ot-rcp
dynamic: ["ot_rcp_version"]
fw_type: openthread_rcp
ot_rcp_version: dynamic
baudrate: 460800

add_components:
- id: simple_led
instance: [board_activity]

configuration:
SL_UARTDRV_USART_VCOM_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
Expand Down
37 changes: 0 additions & 37 deletions manifests/nabucasa/yellow_rcp-uart-802154.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
name: Yellow Zigbee
device: MGM210PA32JIA
base_project: src/ncp-uart-hw
base_project: src/zigbee_ncp
filename: "{manifest_name}_{ezsp_version}"
sdk: "gecko_sdk:4.4.4"
toolchain: "12.2.1.20221205"

gbl:
fw_type: ncp-uart-hw
dynamic: ["ezsp_version"]
fw_type: zigbee_ncp
ezsp_version: dynamic
baudrate: 115200

add_components:
- id: simple_led
instance: [board_activity]

configuration:
EMBER_CHILD_TABLE_SIZE: 32

c_defines:
EMBER_APS_UNICAST_MESSAGE_COUNT: 32
EMBER_BINDING_TABLE_SIZE: 32
EMBER_BROADCAST_TABLE_SIZE: 64
EMBER_KEY_TABLE_SIZE: 12
EMBER_MAX_END_DEVICE_CHILDREN: 32
EMBER_PACKET_BUFFER_COUNT: 255
EMBER_SOURCE_ROUTE_TABLE_SIZE: 200

SL_IOSTREAM_USART_VCOM_BAUDRATE: 115200
SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE: usartHwFlowControlCtsAndRts

c_defines:
SL_IOSTREAM_USART_VCOM_PERIPHERAL: USART0
SL_IOSTREAM_USART_VCOM_PERIPHERAL: USART0
SL_IOSTREAM_USART_VCOM_PERIPHERAL_NO: 0

SL_IOSTREAM_USART_VCOM_TX_PORT: gpioPortA
Expand Down
28 changes: 28 additions & 0 deletions manifests/nabucasa/zwave_stick.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Z-Wave Stick
device: EFR32ZG23A020F512GM40
base_project: src/zwave_ncp
filename: "{manifest_name}_{zwave_version}"
sdk: "simplicity_sdk:2024.6.2"
toolchain: "12.2.1.20221205"

gbl:
fw_type: zwave_ncp
zwave_version: dynamic
baudrate: 115200
compression: lz4
sign_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_sign.key"
encrypt_key: "{SDK_DIR}/protocol/z-wave/platform/SiliconLabs/PAL/BootLoader/controller-keys/controller_encrypt.key"

c_defines:
ZAF_CONFIG_MANUFACTURER_ID: "0x0466"
ZAF_CONFIG_PRODUCT_TYPE_ID: "0x0001"
ZAF_CONFIG_PRODUCT_ID: "0x0001"

SERIAL_API_PERIPHERAL: USART0
SERIAL_API_PERIPHERAL_NO: 0

SERIAL_API_TX_PORT: gpioPortA
SERIAL_API_TX_PIN: 8

SERIAL_API_RX_PORT: gpioPortA
SERIAL_API_RX_PIN: 9
Loading
Loading