Merge branch 'feature/Add_support_for_esp32c6' into 'master'

zigbee: Update examples to support esp32c6

See merge request espressif/esp-idf!21843
This commit is contained in:
Shu Chen 2023-01-03 20:08:40 +08:00
commit 83d1bedb25
18 changed files with 38 additions and 35 deletions

View File

@ -8,10 +8,10 @@ examples/zigbee/esp_zigbee_gateway:
examples/zigbee/esp_zigbee_rcp:
enable:
- if: IDF_TARGET == "esp32h4"
reason: should able to run on esp32h4
- if: IDF_TARGET in ["esp32h4", "esp32c6"]
reason: should able to run on esp32h4 and esp32c6
examples/zigbee/light_sample:
enable:
- if: IDF_TARGET == "esp32h4"
reason: should able to run on esp32h4
- if: IDF_TARGET in ["esp32h4", "esp32c6"]
reason: should able to run on esp32h4 and esp32c6

View File

@ -1,7 +1,7 @@
## IDF Component Manager Manifest File
dependencies:
espressif/esp-zboss-lib: "~0.2.0"
espressif/esp-zigbee-lib: "~0.3.0"
espressif/esp-zboss-lib: "~0.3.0"
espressif/esp-zigbee-lib: "~0.4.1"
## Required IDF version
idf:
version: ">=5.0.0"

View File

@ -2,6 +2,6 @@
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
zb_storage, data, fat, 0x110000, 128K,
zb_fct, data, fat, 0x130000, 1K,
factory, app, factory, 0x10000, 550K,
zb_storage, data, fat, 0x9a000, 128K,
zb_fct, data, fat, 0xba000, 1K,

1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, 0x9000, 0x6000,
4 phy_init, data, phy, 0xf000, 0x1000,
5 factory, app, factory, 0x10000, 1M, factory, app, factory, 0x10000, 550K,
6 zb_storage, data, fat, 0x110000, 128K, zb_storage, data, fat, 0x9a000, 128K,
7 zb_fct, data, fat, 0x130000, 1K, zb_fct, data, fat, 0xba000, 1K,

View File

@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 |
| ----------------- | -------- |
| Supported Targets | ESP32-C6 | ESP32-H4 |
| ----------------- | -------- | -------- |
# Rcp Example
@ -14,7 +14,7 @@ This test code shows how to configure Zigbee rcp (radio co-processor) device. Rc
## Configure the project
Before project configuration and build, make sure to set the correct chip target using `idf.py --preview set-target esp32h4`
Before project configuration and build, make sure to set the correct chip target using `idf.py --preview set-target TARGET` command.
## Erase the NVRAM

View File

@ -40,6 +40,7 @@
#include "freertos/task.h"
#include "zb_scheduler.h"
#include "esp_zigbee_rcp.h"
#include "nvs_flash.h"
#if (defined ZB_MACSPLIT_HOST && !defined ZB_MACSPLIT_DEVICE)
#error Only Zigbee rcp device should be defined
@ -71,6 +72,7 @@ void app_main(void)
.radio_config = ESP_ZB_DEFAULT_RADIO_CONFIG(),
.host_config = ESP_ZB_DEFAULT_HOST_CONFIG(),
};
ESP_ERROR_CHECK(nvs_flash_init());
/* load Zigbee rcp platform config to initialization */
esp_zb_macsplit_set_version(RCP_COMPILE_DEFINE);
ESP_ERROR_CHECK(esp_zb_platform_config(&config));

View File

@ -1,7 +1,7 @@
## IDF Component Manager Manifest File
dependencies:
espressif/esp-zboss-lib: "~0.2.0"
espressif/esp-zigbee-lib: "~0.3.0"
espressif/esp-zboss-lib: "~0.3.0"
espressif/esp-zigbee-lib: "~0.4.1"
## Required IDF version
idf:
version: ">=5.0.0"

View File

@ -2,5 +2,5 @@
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
zb_storage, data, fat, , 128K,
factory, app, factory, 0x10000, 550K,
zb_storage, data, fat, 0x9a000, 128K,

1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, 0x9000, 0x6000,
4 phy_init, data, phy, 0xf000, 0x1000,
5 factory, app, factory, 0x10000, 1M, factory, app, factory, 0x10000, 550K,
6 zb_storage, data, fat, , 128K, zb_storage, data, fat, 0x9a000, 128K,

View File

@ -1,4 +1,3 @@
CONFIG_IDF_TARGET="esp32h4"
#
# Partition Table
#

View File

@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 |
| ----------------- | -------- |
| Supported Targets | ESP32-C6 | ESP32-H4 |
| ----------------- | -------- | -------- |
# Light Bulb Example
@ -13,7 +13,7 @@ This test code shows how to configure Zigbee end device and use it as HA on/off
## Configure the project
Before project configuration and build, make sure to set the correct chip target using `idf.py set-target esp32h4`.
Before project configuration and build, make sure to set the correct chip target using `idf.py --preview set-target TARGET` command.
## Erase the NVRAM

View File

@ -40,6 +40,7 @@
#include "freertos/task.h"
#include "ha/esp_zigbee_ha_standard.h"
#include "esp_zb_light.h"
#include "nvs_flash.h"
/**
* @note Make sure set idf.py menuconfig in zigbee component as zigbee end device!
@ -128,6 +129,7 @@ void app_main(void)
.radio_config = ESP_ZB_DEFAULT_RADIO_CONFIG(),
.host_config = ESP_ZB_DEFAULT_HOST_CONFIG(),
};
ESP_ERROR_CHECK(nvs_flash_init());
/* load Zigbee light_bulb platform config to initialization */
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
/* hardware related and device init */

View File

@ -1,7 +1,7 @@
## IDF Component Manager Manifest File
dependencies:
espressif/esp-zigbee-lib: "~0.3.0"
espressif/esp-zboss-lib: "~0.2.0"
espressif/esp-zigbee-lib: "~0.4.1"
espressif/esp-zboss-lib: "~0.3.0"
espressif/led_strip: "~2.0.0"
## Required IDF version
idf:

View File

@ -2,6 +2,6 @@
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
zb_storage, data, fat, 0x110000, 128K,
zb_fct, data, fat, 0x130000, 1K,
factory, app, factory, 0x10000, 550K,
zb_storage, data, fat, 0x9a000, 128K,
zb_fct, data, fat, 0xba000, 1K,

1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, 0x9000, 0x6000,
4 phy_init, data, phy, 0xf000, 0x1000,
5 factory, app, factory, 0x10000, 1M, factory, app, factory, 0x10000, 550K,
6 zb_storage, data, fat, 0x110000, 128K, zb_storage, data, fat, 0x9a000, 128K,
7 zb_fct, data, fat, 0x130000, 1K, zb_fct, data, fat, 0xba000, 1K,

View File

@ -1,4 +1,3 @@
CONFIG_IDF_TARGET="esp32h4"
#
# Partition Table
#

View File

@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 |
| ----------------- | -------- |
| Supported Targets | ESP32-C6 | ESP32-H4 |
| ----------------- | -------- | -------- |
# Light Switch Example
@ -13,7 +13,7 @@ This test code shows how to configure Zigbee Coordinator and use it as an HA on/
## Configure the project
Before project configuration and build, make sure to set the correct chip target using `idf.py set-target esp32h4`.
Before project configuration and build, make sure to set the correct chip target using `idf.py --preview set-target TARGET` command.
## Erase the NVRAM

View File

@ -40,6 +40,7 @@
#include "freertos/task.h"
#include "ha/esp_zigbee_ha_standard.h"
#include "esp_zb_switch.h"
#include "nvs_flash.h"
/**
* @note Make sure set idf.py menuconfig in zigbee component as zigbee coordinator device!
@ -171,6 +172,7 @@ void app_main(void)
.radio_config = ESP_ZB_DEFAULT_RADIO_CONFIG(),
.host_config = ESP_ZB_DEFAULT_HOST_CONFIG(),
};
ESP_ERROR_CHECK(nvs_flash_init());
/* load Zigbee switch platform config to initialization */
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
/* hardware related and device init */

View File

@ -1,7 +1,7 @@
## IDF Component Manager Manifest File
dependencies:
espressif/esp-zigbee-lib: "~0.3.0"
espressif/esp-zboss-lib: "~0.2.0"
espressif/esp-zigbee-lib: "~0.4.1"
espressif/esp-zboss-lib: "~0.3.0"
## Required IDF version
idf:
version: ">=5.0.0"

View File

@ -2,6 +2,6 @@
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
zb_storage, data, fat,0x110000, 128K,
zb_fct,data,fat,0x130000,1K
factory, app, factory, 0x10000, 550K,
zb_storage, data, fat, 0x9a000, 128K,
zb_fct, data, fat, 0xba000, 1K,

1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, 0x9000, 0x6000,
4 phy_init, data, phy, 0xf000, 0x1000,
5 factory, app, factory, 0x10000, 1M, factory, app, factory, 0x10000, 550K,
6 zb_storage, data, fat,0x110000, 128K, zb_storage, data, fat, 0x9a000, 128K,
7 zb_fct,data,fat,0x130000,1K zb_fct, data, fat, 0xba000, 1K,

View File

@ -1,4 +1,3 @@
CONFIG_IDF_TARGET="esp32h4"
#
# Partition Table
#