From f1d16cf736503dc15c06b69429b06f741c95b77b Mon Sep 17 00:00:00 2001 From: Vikram Dattu Date: Fri, 29 Sep 2023 19:21:30 +0530 Subject: [PATCH] examples: Added support for ESP32C6 1. ESP32C6 button configs for RGB LED and Boot GPIO 2. CI: Added entry for C6 in `.gitlab.yaml` 3. Added `partitions_4mb_optimised.csv` which uses flash to the full extent - Created sdkconfig.defaults for esp32c6 and used partitions_4mb_optimised.csv as default - This is made default for esp32c6 because, for esp32c6, image sizes exceed config from partitions.csv 4. Fixed matter examples CMakeLits.txt files for c6 support --- .gitlab-ci.yml | 4 ++-- examples/common/ws2812_led/Kconfig | 2 +- examples/fan/main/Kconfig.projbuild | 4 ++-- examples/fan/partitions_4mb_optimised.csv | 11 +++++++++++ examples/fan/sdkconfig.defaults.esp32c6 | 10 ++++++++++ examples/gpio/main/Kconfig.projbuild | 6 +++--- examples/gpio/partitions_4mb_optimised.csv | 11 +++++++++++ examples/gpio/sdkconfig.defaults.esp32c6 | 10 ++++++++++ examples/homekit_switch/main/Kconfig.projbuild | 6 +++--- examples/homekit_switch/partitions_4mb_optimised.csv | 10 ++++++++++ examples/homekit_switch/sdkconfig.defaults.esp32c6 | 10 ++++++++++ examples/led_light/main/Kconfig.projbuild | 4 ++-- examples/led_light/partitions_4mb_optimised.csv | 11 +++++++++++ examples/led_light/sdkconfig.defaults.esp32c6 | 10 ++++++++++ examples/matter/README.md | 2 +- examples/matter/matter_controller/CMakeLists.txt | 2 ++ examples/matter/matter_light/CMakeLists.txt | 2 ++ .../matter/matter_light/partitions_4mb_optimised.csv | 11 +++++++++++ .../matter/matter_light/sdkconfig.defaults.esp32c6 | 10 ++++++++++ examples/matter/matter_switch/CMakeLists.txt | 2 ++ .../matter/matter_switch/partitions_4mb_optimised.csv | 11 +++++++++++ .../matter/matter_switch/sdkconfig.defaults.esp32c6 | 10 ++++++++++ examples/multi_device/main/Kconfig.projbuild | 6 +++--- examples/multi_device/partitions_4mb_optimised.csv | 11 +++++++++++ examples/multi_device/sdkconfig.defaults.esp32c6 | 10 ++++++++++ examples/switch/main/Kconfig.projbuild | 8 ++++---- examples/switch/partitions_4mb_optimised.csv | 11 +++++++++++ examples/switch/sdkconfig.defaults.esp32c6 | 10 ++++++++++ examples/temperature_sensor/main/Kconfig.projbuild | 4 ++-- .../temperature_sensor/partitions_4mb_optimised.csv | 10 ++++++++++ .../temperature_sensor/sdkconfig.defaults.esp32c6 | 10 ++++++++++ 31 files changed, 216 insertions(+), 23 deletions(-) create mode 100644 examples/fan/partitions_4mb_optimised.csv create mode 100644 examples/fan/sdkconfig.defaults.esp32c6 create mode 100644 examples/gpio/partitions_4mb_optimised.csv create mode 100644 examples/gpio/sdkconfig.defaults.esp32c6 create mode 100644 examples/homekit_switch/partitions_4mb_optimised.csv create mode 100644 examples/homekit_switch/sdkconfig.defaults.esp32c6 create mode 100644 examples/led_light/partitions_4mb_optimised.csv create mode 100644 examples/led_light/sdkconfig.defaults.esp32c6 create mode 100644 examples/matter/matter_light/partitions_4mb_optimised.csv create mode 100644 examples/matter/matter_light/sdkconfig.defaults.esp32c6 create mode 100644 examples/matter/matter_switch/partitions_4mb_optimised.csv create mode 100644 examples/matter/matter_switch/sdkconfig.defaults.esp32c6 create mode 100644 examples/multi_device/partitions_4mb_optimised.csv create mode 100644 examples/multi_device/sdkconfig.defaults.esp32c6 create mode 100644 examples/switch/partitions_4mb_optimised.csv create mode 100644 examples/switch/sdkconfig.defaults.esp32c6 create mode 100644 examples/temperature_sensor/partitions_4mb_optimised.csv create mode 100644 examples/temperature_sensor/sdkconfig.defaults.esp32c6 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c97804..f693234 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -127,7 +127,7 @@ build_idf_v5.1: extends: .build_template image: espressif/idf:release-v5.1 variables: - EXAMPLE_TARGETS: "esp32 esp32s2 esp32c3 esp32s3" + EXAMPLE_TARGETS: "esp32 esp32s2 esp32c3 esp32s3 esp32c6" build_matter: stage: build @@ -136,7 +136,7 @@ build_matter: - build variables: PEDANTIC_FLAGS: "" - EXAMPLE_TARGETS: "esp32 esp32c3 esp32s3" + EXAMPLE_TARGETS: "esp32 esp32c3 esp32s3 esp32c6" EXAMPLES: "matter/matter_light matter/matter_switch" CONTROLLER_EXAMPLE_TARGET: "esp32s3" script: diff --git a/examples/common/ws2812_led/Kconfig b/examples/common/ws2812_led/Kconfig index c67ccbf..bf9f6a8 100644 --- a/examples/common/ws2812_led/Kconfig +++ b/examples/common/ws2812_led/Kconfig @@ -9,7 +9,7 @@ menu "WS2812 RGB LED" config WS2812_LED_GPIO int "WS2812 LED GPIO" - default 8 if IDF_TARGET_ESP32C3 + default 8 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6 default 48 if IDF_TARGET_ESP32S3 default 18 depends on WS2812_LED_ENABLE diff --git a/examples/fan/main/Kconfig.projbuild b/examples/fan/main/Kconfig.projbuild index dfedefb..de0e2bf 100644 --- a/examples/fan/main/Kconfig.projbuild +++ b/examples/fan/main/Kconfig.projbuild @@ -2,8 +2,8 @@ menu "Example Configuration" config EXAMPLE_BOARD_BUTTON_GPIO int "Boot Button GPIO" - default 0 if !IDF_TARGET_ESP32C3 - default 9 if IDF_TARGET_ESP32C3 + default 9 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6 + default 0 help GPIO number on which the "Boot" button is connected. This is generally used by the application for custom operations like toggling states, resetting to defaults, etc. diff --git a/examples/fan/partitions_4mb_optimised.csv b/examples/fan/partitions_4mb_optimised.csv new file mode 100644 index 0000000..6c33771 --- /dev/null +++ b/examples/fan/partitions_4mb_optimised.csv @@ -0,0 +1,11 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table +esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted +nvs_key, data, nvs_keys, 0xF000, 0x1000, encrypted +nvs, data, nvs, 0x10000, 0x6000, +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, 0x20000, 0x1E0000, +ota_1, app, ota_1, 0x200000, 0x1E0000, +reserved, 0x06, , 0x3E0000, 0x1A000, +fctry, data, nvs, 0x3FA000, 0x6000 diff --git a/examples/fan/sdkconfig.defaults.esp32c6 b/examples/fan/sdkconfig.defaults.esp32c6 new file mode 100644 index 0000000..0caf64c --- /dev/null +++ b/examples/fan/sdkconfig.defaults.esp32c6 @@ -0,0 +1,10 @@ +# +# Use partition table which makes use of flash to the fullest +# Can be used for other platforms as well. But please keep in mind that fctry partition address is +# different than default, and the new address needs to be specified to `rainmaker.py claim` +# +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv" + +# To accomodate security features +CONFIG_PARTITION_TABLE_OFFSET=0xc000 diff --git a/examples/gpio/main/Kconfig.projbuild b/examples/gpio/main/Kconfig.projbuild index 3465820..c6ced7b 100644 --- a/examples/gpio/main/Kconfig.projbuild +++ b/examples/gpio/main/Kconfig.projbuild @@ -2,15 +2,15 @@ menu "Example Configuration" config EXAMPLE_BOARD_BUTTON_GPIO int "Boot Button GPIO" - default 0 if !IDF_TARGET_ESP32C3 - default 9 if IDF_TARGET_ESP32C3 + default 9 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6 + default 0 help GPIO number on which the "Boot" button is connected. This is generally used by the application for custom operations like toggling states, resetting to defaults, etc. config EXAMPLE_OUTPUT_GPIO_RED int "Red GPIO" - default 2 + default 2 help Control digital RGB LEDs. Need to connect this GPIO to the red pin of the LED. diff --git a/examples/gpio/partitions_4mb_optimised.csv b/examples/gpio/partitions_4mb_optimised.csv new file mode 100644 index 0000000..6c33771 --- /dev/null +++ b/examples/gpio/partitions_4mb_optimised.csv @@ -0,0 +1,11 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table +esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted +nvs_key, data, nvs_keys, 0xF000, 0x1000, encrypted +nvs, data, nvs, 0x10000, 0x6000, +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, 0x20000, 0x1E0000, +ota_1, app, ota_1, 0x200000, 0x1E0000, +reserved, 0x06, , 0x3E0000, 0x1A000, +fctry, data, nvs, 0x3FA000, 0x6000 diff --git a/examples/gpio/sdkconfig.defaults.esp32c6 b/examples/gpio/sdkconfig.defaults.esp32c6 new file mode 100644 index 0000000..0caf64c --- /dev/null +++ b/examples/gpio/sdkconfig.defaults.esp32c6 @@ -0,0 +1,10 @@ +# +# Use partition table which makes use of flash to the fullest +# Can be used for other platforms as well. But please keep in mind that fctry partition address is +# different than default, and the new address needs to be specified to `rainmaker.py claim` +# +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv" + +# To accomodate security features +CONFIG_PARTITION_TABLE_OFFSET=0xc000 diff --git a/examples/homekit_switch/main/Kconfig.projbuild b/examples/homekit_switch/main/Kconfig.projbuild index 63f0340..e1fbf85 100644 --- a/examples/homekit_switch/main/Kconfig.projbuild +++ b/examples/homekit_switch/main/Kconfig.projbuild @@ -26,15 +26,15 @@ menu "Example Configuration" config EXAMPLE_BOARD_BUTTON_GPIO int "Boot Button GPIO" - default 0 if !IDF_TARGET_ESP32C3 - default 9 if IDF_TARGET_ESP32C3 + default 9 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6 + default 0 help GPIO number on which the "Boot" button is connected. This is generally used by the application for custom operations like toggling states, resetting to defaults, etc. config EXAMPLE_OUTPUT_GPIO int "Output GPIO" - default 19 + default 19 help This is an output GPIO that will be connected to a relay or other driver circuit in most cases. If the power changes, this GPIO output level will also change. diff --git a/examples/homekit_switch/partitions_4mb_optimised.csv b/examples/homekit_switch/partitions_4mb_optimised.csv new file mode 100644 index 0000000..bc70d00 --- /dev/null +++ b/examples/homekit_switch/partitions_4mb_optimised.csv @@ -0,0 +1,10 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table +esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted +nvs, data, nvs, 0x10000, 0x6000, +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, 0x20000, 0x1E0000, +ota_1, app, ota_1, 0x200000, 0x1E0000, +reserved, 0x06, , 0x3E0000, 0x1A000, +fctry, data, nvs, 0x3FA000, 0x6000 diff --git a/examples/homekit_switch/sdkconfig.defaults.esp32c6 b/examples/homekit_switch/sdkconfig.defaults.esp32c6 new file mode 100644 index 0000000..0caf64c --- /dev/null +++ b/examples/homekit_switch/sdkconfig.defaults.esp32c6 @@ -0,0 +1,10 @@ +# +# Use partition table which makes use of flash to the fullest +# Can be used for other platforms as well. But please keep in mind that fctry partition address is +# different than default, and the new address needs to be specified to `rainmaker.py claim` +# +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv" + +# To accomodate security features +CONFIG_PARTITION_TABLE_OFFSET=0xc000 diff --git a/examples/led_light/main/Kconfig.projbuild b/examples/led_light/main/Kconfig.projbuild index dfedefb..de0e2bf 100644 --- a/examples/led_light/main/Kconfig.projbuild +++ b/examples/led_light/main/Kconfig.projbuild @@ -2,8 +2,8 @@ menu "Example Configuration" config EXAMPLE_BOARD_BUTTON_GPIO int "Boot Button GPIO" - default 0 if !IDF_TARGET_ESP32C3 - default 9 if IDF_TARGET_ESP32C3 + default 9 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6 + default 0 help GPIO number on which the "Boot" button is connected. This is generally used by the application for custom operations like toggling states, resetting to defaults, etc. diff --git a/examples/led_light/partitions_4mb_optimised.csv b/examples/led_light/partitions_4mb_optimised.csv new file mode 100644 index 0000000..6c33771 --- /dev/null +++ b/examples/led_light/partitions_4mb_optimised.csv @@ -0,0 +1,11 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table +esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted +nvs_key, data, nvs_keys, 0xF000, 0x1000, encrypted +nvs, data, nvs, 0x10000, 0x6000, +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, 0x20000, 0x1E0000, +ota_1, app, ota_1, 0x200000, 0x1E0000, +reserved, 0x06, , 0x3E0000, 0x1A000, +fctry, data, nvs, 0x3FA000, 0x6000 diff --git a/examples/led_light/sdkconfig.defaults.esp32c6 b/examples/led_light/sdkconfig.defaults.esp32c6 new file mode 100644 index 0000000..0caf64c --- /dev/null +++ b/examples/led_light/sdkconfig.defaults.esp32c6 @@ -0,0 +1,10 @@ +# +# Use partition table which makes use of flash to the fullest +# Can be used for other platforms as well. But please keep in mind that fctry partition address is +# different than default, and the new address needs to be specified to `rainmaker.py claim` +# +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv" + +# To accomodate security features +CONFIG_PARTITION_TABLE_OFFSET=0xc000 diff --git a/examples/matter/README.md b/examples/matter/README.md index 48371f3..a0e2eb0 100644 --- a/examples/matter/README.md +++ b/examples/matter/README.md @@ -47,7 +47,7 @@ $ ./mfg_tool.py -v 0x131B -p 0x2 -cd $RMAKER_PATH/examples/matter/mfg/cd_131B_00 This not only generates the factory nvs binary required for matter, but also embeds the RainMaker MQTT Host url into it via the master.csv file. Optionally, you can embed the MQTT host into the firmware itself by using `idf.py menuconfig -> ESP RainMaker Config -> ESP_RMAKER_READ_MQTT_HOST_FROM_CONFIG` and then skipping the --csv and --mcsv options to mfg_tool -The factory binary generated above should be flashed onto the fctry partition (default : 0x3e0000, but check your partition table for exact address) +The factory binary generated above should be flashed onto the fctry partition (default : `0x3fa000` for ESP32-C6 and `0x3e0000` for other chips. Do check your partition table for exact address). ``` $ esptool.py write_flash 0x3e0000 $ESP_MATTER_PATH/tools/mfg_tool/out/131b_2//-partition.bin diff --git a/examples/matter/matter_controller/CMakeLists.txt b/examples/matter/matter_controller/CMakeLists.txt index f29a5b5..112acf9 100644 --- a/examples/matter/matter_controller/CMakeLists.txt +++ b/examples/matter/matter_controller/CMakeLists.txt @@ -19,6 +19,8 @@ if(NOT DEFINED ENV{ESP_MATTER_DEVICE_PATH}) set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c3_devkit_m) elseif("${IDF_TARGET}" STREQUAL "esp32s3") set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32s3_devkit_c) + elseif("${IDF_TARGET}" STREQUAL "esp32c6") + set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c6_devkit_c) else() message(FATAL_ERROR "Unsupported IDF_TARGET") endif() diff --git a/examples/matter/matter_light/CMakeLists.txt b/examples/matter/matter_light/CMakeLists.txt index cf2e617..54925df 100644 --- a/examples/matter/matter_light/CMakeLists.txt +++ b/examples/matter/matter_light/CMakeLists.txt @@ -19,6 +19,8 @@ if(NOT DEFINED ENV{ESP_MATTER_DEVICE_PATH}) set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c3_devkit_m) elseif("${IDF_TARGET}" STREQUAL "esp32s3") set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32s3_devkit_c) + elseif("${IDF_TARGET}" STREQUAL "esp32c6") + set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c6_devkit_c) else() message(FATAL_ERROR "Unsupported IDF_TARGET") endif() diff --git a/examples/matter/matter_light/partitions_4mb_optimised.csv b/examples/matter/matter_light/partitions_4mb_optimised.csv new file mode 100644 index 0000000..96a9764 --- /dev/null +++ b/examples/matter/matter_light/partitions_4mb_optimised.csv @@ -0,0 +1,11 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table +esp_secure_cert, 0x3F, ,0xd000, 0x2000, encrypted +nvs, data, nvs, 0x10000, 0x6000, +nvs_keys, data, nvs_keys,, 0x1000, encrypted +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, 0x20000, 0x1E0000, +ota_1, app, ota_1, 0x200000, 0x1E0000, +reserved, 0x06, , 0x3E0000, 0x1A000, +fctry, data, nvs, 0x3FA000, 0x6000 diff --git a/examples/matter/matter_light/sdkconfig.defaults.esp32c6 b/examples/matter/matter_light/sdkconfig.defaults.esp32c6 new file mode 100644 index 0000000..0caf64c --- /dev/null +++ b/examples/matter/matter_light/sdkconfig.defaults.esp32c6 @@ -0,0 +1,10 @@ +# +# Use partition table which makes use of flash to the fullest +# Can be used for other platforms as well. But please keep in mind that fctry partition address is +# different than default, and the new address needs to be specified to `rainmaker.py claim` +# +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv" + +# To accomodate security features +CONFIG_PARTITION_TABLE_OFFSET=0xc000 diff --git a/examples/matter/matter_switch/CMakeLists.txt b/examples/matter/matter_switch/CMakeLists.txt index 655c800..a47127d 100644 --- a/examples/matter/matter_switch/CMakeLists.txt +++ b/examples/matter/matter_switch/CMakeLists.txt @@ -19,6 +19,8 @@ if(NOT DEFINED ENV{ESP_MATTER_DEVICE_PATH}) set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c3_devkit_m) elseif("${IDF_TARGET}" STREQUAL "esp32s3") set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32s3_devkit_c) + elseif("${IDF_TARGET}" STREQUAL "esp32c6") + set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c6_devkit_c) else() message(FATAL_ERROR "Unsupported IDF_TARGET") endif() diff --git a/examples/matter/matter_switch/partitions_4mb_optimised.csv b/examples/matter/matter_switch/partitions_4mb_optimised.csv new file mode 100644 index 0000000..96a9764 --- /dev/null +++ b/examples/matter/matter_switch/partitions_4mb_optimised.csv @@ -0,0 +1,11 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table +esp_secure_cert, 0x3F, ,0xd000, 0x2000, encrypted +nvs, data, nvs, 0x10000, 0x6000, +nvs_keys, data, nvs_keys,, 0x1000, encrypted +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, 0x20000, 0x1E0000, +ota_1, app, ota_1, 0x200000, 0x1E0000, +reserved, 0x06, , 0x3E0000, 0x1A000, +fctry, data, nvs, 0x3FA000, 0x6000 diff --git a/examples/matter/matter_switch/sdkconfig.defaults.esp32c6 b/examples/matter/matter_switch/sdkconfig.defaults.esp32c6 new file mode 100644 index 0000000..0caf64c --- /dev/null +++ b/examples/matter/matter_switch/sdkconfig.defaults.esp32c6 @@ -0,0 +1,10 @@ +# +# Use partition table which makes use of flash to the fullest +# Can be used for other platforms as well. But please keep in mind that fctry partition address is +# different than default, and the new address needs to be specified to `rainmaker.py claim` +# +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv" + +# To accomodate security features +CONFIG_PARTITION_TABLE_OFFSET=0xc000 diff --git a/examples/multi_device/main/Kconfig.projbuild b/examples/multi_device/main/Kconfig.projbuild index 3f83b73..54eb2c1 100644 --- a/examples/multi_device/main/Kconfig.projbuild +++ b/examples/multi_device/main/Kconfig.projbuild @@ -2,15 +2,15 @@ menu "Example Configuration" config EXAMPLE_BOARD_BUTTON_GPIO int "Boot Button GPIO" - default 0 if !IDF_TARGET_ESP32C3 - default 9 if IDF_TARGET_ESP32C3 + default 9 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6 + default 0 help GPIO number on which the "Boot" button is connected. This is generally used by the application for custom operations like toggling states, resetting to defaults, etc. config EXAMPLE_OUTPUT_GPIO int "Output GPIO" - default 19 + default 19 help This is an output GPIO that will be connected to a relay or other driver circuit in most cases. If the power changes, this GPIO output level will also change. diff --git a/examples/multi_device/partitions_4mb_optimised.csv b/examples/multi_device/partitions_4mb_optimised.csv new file mode 100644 index 0000000..6c33771 --- /dev/null +++ b/examples/multi_device/partitions_4mb_optimised.csv @@ -0,0 +1,11 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table +esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted +nvs_key, data, nvs_keys, 0xF000, 0x1000, encrypted +nvs, data, nvs, 0x10000, 0x6000, +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, 0x20000, 0x1E0000, +ota_1, app, ota_1, 0x200000, 0x1E0000, +reserved, 0x06, , 0x3E0000, 0x1A000, +fctry, data, nvs, 0x3FA000, 0x6000 diff --git a/examples/multi_device/sdkconfig.defaults.esp32c6 b/examples/multi_device/sdkconfig.defaults.esp32c6 new file mode 100644 index 0000000..0caf64c --- /dev/null +++ b/examples/multi_device/sdkconfig.defaults.esp32c6 @@ -0,0 +1,10 @@ +# +# Use partition table which makes use of flash to the fullest +# Can be used for other platforms as well. But please keep in mind that fctry partition address is +# different than default, and the new address needs to be specified to `rainmaker.py claim` +# +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv" + +# To accomodate security features +CONFIG_PARTITION_TABLE_OFFSET=0xc000 diff --git a/examples/switch/main/Kconfig.projbuild b/examples/switch/main/Kconfig.projbuild index cd319b2..bdf738c 100644 --- a/examples/switch/main/Kconfig.projbuild +++ b/examples/switch/main/Kconfig.projbuild @@ -2,8 +2,8 @@ menu "Example Configuration" config EXAMPLE_BOARD_BUTTON_GPIO int "Boot Button GPIO" - default 0 if !IDF_TARGET_ESP32C3 - default 9 if IDF_TARGET_ESP32C3 + default 9 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6 + default 0 help GPIO number on which the "Boot" button is connected. This is generally used by the application for custom operations like toggling states, resetting to defaults, etc. @@ -15,10 +15,10 @@ menu "Example Configuration" Enable this option to test mobile push notifications. When enabled, turning on the switch using push button will trigger a parameter notification {"Switch":{"Power":true}} and turning off will trigger an alert "Switch was turned off". - + config EXAMPLE_OUTPUT_GPIO int "Output GPIO" - default 19 + default 19 help This is an output GPIO that will be connected to a relay or other driver circuit in most cases. If the power changes, this GPIO output level will also change. diff --git a/examples/switch/partitions_4mb_optimised.csv b/examples/switch/partitions_4mb_optimised.csv new file mode 100644 index 0000000..6c33771 --- /dev/null +++ b/examples/switch/partitions_4mb_optimised.csv @@ -0,0 +1,11 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table +esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted +nvs_key, data, nvs_keys, 0xF000, 0x1000, encrypted +nvs, data, nvs, 0x10000, 0x6000, +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, 0x20000, 0x1E0000, +ota_1, app, ota_1, 0x200000, 0x1E0000, +reserved, 0x06, , 0x3E0000, 0x1A000, +fctry, data, nvs, 0x3FA000, 0x6000 diff --git a/examples/switch/sdkconfig.defaults.esp32c6 b/examples/switch/sdkconfig.defaults.esp32c6 new file mode 100644 index 0000000..0caf64c --- /dev/null +++ b/examples/switch/sdkconfig.defaults.esp32c6 @@ -0,0 +1,10 @@ +# +# Use partition table which makes use of flash to the fullest +# Can be used for other platforms as well. But please keep in mind that fctry partition address is +# different than default, and the new address needs to be specified to `rainmaker.py claim` +# +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv" + +# To accomodate security features +CONFIG_PARTITION_TABLE_OFFSET=0xc000 diff --git a/examples/temperature_sensor/main/Kconfig.projbuild b/examples/temperature_sensor/main/Kconfig.projbuild index dfedefb..de0e2bf 100644 --- a/examples/temperature_sensor/main/Kconfig.projbuild +++ b/examples/temperature_sensor/main/Kconfig.projbuild @@ -2,8 +2,8 @@ menu "Example Configuration" config EXAMPLE_BOARD_BUTTON_GPIO int "Boot Button GPIO" - default 0 if !IDF_TARGET_ESP32C3 - default 9 if IDF_TARGET_ESP32C3 + default 9 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6 + default 0 help GPIO number on which the "Boot" button is connected. This is generally used by the application for custom operations like toggling states, resetting to defaults, etc. diff --git a/examples/temperature_sensor/partitions_4mb_optimised.csv b/examples/temperature_sensor/partitions_4mb_optimised.csv new file mode 100644 index 0000000..bc70d00 --- /dev/null +++ b/examples/temperature_sensor/partitions_4mb_optimised.csv @@ -0,0 +1,10 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table +esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted +nvs, data, nvs, 0x10000, 0x6000, +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, 0x20000, 0x1E0000, +ota_1, app, ota_1, 0x200000, 0x1E0000, +reserved, 0x06, , 0x3E0000, 0x1A000, +fctry, data, nvs, 0x3FA000, 0x6000 diff --git a/examples/temperature_sensor/sdkconfig.defaults.esp32c6 b/examples/temperature_sensor/sdkconfig.defaults.esp32c6 new file mode 100644 index 0000000..0caf64c --- /dev/null +++ b/examples/temperature_sensor/sdkconfig.defaults.esp32c6 @@ -0,0 +1,10 @@ +# +# Use partition table which makes use of flash to the fullest +# Can be used for other platforms as well. But please keep in mind that fctry partition address is +# different than default, and the new address needs to be specified to `rainmaker.py claim` +# +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv" + +# To accomodate security features +CONFIG_PARTITION_TABLE_OFFSET=0xc000