mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 22:54:33 +02:00
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:
@@ -8,10 +8,10 @@ examples/zigbee/esp_zigbee_gateway:
|
|||||||
|
|
||||||
examples/zigbee/esp_zigbee_rcp:
|
examples/zigbee/esp_zigbee_rcp:
|
||||||
enable:
|
enable:
|
||||||
- if: IDF_TARGET == "esp32h4"
|
- if: IDF_TARGET in ["esp32h4", "esp32c6"]
|
||||||
reason: should able to run on esp32h4
|
reason: should able to run on esp32h4 and esp32c6
|
||||||
|
|
||||||
examples/zigbee/light_sample:
|
examples/zigbee/light_sample:
|
||||||
enable:
|
enable:
|
||||||
- if: IDF_TARGET == "esp32h4"
|
- if: IDF_TARGET in ["esp32h4", "esp32c6"]
|
||||||
reason: should able to run on esp32h4
|
reason: should able to run on esp32h4 and esp32c6
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## IDF Component Manager Manifest File
|
## IDF Component Manager Manifest File
|
||||||
dependencies:
|
dependencies:
|
||||||
espressif/esp-zboss-lib: "~0.2.0"
|
espressif/esp-zboss-lib: "~0.3.0"
|
||||||
espressif/esp-zigbee-lib: "~0.3.0"
|
espressif/esp-zigbee-lib: "~0.4.1"
|
||||||
## Required IDF version
|
## Required IDF version
|
||||||
idf:
|
idf:
|
||||||
version: ">=5.0.0"
|
version: ">=5.0.0"
|
||||||
|
@@ -2,6 +2,6 @@
|
|||||||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
||||||
nvs, data, nvs, 0x9000, 0x6000,
|
nvs, data, nvs, 0x9000, 0x6000,
|
||||||
phy_init, data, phy, 0xf000, 0x1000,
|
phy_init, data, phy, 0xf000, 0x1000,
|
||||||
factory, app, factory, 0x10000, 1M,
|
factory, app, factory, 0x10000, 550K,
|
||||||
zb_storage, data, fat, 0x110000, 128K,
|
zb_storage, data, fat, 0x9a000, 128K,
|
||||||
zb_fct, data, fat, 0x130000, 1K,
|
zb_fct, data, fat, 0xba000, 1K,
|
||||||
|
|
@@ -1,5 +1,5 @@
|
|||||||
| Supported Targets | ESP32-H4 |
|
| Supported Targets | ESP32-C6 | ESP32-H4 |
|
||||||
| ----------------- | -------- |
|
| ----------------- | -------- | -------- |
|
||||||
|
|
||||||
# Rcp Example
|
# Rcp Example
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ This test code shows how to configure Zigbee rcp (radio co-processor) device. Rc
|
|||||||
|
|
||||||
## Configure the project
|
## 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
|
## Erase the NVRAM
|
||||||
|
|
||||||
|
@@ -40,6 +40,7 @@
|
|||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "zb_scheduler.h"
|
#include "zb_scheduler.h"
|
||||||
#include "esp_zigbee_rcp.h"
|
#include "esp_zigbee_rcp.h"
|
||||||
|
#include "nvs_flash.h"
|
||||||
|
|
||||||
#if (defined ZB_MACSPLIT_HOST && !defined ZB_MACSPLIT_DEVICE)
|
#if (defined ZB_MACSPLIT_HOST && !defined ZB_MACSPLIT_DEVICE)
|
||||||
#error Only Zigbee rcp device should be defined
|
#error Only Zigbee rcp device should be defined
|
||||||
@@ -71,6 +72,7 @@ void app_main(void)
|
|||||||
.radio_config = ESP_ZB_DEFAULT_RADIO_CONFIG(),
|
.radio_config = ESP_ZB_DEFAULT_RADIO_CONFIG(),
|
||||||
.host_config = ESP_ZB_DEFAULT_HOST_CONFIG(),
|
.host_config = ESP_ZB_DEFAULT_HOST_CONFIG(),
|
||||||
};
|
};
|
||||||
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
/* load Zigbee rcp platform config to initialization */
|
/* load Zigbee rcp platform config to initialization */
|
||||||
esp_zb_macsplit_set_version(RCP_COMPILE_DEFINE);
|
esp_zb_macsplit_set_version(RCP_COMPILE_DEFINE);
|
||||||
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
|
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## IDF Component Manager Manifest File
|
## IDF Component Manager Manifest File
|
||||||
dependencies:
|
dependencies:
|
||||||
espressif/esp-zboss-lib: "~0.2.0"
|
espressif/esp-zboss-lib: "~0.3.0"
|
||||||
espressif/esp-zigbee-lib: "~0.3.0"
|
espressif/esp-zigbee-lib: "~0.4.1"
|
||||||
## Required IDF version
|
## Required IDF version
|
||||||
idf:
|
idf:
|
||||||
version: ">=5.0.0"
|
version: ">=5.0.0"
|
||||||
|
@@ -2,5 +2,5 @@
|
|||||||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
||||||
nvs, data, nvs, 0x9000, 0x6000,
|
nvs, data, nvs, 0x9000, 0x6000,
|
||||||
phy_init, data, phy, 0xf000, 0x1000,
|
phy_init, data, phy, 0xf000, 0x1000,
|
||||||
factory, app, factory, 0x10000, 1M,
|
factory, app, factory, 0x10000, 550K,
|
||||||
zb_storage, data, fat, , 128K,
|
zb_storage, data, fat, 0x9a000, 128K,
|
||||||
|
|
@@ -1,4 +1,3 @@
|
|||||||
CONFIG_IDF_TARGET="esp32h4"
|
|
||||||
#
|
#
|
||||||
# Partition Table
|
# Partition Table
|
||||||
#
|
#
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
| Supported Targets | ESP32-H4 |
|
| Supported Targets | ESP32-C6 | ESP32-H4 |
|
||||||
| ----------------- | -------- |
|
| ----------------- | -------- | -------- |
|
||||||
|
|
||||||
# Light Bulb Example
|
# 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
|
## 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
|
## Erase the NVRAM
|
||||||
|
|
||||||
|
@@ -40,6 +40,7 @@
|
|||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "ha/esp_zigbee_ha_standard.h"
|
#include "ha/esp_zigbee_ha_standard.h"
|
||||||
#include "esp_zb_light.h"
|
#include "esp_zb_light.h"
|
||||||
|
#include "nvs_flash.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @note Make sure set idf.py menuconfig in zigbee component as zigbee end device!
|
* @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(),
|
.radio_config = ESP_ZB_DEFAULT_RADIO_CONFIG(),
|
||||||
.host_config = ESP_ZB_DEFAULT_HOST_CONFIG(),
|
.host_config = ESP_ZB_DEFAULT_HOST_CONFIG(),
|
||||||
};
|
};
|
||||||
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
/* load Zigbee light_bulb platform config to initialization */
|
/* load Zigbee light_bulb platform config to initialization */
|
||||||
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
|
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
|
||||||
/* hardware related and device init */
|
/* hardware related and device init */
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## IDF Component Manager Manifest File
|
## IDF Component Manager Manifest File
|
||||||
dependencies:
|
dependencies:
|
||||||
espressif/esp-zigbee-lib: "~0.3.0"
|
espressif/esp-zigbee-lib: "~0.4.1"
|
||||||
espressif/esp-zboss-lib: "~0.2.0"
|
espressif/esp-zboss-lib: "~0.3.0"
|
||||||
espressif/led_strip: "~2.0.0"
|
espressif/led_strip: "~2.0.0"
|
||||||
## Required IDF version
|
## Required IDF version
|
||||||
idf:
|
idf:
|
||||||
|
@@ -2,6 +2,6 @@
|
|||||||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
||||||
nvs, data, nvs, 0x9000, 0x6000,
|
nvs, data, nvs, 0x9000, 0x6000,
|
||||||
phy_init, data, phy, 0xf000, 0x1000,
|
phy_init, data, phy, 0xf000, 0x1000,
|
||||||
factory, app, factory, 0x10000, 1M,
|
factory, app, factory, 0x10000, 550K,
|
||||||
zb_storage, data, fat, 0x110000, 128K,
|
zb_storage, data, fat, 0x9a000, 128K,
|
||||||
zb_fct, data, fat, 0x130000, 1K,
|
zb_fct, data, fat, 0xba000, 1K,
|
||||||
|
|
@@ -1,4 +1,3 @@
|
|||||||
CONFIG_IDF_TARGET="esp32h4"
|
|
||||||
#
|
#
|
||||||
# Partition Table
|
# Partition Table
|
||||||
#
|
#
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
| Supported Targets | ESP32-H4 |
|
| Supported Targets | ESP32-C6 | ESP32-H4 |
|
||||||
| ----------------- | -------- |
|
| ----------------- | -------- | -------- |
|
||||||
|
|
||||||
# Light Switch Example
|
# 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
|
## 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
|
## Erase the NVRAM
|
||||||
|
|
||||||
|
@@ -40,6 +40,7 @@
|
|||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "ha/esp_zigbee_ha_standard.h"
|
#include "ha/esp_zigbee_ha_standard.h"
|
||||||
#include "esp_zb_switch.h"
|
#include "esp_zb_switch.h"
|
||||||
|
#include "nvs_flash.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @note Make sure set idf.py menuconfig in zigbee component as zigbee coordinator device!
|
* @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(),
|
.radio_config = ESP_ZB_DEFAULT_RADIO_CONFIG(),
|
||||||
.host_config = ESP_ZB_DEFAULT_HOST_CONFIG(),
|
.host_config = ESP_ZB_DEFAULT_HOST_CONFIG(),
|
||||||
};
|
};
|
||||||
|
ESP_ERROR_CHECK(nvs_flash_init());
|
||||||
/* load Zigbee switch platform config to initialization */
|
/* load Zigbee switch platform config to initialization */
|
||||||
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
|
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
|
||||||
/* hardware related and device init */
|
/* hardware related and device init */
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## IDF Component Manager Manifest File
|
## IDF Component Manager Manifest File
|
||||||
dependencies:
|
dependencies:
|
||||||
espressif/esp-zigbee-lib: "~0.3.0"
|
espressif/esp-zigbee-lib: "~0.4.1"
|
||||||
espressif/esp-zboss-lib: "~0.2.0"
|
espressif/esp-zboss-lib: "~0.3.0"
|
||||||
## Required IDF version
|
## Required IDF version
|
||||||
idf:
|
idf:
|
||||||
version: ">=5.0.0"
|
version: ">=5.0.0"
|
||||||
|
@@ -2,6 +2,6 @@
|
|||||||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
||||||
nvs, data, nvs, 0x9000, 0x6000,
|
nvs, data, nvs, 0x9000, 0x6000,
|
||||||
phy_init, data, phy, 0xf000, 0x1000,
|
phy_init, data, phy, 0xf000, 0x1000,
|
||||||
factory, app, factory, 0x10000, 1M,
|
factory, app, factory, 0x10000, 550K,
|
||||||
zb_storage, data, fat,0x110000, 128K,
|
zb_storage, data, fat, 0x9a000, 128K,
|
||||||
zb_fct,data,fat,0x130000,1K
|
zb_fct, data, fat, 0xba000, 1K,
|
||||||
|
|
@@ -1,4 +1,3 @@
|
|||||||
CONFIG_IDF_TARGET="esp32h4"
|
|
||||||
#
|
#
|
||||||
# Partition Table
|
# Partition Table
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user