Skip to content

Commit cdd0b0e

Browse files
authored
Merge branch 'master' into ci/cron_optimization
2 parents 708b55d + 2a45ca0 commit cdd0b0e

File tree

7 files changed

+66
-23
lines changed

7 files changed

+66
-23
lines changed

build.sh

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
#!/bin/bash
22

33
if ! [ -x "$(command -v python3)" ]; then
4-
echo "ERROR: python is not installed! Please install python first."
4+
echo "ERROR: python is not installed or not in PATH! Please install python first."
55
exit 1
66
fi
77

88
if ! [ -x "$(command -v git)" ]; then
9-
echo "ERROR: git is not installed! Please install git first."
9+
echo "ERROR: git is not installed or not in PATH! Please install git first."
1010
exit 1
1111
fi
1212

13+
if ! [ -x "$(command -v ninja)" ]; then
14+
echo "ERROR: ninja is not installed or not in PATH! Please install ninja first."
15+
exit 1
16+
fi
17+
18+
# Fixes building some components. See https://github.com/espressif/arduino-esp32/issues/10167
19+
export IDF_COMPONENT_OVERWRITE_MANAGED_COMPONENTS=1
20+
1321
CCACHE_ENABLE=1
22+
1423
TARGET="all"
1524
BUILD_TYPE="all"
1625
BUILD_DEBUG="default"
@@ -122,10 +131,6 @@ else
122131
source ./tools/config.sh
123132
fi
124133

125-
if [ -f "$AR_MANAGED_COMPS/espressif__esp-sr/.component_hash" ]; then
126-
rm -rf $AR_MANAGED_COMPS/espressif__esp-sr/.component_hash
127-
fi
128-
129134
if [ "$BUILD_TYPE" != "all" ]; then
130135
if [ "$TARGET" = "all" ]; then
131136
echo "ERROR: You need to specify target for non-default builds"
@@ -216,10 +221,6 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
216221
idf_libs_configs="$idf_libs_configs;configs/defconfig.$defconf"
217222
done
218223

219-
if [ -f "$AR_MANAGED_COMPS/espressif__esp-sr/.component_hash" ]; then
220-
rm -rf $AR_MANAGED_COMPS/espressif__esp-sr/.component_hash
221-
fi
222-
223224
echo "* Build IDF-Libs: $idf_libs_configs"
224225
rm -rf build sdkconfig
225226
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" idf-libs
@@ -245,10 +246,6 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
245246
bootloader_configs="$bootloader_configs;configs/defconfig.$defconf";
246247
done
247248

248-
if [ -f "$AR_MANAGED_COMPS/espressif__esp-sr/.component_hash" ]; then
249-
rm -rf $AR_MANAGED_COMPS/espressif__esp-sr/.component_hash
250-
fi
251-
252249
echo "* Build BootLoader: $bootloader_configs"
253250
rm -rf build sdkconfig
254251
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$bootloader_configs" copy-bootloader
@@ -262,10 +259,6 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
262259
mem_configs="$mem_configs;configs/defconfig.$defconf";
263260
done
264261

265-
if [ -f "$AR_MANAGED_COMPS/espressif__esp-sr/.component_hash" ]; then
266-
rm -rf $AR_MANAGED_COMPS/espressif__esp-sr/.component_hash
267-
fi
268-
269262
echo "* Build Memory Variant: $mem_configs"
270263
rm -rf build sdkconfig
271264
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$mem_configs" mem-variant

configs/defconfig.common

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y
7474
CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y
7575
CONFIG_LWIP_HOOK_IP6_SELECT_SRC_ADDR_DEFAULT=y
7676
CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT=y
77-
CONFIG_LWIP_HOOK_IP6_INPUT_DEFAULT=y
77+
CONFIG_LWIP_HOOK_IP6_INPUT_CUSTOM=y
7878
CONFIG_MBEDTLS_PSK_MODES=y
7979
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
8080
CONFIG_MBEDTLS_CAMELLIA_C=y
81+
CONFIG_MBEDTLS_GCM_SUPPORT_NON_AES_CIPHER=y
8182
# CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN is not set
8283
CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
8384
CONFIG_OPENSSL_ASSERT_DO_NOTHING=y

configs/defconfig.debug_default

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
1+
CONFIG_BOOTLOADER_LOG_LEVEL_ERROR=y
22
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y

configs/pio_start.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,39 @@ FRAMEWORK_SDK_DIR = env.PioPlatform().get_package_dir(
3737

3838
board_config = env.BoardConfig()
3939

40+
flatten_cppdefines = env.Flatten(env['CPPDEFINES'])
41+
42+
#
43+
# zigbee libs
44+
#
45+
if "ZIGBEE_MODE_ZCZR" in flatten_cppdefines:
46+
env.Append(
47+
LIBS=[
48+
"-lesp_zb_api_zczr",
49+
"-lesp_zb_cli_command",
50+
"-lzboss_stack.zczr.trace",
51+
"-lzboss_stack.zczr",
52+
"-lzboss_port"
53+
]
54+
)
55+
if "ZIGBEE_MODE_ED" in flatten_cppdefines:
56+
env.Append(
57+
LIBS=[
58+
"-lesp_zb_api_ed",
59+
"-lesp_zb_cli_command",
60+
"-lzboss_stack.ed.trace",
61+
"-lzboss_stack.ed",
62+
"-lzboss_port"
63+
]
64+
)
65+
if "ZIGBEE_MODE_RCP" in flatten_cppdefines:
66+
env.Append(
67+
LIBS=[
68+
"-lesp_zb_api_rcp",
69+
"-lesp_zb_cli_command",
70+
"-lzboss_stack.rcp",
71+
"-lzboss_port"
72+
]
73+
)
74+
4075
env.Append(
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/components/protocomm/src/simple_ble/simple_ble.c b/components/protocomm/src/simple_ble/simple_ble.c
2+
index 8a4ae0f3d9..cd6421c6e5 100644
3+
--- a/components/protocomm/src/simple_ble/simple_ble.c
4+
+++ b/components/protocomm/src/simple_ble/simple_ble.c
5+
@@ -225,7 +225,7 @@ esp_err_t simple_ble_start(simple_ble_cfg_t *cfg)
6+
#ifdef CONFIG_BTDM_CTRL_MODE_BTDM
7+
ret = esp_bt_controller_enable(ESP_BT_MODE_BTDM);
8+
-#elif defined CONFIG_BTDM_CTRL_MODE_BLE_ONLY || CONFIG_BT_CTRL_MODE_EFF
9+
+#elif defined CONFIG_BTDM_CTRL_MODE_BLE_ONLY || CONFIG_BT_CTRL_MODE_EFF || CONFIG_IDF_TARGET_ESP32C6
10+
ret = esp_bt_controller_enable(ESP_BT_MODE_BLE);
11+
#else
12+
ESP_LOGE(TAG, "Configuration mismatch. Select BLE Only or BTDM mode from menuconfig");

tools/config.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ AR_COMPS="$AR_ROOT/components"
4545
AR_MANAGED_COMPS="$AR_ROOT/managed_components"
4646
AR_OUT="$AR_ROOT/out"
4747
AR_TOOLS="$AR_OUT/tools"
48+
AR_PATCHES="$AR_ROOT/patches"
4849
AR_PLATFORM_TXT="$AR_OUT/platform.txt"
4950
AR_GEN_PART_PY="$AR_TOOLS/gen_esp32part.py"
5051
AR_SDK="$AR_TOOLS/esp32-arduino-libs/$IDF_TARGET"

tools/install-esp-idf.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ if [ ! -x $idf_was_installed ] || [ ! -x $commit_predefined ]; then
3737

3838
# Temporarily patch the ESP32-S2 I2C LL driver to keep the clock source
3939
cd $IDF_PATH
40-
patch -p1 -N -i ../patches/esp32s2_i2c_ll_master_init.diff
41-
patch -p1 -N -i ../patches/mmu_map.diff
42-
patch -p1 -N -i ../patches/lwip_max_tcp_pcb.diff
40+
patch -p1 -N -i $AR_PATCHES/esp32s2_i2c_ll_master_init.diff
41+
patch -p1 -N -i $AR_PATCHES/mmu_map.diff
42+
patch -p1 -N -i $AR_PATCHES/lwip_max_tcp_pcb.diff
43+
patch -p1 -N -i $AR_PATCHES/esp32c6_provisioning_bluedroid.diff
4344
cd -
4445
fi
4546

0 commit comments

Comments
 (0)