Skip to content

Commit b7b7f4e

Browse files
authored
Rebase to SDK v4.4.0 (#12)
* Update patch * Update SDK to 4.4.0 * Use ZAP tool from project-chip * Update project file to use Gecko SDK 4.4.0 * Fixup configs * Update to GCC 12.3 * Set POST_BUILD_EXE as a workaround for bootloader build
1 parent 42e6bb9 commit b7b7f4e

16 files changed

+153
-47
lines changed

.github/workflows/buld.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ env:
3131
sdk_version: ${{
3232
vars.sdk_version != ''
3333
&& vars.sdk_version
34-
|| '4.3.1'
34+
|| '4.4.0'
3535
}}
3636

3737
jobs:

Dockerfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FROM debian:bookworm
22

33
ARG DEBIAN_FRONTEND=noninteractive
4-
ARG GCC_ARM_VERSION="10.3-2021.10"
5-
ARG ZAP_TOOL_RELEASE="helloWorldTag"
6-
ARG GECKO_SDK_VERSION="v4.3.1"
4+
ARG GCC_ARM_VERSION="12.3.rel1"
5+
ARG ZAP_TOOL_RELEASE="v2023.12.07"
6+
ARG GECKO_SDK_VERSION="v4.4.0"
77

88
ARG USERNAME=builder
99
ARG USER_UID=1000
@@ -24,6 +24,7 @@ RUN \
2424
patch \
2525
python3 \
2626
unzip \
27+
xz-utils \
2728
less \
2829
&& apt-get clean
2930

@@ -50,21 +51,21 @@ ENV PATH="$PATH:/opt/slc_cli"
5051

5152
# Install ARM GCC embedded toolchain
5253
RUN \
53-
curl -O https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/${GCC_ARM_VERSION}/gcc-arm-none-eabi-${GCC_ARM_VERSION}-x86_64-linux.tar.bz2 \
54-
&& tar -C /opt -xjf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 \
55-
&& rm gcc-arm-none-eabi-${GCC_ARM_VERSION}-x86_64-linux.tar.bz2
56-
57-
ENV PATH="$PATH:/opt/gcc-arm-none-eabi-${GCC_ARM_VERSION}/bin"
54+
curl -L -O https://developer.arm.com/-/media/Files/downloads/gnu/${GCC_ARM_VERSION}/binrel/arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi.tar.xz \
55+
&& xzcat arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi.tar.xz | tar -C /opt -xf -\
56+
&& rm arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi.tar.xz
5857

58+
ENV PATH="$PATH:/opt/arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi/bin"
5959

6060
# Install ZAP adapter
6161
RUN \
62-
curl -OL https://github.com/SiliconLabs/zap/releases/download/${ZAP_TOOL_RELEASE}/zap-linux-x64.zip \
62+
curl -OL https://github.com/project-chip/zap/releases/download/${ZAP_TOOL_RELEASE}/zap-linux-x64.zip \
6363
&& umask 022 \
6464
&& unzip -d /opt/zap zap-linux-x64.zip \
6565
&& rm zap-linux-x64.zip
6666

6767
ENV STUDIO_ADAPTER_PACK_PATH="/opt/zap:/opt/commander"
68+
ENV POST_BUILD_EXE="/opt/commander/commander"
6869

6970

7071
RUN \
@@ -84,4 +85,5 @@ RUN \
8485
slc configuration --sdk="/gecko_sdk/" \
8586
&& slc signature trust --sdk "/gecko_sdk/" \
8687
&& slc configuration \
87-
--gcc-toolchain="/opt/gcc-arm-none-eabi-${GCC_ARM_VERSION}/"
88+
--gcc-toolchain="/opt/arm-gnu-toolchain-${GCC_ARM_VERSION}-x86_64-arm-none-eabi/"
89+

TBS2Torch/TBS2Torch.pintool

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="ASCII"?>
2-
<device:XMLDevice xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:device="http://www.silabs.com/ss/hwconfig/document/device.ecore" name="pin_tool.EFR32MG12P332F1024GL125" partId="mcu.arm.efr32.mg12.efr32mg12p332f1024gl125" contextId="com.silabs.sdk.stack.super:4.3.1._-184907989">
2+
<device:XMLDevice xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:device="http://www.silabs.com/ss/hwconfig/document/device.ecore" name="pin_tool.EFR32MG12P332F1024GL125" partId="mcu.arm.efr32.mg12.efr32mg12p332f1024gl125" contextId="com.silabs.sdk.stack.super:4.4.0._-184907989">
33
<mode name="DefaultMode">
44
<property object="DBG" propertyId="ABModule.selectedRequirement" value="dbg%T%SL_DEBUG%T%sl_debug_swo_config.h"/>
55
<property object="DBG" propertyId="ABPeripheral.included" value="true"/>

TBS2Torch/TBS2Torch.slcp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ source:
3737
- {path: handlers/rht.c}
3838
- {path: handlers/shaker.h}
3939
- {path: handlers/shaker.c}
40-
- {path: gecko_sdk_4.3.1/protocol/zigbee/app/framework/plugin/level-control/level-control.c}
40+
- {path: gecko_sdk_4.4.0/protocol/zigbee/app/framework/plugin/level-control/level-control.c}
4141
tag: [prebuilt_demo]
42-
sdk: {id: gecko_sdk, version: 4.3.1}
42+
sdk: {id: gecko_sdk, version: 4.4.0}
4343
toolchain_settings: []
4444
component:
4545
- {id: zigbee_ota_storage_simple_eeprom}
@@ -56,7 +56,6 @@ component:
5656
- {id: zigbee_end_device_support}
5757
- {id: zigbee_application_bootloader}
5858
- {id: zigbee_color_control_server}
59-
- {id: zigbee_binding_table}
6059
- {id: EFR32MG12P332F1024GL125}
6160
- {id: iostream_recommended_stream}
6261
- {id: zigbee_scenes}
@@ -88,8 +87,6 @@ component:
8887
- {id: zigbee_r22_support}
8988
- {id: zigbee_debug_print}
9089
- {id: zigbee_reporting}
91-
- {id: zigbee_install_code}
92-
- {id: zigbee_update_tc_link_key}
9390
- {id: si7210_driver}
9491
- {id: sensor_hall}
9592
- {id: si70xx_driver}

TBS2Torch/config/emlib_core_debug_config.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@
3737

3838
// <q SL_EMLIB_CORE_ENABLE_INTERRUPT_DISABLED_TIMING> Enables measuring of interrupt disable time for debugging purposes.
3939
// <i> Default: 0
40-
// <i> If Enabled, either cycle_counter or systemview component must be added to project.
4140
#define SL_EMLIB_CORE_ENABLE_INTERRUPT_DISABLED_TIMING 0
4241

4342
// </h>
4443

4544
// <<< end of configuration section >>>
46-
#endif // EM_CORE_CONFIG_H
45+
#endif // EM_CORE_CONFIG_H

TBS2Torch/config/power_configuration_server_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
*******************************************************************************
88
*
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
10-
* of this software and associated documentation files (the Software), to deal
10+
* of this software and associated documentation files (the "Software"), to deal
1111
* in the Software without restriction, including without limitation the rights
1212
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1313
* copies of the Software, and to permit persons to whom the Software is
1414
* furnished to do so, subject to the following conditions:
1515
* The above copyright notice and this permission notice shall be included in
1616
* all copies or substantial portions of the Software.
1717
*
18-
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1919
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2020
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2121
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
@@ -46,4 +46,4 @@
4646
// </h>
4747

4848
// <<< end of configuration section >>>
49-
#endif // SL_POWER_CONFIGURATION_SERVER_CONFIG_H
49+
#endif // SL_POWER_CONFIGURATION_SERVER_CONFIG_H

TBS2Torch/config/rz_button_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232
// <h> Counted Button Press configuration
3333

3434
// <o RZ_BUTTON_PRESS_TIMEOUT_MS> Counted short press timeout
35-
// <50..500:10>
36-
// <i> Default: 20
35+
// <100..2000:50>
36+
// <i> Default: 750
3737
// <i> The maximum blink pattern length
3838
#define RZ_BUTTON_PRESS_TIMEOUT_MS 700
3939

4040
// </h> end Counted Button Press config
4141
// <<< end of configuration section >>>
4242

43-
#endif // RZ_BUTTON_CONFIG_H
43+
#endif // RZ_BUTTON_CONFIG_H

TBS2Torch/config/sl_device_init_hfxo_config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
#define SL_DEVICE_INIT_HFXO_FREQ 38400000
4646

4747
// <o SL_DEVICE_INIT_HFXO_PRECISION> HFXO precision in PPM <0-65535>
48-
// <i> Default: 500
49-
#define SL_DEVICE_INIT_HFXO_PRECISION 500
48+
// <i> Default: 50
49+
#define SL_DEVICE_INIT_HFXO_PRECISION 50
5050

5151
// <o SL_DEVICE_INIT_HFXO_CTUNE> CTUNE <0-511>
5252
// <i> Default: 360

TBS2Torch/config/sl_device_init_lfxo_config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#define SL_DEVICE_INIT_LFXO_CTUNE 32
4747

4848
// <o SL_DEVICE_INIT_LFXO_PRECISION> LFXO precision in PPM <0-65535>
49-
// <i> Default: 500
49+
// <i> Default: 50
5050
#define SL_DEVICE_INIT_LFXO_PRECISION 100
5151

5252
// <o SL_DEVICE_INIT_LFXO_TIMEOUT> Startup Timeout Delay
@@ -64,4 +64,4 @@
6464
#define SL_DEVICE_INIT_LFXO_TIMEOUT _CMU_LFXOCTRL_TIMEOUT_DEFAULT
6565
// <<< end of configuration section >>>
6666

67-
#endif // SL_DEVICE_INIT_LFXO_CONFIG_H
67+
#endif // SL_DEVICE_INIT_LFXO_CONFIG_H

TBS2Torch/config/sl_mbedtls_config.h

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,33 @@
5252
// <i> Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
5353
#define SL_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED 0
5454

55+
// <q SL_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED> Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
56+
// <i> Default: 0
57+
// <i> Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
58+
#define SL_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED 0
59+
5560
// <q SL_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED> Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
5661
// <i> Default: 0
5762
// <i> Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
5863
#define SL_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED 0
5964

65+
// <q SL_MBEDTLS_ECP_ENABLE_COMPRESSED_CURVE_PARSING> Enable parsing of the compressed curves.
66+
// <i> Default: 0
67+
// <i> Enable parsing of the compressed curves.
68+
#define SL_MBEDTLS_ECP_ENABLE_COMPRESSED_CURVE_PARSING 0
69+
6070
// </h>
71+
72+
// <h> RSA configuration
73+
74+
// <q SL_MBEDTLS_RSA_NO_CRT> Disable use of the Chinese Remainder Theorem for RSA.
75+
// <i> Default: 0
76+
// <i> Disable use of the Chinese Remainder Theorem for RSA private key
77+
// <i> computations.
78+
#define SL_MBEDTLS_RSA_NO_CRT 0
79+
80+
// </h>
81+
6182
// <h> Miscellaneous configuration
6283

6384
// <q SL_MBEDTLS_DRIVERS_ENABLED> Enable Silicon Labs' Mbed TLS- and PSA Crypto drivers.
@@ -91,8 +112,7 @@
91112
// the correct Mbed TLS / PSA Crypto options.
92113
#include "sli_mbedtls_config_transform_autogen.h"
93114

94-
#include "mbedtls/config_psa.h"
95-
96-
#include "mbedtls/check_config.h"
115+
// Included for backward compatibility reasons.
116+
#include "mbedtls/build_info.h"
97117

98118
#endif // SL_MBEDTLS_CONFIG_H

0 commit comments

Comments
 (0)