Skip to content

Commit 2ff2b43

Browse files
committed
Update RainMaker and components
1 parent 2d7218b commit 2ff2b43

File tree

434 files changed

+7258
-1989
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

434 files changed

+7258
-1989
lines changed

Diff for: platform.txt

+9-9
Large diffs are not rendered by default.

Diff for: tools/platformio-build-esp32.py

+30-29
Large diffs are not rendered by default.

Diff for: tools/platformio-build-esp32c3.py

+30-29
Large diffs are not rendered by default.

Diff for: tools/platformio-build-esp32s2.py

+30-29
Large diffs are not rendered by default.

Diff for: tools/platformio-build-esp32s3.py

+30-29
Large diffs are not rendered by default.

Diff for: tools/sdk/esp32/dio_qspi/include/sdkconfig.h

+25-22
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#define CONFIG_LIB_BUILDER_FLASHFREQ "80m"
5353
#define CONFIG_LIB_BUILDER_COMPILE 1
5454
#define CONFIG_ESP_RMAKER_ASSISTED_CLAIM 1
55+
#define CONFIG_ESP_RMAKER_USE_NVS 1
5556
#define CONFIG_ESP_RMAKER_CLAIM_TYPE 2
5657
#define CONFIG_ESP_RMAKER_MQTT_HOST "a1p72mufdu6064-ats.iot.us-east-1.amazonaws.com"
5758
#define CONFIG_ESP_RMAKER_MQTT_USE_BASIC_INGEST_TOPICS 1
@@ -70,6 +71,7 @@
7071
#define CONFIG_ESP_RMAKER_SKIP_VERSION_CHECK 1
7172
#define CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE 1024
7273
#define CONFIG_ESP_RMAKER_OTA_ROLLBACK_WAIT_PERIOD 90
74+
#define CONFIG_ESP_RMAKER_OTA_TIME_SUPPORT 1
7375
#define CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES 10
7476
#define CONFIG_ESP_RMAKER_SCENES_MAX_SCENES 10
7577
#define CONFIG_ESP_RMAKER_CMD_RESP_ENABLE 1
@@ -608,23 +610,6 @@
608610
#define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16
609611
#define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30
610612
#define CONFIG_WPA_MBEDTLS_CRYPTO 1
611-
#define CONFIG_IO_GLITCH_FILTER_TIME_MS 50
612-
#define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1
613-
#define CONFIG_ESP_RMAKER_MQTT_GLUE_LIB 1
614-
#define CONFIG_ESP_RMAKER_MQTT_PORT_443 1
615-
#define CONFIG_ESP_RMAKER_MQTT_PORT 1
616-
#define CONFIG_ESP_RMAKER_MQTT_SEND_USERNAME 1
617-
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_NAME "RMDev"
618-
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_VERSION "1x0"
619-
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_SKU "EX00"
620-
#define CONFIG_ESP_RMAKER_MQTT_USE_CERT_BUNDLE 1
621-
#define CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK 4096
622-
#define CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_PRIORITY 5
623-
#define CONFIG_ESP_RMAKER_FACTORY_PARTITION_NAME "fctry"
624-
#define CONFIG_ESP_RMAKER_FACTORY_NAMESPACE "rmaker_creds"
625-
#define CONFIG_ESP_RMAKER_DEF_TIMEZONE "Asia/Shanghai"
626-
#define CONFIG_ESP_RMAKER_SNTP_SERVER_NAME "pool.ntp.org"
627-
#define CONFIG_ESP_RMAKER_MAX_COMMANDS 10
628613
#define CONFIG_DIAG_LOG_MSG_ARG_FORMAT_TLV 1
629614
#define CONFIG_DIAG_LOG_MSG_ARG_MAX_SIZE 64
630615
#define CONFIG_DIAG_LOG_DROP_WIFI_LOGS 1
@@ -641,14 +626,27 @@
641626
#define CONFIG_ESP_INSIGHTS_TRANSPORT_HTTPS_HOST "https://client.insights.espressif.com"
642627
#define CONFIG_ESP_INSIGHTS_CLOUD_POST_MIN_INTERVAL_SEC 60
643628
#define CONFIG_ESP_INSIGHTS_CLOUD_POST_MAX_INTERVAL_SEC 240
629+
#define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1
630+
#define CONFIG_ESP_RMAKER_MQTT_GLUE_LIB 1
631+
#define CONFIG_ESP_RMAKER_MQTT_PORT_443 1
632+
#define CONFIG_ESP_RMAKER_MQTT_PORT 1
633+
#define CONFIG_ESP_RMAKER_MQTT_SEND_USERNAME 1
634+
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_NAME "RMDev"
635+
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_VERSION "1x0"
636+
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_SKU "EX00"
637+
#define CONFIG_ESP_RMAKER_MQTT_USE_CERT_BUNDLE 1
638+
#define CONFIG_ESP_RMAKER_MAX_MQTT_SUBSCRIPTIONS 10
639+
#define CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK 4096
640+
#define CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_PRIORITY 5
641+
#define CONFIG_ESP_RMAKER_FACTORY_PARTITION_NAME "fctry"
642+
#define CONFIG_ESP_RMAKER_FACTORY_NAMESPACE "rmaker_creds"
643+
#define CONFIG_ESP_RMAKER_DEF_TIMEZONE "Asia/Shanghai"
644+
#define CONFIG_ESP_RMAKER_SNTP_SERVER_NAME "pool.ntp.org"
645+
#define CONFIG_ESP_RMAKER_MAX_COMMANDS 10
644646
#define CONFIG_RTC_STORE_DATA_SIZE 3072
645647
#define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 2048
646648
#define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80
647-
#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1
648-
#define CONFIG_DSP_OPTIMIZED 1
649-
#define CONFIG_DSP_OPTIMIZATION 1
650-
#define CONFIG_DSP_MAX_FFT_SIZE_4096 1
651-
#define CONFIG_DSP_MAX_FFT_SIZE 4096
649+
#define CONFIG_IO_GLITCH_FILTER_TIME_MS 50
652650
#define CONFIG_OV7670_SUPPORT 1
653651
#define CONFIG_OV7725_SUPPORT 1
654652
#define CONFIG_NT99141_SUPPORT 1
@@ -677,6 +675,11 @@
677675
#define CONFIG_LITTLEFS_BLOCK_CYCLES 512
678676
#define CONFIG_LITTLEFS_USE_MTIME 1
679677
#define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1
678+
#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1
679+
#define CONFIG_DSP_OPTIMIZED 1
680+
#define CONFIG_DSP_OPTIMIZATION 1
681+
#define CONFIG_DSP_MAX_FFT_SIZE_4096 1
682+
#define CONFIG_DSP_MAX_FFT_SIZE 4096
680683

681684
/* List of deprecated options */
682685
#define CONFIG_A2DP_ENABLE CONFIG_BT_A2DP_ENABLE

Diff for: tools/sdk/esp32/dout_qspi/include/sdkconfig.h

+25-22
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#define CONFIG_LIB_BUILDER_FLASHFREQ "80m"
5353
#define CONFIG_LIB_BUILDER_COMPILE 1
5454
#define CONFIG_ESP_RMAKER_ASSISTED_CLAIM 1
55+
#define CONFIG_ESP_RMAKER_USE_NVS 1
5556
#define CONFIG_ESP_RMAKER_CLAIM_TYPE 2
5657
#define CONFIG_ESP_RMAKER_MQTT_HOST "a1p72mufdu6064-ats.iot.us-east-1.amazonaws.com"
5758
#define CONFIG_ESP_RMAKER_MQTT_USE_BASIC_INGEST_TOPICS 1
@@ -70,6 +71,7 @@
7071
#define CONFIG_ESP_RMAKER_SKIP_VERSION_CHECK 1
7172
#define CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE 1024
7273
#define CONFIG_ESP_RMAKER_OTA_ROLLBACK_WAIT_PERIOD 90
74+
#define CONFIG_ESP_RMAKER_OTA_TIME_SUPPORT 1
7375
#define CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES 10
7476
#define CONFIG_ESP_RMAKER_SCENES_MAX_SCENES 10
7577
#define CONFIG_ESP_RMAKER_CMD_RESP_ENABLE 1
@@ -608,23 +610,6 @@
608610
#define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16
609611
#define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30
610612
#define CONFIG_WPA_MBEDTLS_CRYPTO 1
611-
#define CONFIG_IO_GLITCH_FILTER_TIME_MS 50
612-
#define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1
613-
#define CONFIG_ESP_RMAKER_MQTT_GLUE_LIB 1
614-
#define CONFIG_ESP_RMAKER_MQTT_PORT_443 1
615-
#define CONFIG_ESP_RMAKER_MQTT_PORT 1
616-
#define CONFIG_ESP_RMAKER_MQTT_SEND_USERNAME 1
617-
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_NAME "RMDev"
618-
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_VERSION "1x0"
619-
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_SKU "EX00"
620-
#define CONFIG_ESP_RMAKER_MQTT_USE_CERT_BUNDLE 1
621-
#define CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK 4096
622-
#define CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_PRIORITY 5
623-
#define CONFIG_ESP_RMAKER_FACTORY_PARTITION_NAME "fctry"
624-
#define CONFIG_ESP_RMAKER_FACTORY_NAMESPACE "rmaker_creds"
625-
#define CONFIG_ESP_RMAKER_DEF_TIMEZONE "Asia/Shanghai"
626-
#define CONFIG_ESP_RMAKER_SNTP_SERVER_NAME "pool.ntp.org"
627-
#define CONFIG_ESP_RMAKER_MAX_COMMANDS 10
628613
#define CONFIG_DIAG_LOG_MSG_ARG_FORMAT_TLV 1
629614
#define CONFIG_DIAG_LOG_MSG_ARG_MAX_SIZE 64
630615
#define CONFIG_DIAG_LOG_DROP_WIFI_LOGS 1
@@ -641,14 +626,27 @@
641626
#define CONFIG_ESP_INSIGHTS_TRANSPORT_HTTPS_HOST "https://client.insights.espressif.com"
642627
#define CONFIG_ESP_INSIGHTS_CLOUD_POST_MIN_INTERVAL_SEC 60
643628
#define CONFIG_ESP_INSIGHTS_CLOUD_POST_MAX_INTERVAL_SEC 240
629+
#define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1
630+
#define CONFIG_ESP_RMAKER_MQTT_GLUE_LIB 1
631+
#define CONFIG_ESP_RMAKER_MQTT_PORT_443 1
632+
#define CONFIG_ESP_RMAKER_MQTT_PORT 1
633+
#define CONFIG_ESP_RMAKER_MQTT_SEND_USERNAME 1
634+
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_NAME "RMDev"
635+
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_VERSION "1x0"
636+
#define CONFIG_ESP_RMAKER_MQTT_PRODUCT_SKU "EX00"
637+
#define CONFIG_ESP_RMAKER_MQTT_USE_CERT_BUNDLE 1
638+
#define CONFIG_ESP_RMAKER_MAX_MQTT_SUBSCRIPTIONS 10
639+
#define CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK 4096
640+
#define CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_PRIORITY 5
641+
#define CONFIG_ESP_RMAKER_FACTORY_PARTITION_NAME "fctry"
642+
#define CONFIG_ESP_RMAKER_FACTORY_NAMESPACE "rmaker_creds"
643+
#define CONFIG_ESP_RMAKER_DEF_TIMEZONE "Asia/Shanghai"
644+
#define CONFIG_ESP_RMAKER_SNTP_SERVER_NAME "pool.ntp.org"
645+
#define CONFIG_ESP_RMAKER_MAX_COMMANDS 10
644646
#define CONFIG_RTC_STORE_DATA_SIZE 3072
645647
#define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 2048
646648
#define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80
647-
#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1
648-
#define CONFIG_DSP_OPTIMIZED 1
649-
#define CONFIG_DSP_OPTIMIZATION 1
650-
#define CONFIG_DSP_MAX_FFT_SIZE_4096 1
651-
#define CONFIG_DSP_MAX_FFT_SIZE 4096
649+
#define CONFIG_IO_GLITCH_FILTER_TIME_MS 50
652650
#define CONFIG_OV7670_SUPPORT 1
653651
#define CONFIG_OV7725_SUPPORT 1
654652
#define CONFIG_NT99141_SUPPORT 1
@@ -677,6 +675,11 @@
677675
#define CONFIG_LITTLEFS_BLOCK_CYCLES 512
678676
#define CONFIG_LITTLEFS_USE_MTIME 1
679677
#define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1
678+
#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1
679+
#define CONFIG_DSP_OPTIMIZED 1
680+
#define CONFIG_DSP_OPTIMIZATION 1
681+
#define CONFIG_DSP_MAX_FFT_SIZE_4096 1
682+
#define CONFIG_DSP_MAX_FFT_SIZE 4096
680683

681684
/* List of deprecated options */
682685
#define CONFIG_A2DP_ENABLE CONFIG_BT_A2DP_ENABLE

Diff for: tools/sdk/esp32/include/esp_littlefs/include/esp_littlefs.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
extern "C" {
99
#endif
1010

11-
#define ESP_LITTLEFS_VERSION_NUMBER "1.5.1"
11+
#define ESP_LITTLEFS_VERSION_NUMBER "1.5.3"
1212
#define ESP_LITTLEFS_VERSION_MAJOR 1
1313
#define ESP_LITTLEFS_VERSION_MINOR 5
14-
#define ESP_LITTLEFS_VERSION_PATCH 1
14+
#define ESP_LITTLEFS_VERSION_PATCH 3
1515

1616
/**
1717
*Configuration structure for esp_vfs_littlefs_register.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
#pragma once
7+
#include "esp_err.h"
8+
#include "soc/soc_caps.h"
9+
10+
#ifdef SOC_HMAC_SUPPORTED
11+
#include "esp_hmac.h"
12+
/*
13+
* @info
14+
* PBKDF2_hmac- password based key derivation function based on HMAC.
15+
* The API acts as a password based key derivation function by using the hardware HMAC peripheral present on the SoC. The hmac key shall be used from the efuse key block provided as the hmac_key_id. The API makes use of the hardware HMAC peripheral and hardware SHA peripheral present on the SoC. The SHA operation is limited to SHA256.
16+
* @input
17+
* hmac_key_id The efuse_key_id in which the HMAC key has already been burned.
18+
* This key should be read and write protected for its protection. That way it can only be accessed by the hardware HMAC peripheral.
19+
* salt The buffer containing the salt value
20+
* salt_len The length of the salt in bytes
21+
* key_length The expected length of the derived key.
22+
* iteration_count The count for which the internal cryptographic operation shall be repeated.
23+
* output The pointer to the buffer in which the derived key shall be stored. It must of a writable buffer of size key_length bytes
24+
*
25+
*/
26+
int esp_pbkdf2_hmac_sha256(hmac_key_id_t hmac_key_id, const unsigned char *salt, size_t salt_len,
27+
size_t iteration_count, size_t key_length, unsigned char *output);
28+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
#pragma once
7+
#include "esp_err.h"
8+
9+
#include "soc/soc_caps.h"
10+
#ifdef CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL
11+
#include "rsa_sign_alt.h"
12+
#endif
13+
14+
#ifdef __cplusplus
15+
extern "C"
16+
{
17+
#endif
18+
19+
/* @info
20+
* Init the esp_secure_cert nvs partition
21+
*
22+
* @return
23+
* - ESP_OK On success
24+
* - ESP_FAIL/other relevant esp error code
25+
* On failure
26+
*/
27+
esp_err_t esp_secure_cert_init_nvs_partition(void);
28+
29+
/* @info
30+
* Get the device cert from the esp_secure_cert partition
31+
*
32+
* @note
33+
* If your esp_secure_cert partition is of type NVS, the API will dynamically allocate
34+
* the required memory to store the device cert and return the pointer.
35+
* The pointer can be freed in this case (NVS) using respective free API
36+
*
37+
* In case of cust_flash partition, a read only flash pointer shall be returned here. This pointer should not be freed
38+
*
39+
* @params
40+
* - buffer(out) This value shall be filled with the device cert address
41+
* on successful completion
42+
* - len(out) This value shall be filled with the length of the device cert
43+
* If your esp_secure_cert partition is of type NVS, the API will dynamically allocate
44+
* the required memory to store the device cert
45+
*
46+
* In case of cust_flash partition, a read only flash pointer shall be returned here.
47+
* @return
48+
* - ESP_OK On success
49+
* - ESP_FAIL/other relevant esp error code
50+
* On failure
51+
*/
52+
esp_err_t esp_secure_cert_get_device_cert(char **buffer, uint32_t *len);
53+
54+
/*
55+
* Free any internally allocated resources for the device cert.
56+
* @note
57+
* This API would free the memory if it is dynamically allocated
58+
*
59+
* @params
60+
* - buffer(in) The data pointer
61+
* This pointer should be the same one which has been obtained
62+
* through "esp_secure_cert_get_device_cert" API.
63+
*/
64+
esp_err_t esp_secure_cert_free_device_cert(char *buffer);
65+
66+
/* @info
67+
* Get the ca cert from the esp_secure_cert partition
68+
*
69+
* @note
70+
* The API shall dynamically allocate the memory if required.
71+
* The dynamic allocation of memory shall be required in following cases:
72+
* 1) partition type is NVS
73+
* 2) HMAC encryption is enabled for the API needs to be called
74+
*
75+
* The esp_secure_cert_free_ca_cert API needs to be called in order to free the memory.
76+
* The API shall only free the memory if it has been dynamically allocated.
77+
*
78+
* @params
79+
* - buffer(out) This value shall be filled with the ca cert address
80+
* on successful completion
81+
* - len(out) This value shall be filled with the length of the ca cert
82+
* If your esp_secure_cert partition is of type NVS, the API will dynamically allocate
83+
* the required memory to store the ca cert
84+
*
85+
* In case of cust_flash partition, a read only flash pointer shall be returned here.
86+
* @return
87+
* - ESP_OK On success
88+
* - ESP_FAIL/other relevant esp error code
89+
* On failure
90+
*/
91+
esp_err_t esp_secure_cert_get_ca_cert(char **buffer, uint32_t *len);
92+
93+
/*
94+
* Free any internally allocated resources for the ca cert.
95+
* @note
96+
* This API would free the memory if it is dynamically allocated
97+
*
98+
* @params
99+
* - buffer(in) The data pointer
100+
* This pointer should be the same one which
101+
* has been obtained through "esp_secure_cert_get_ca_cert" API.
102+
*/
103+
esp_err_t esp_secure_cert_free_ca_cert(char *buffer);
104+
105+
#ifndef CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL
106+
/* @info
107+
* Get the private key from the esp_secure_cert partition
108+
*
109+
* @note
110+
* The API shall dynamically allocate the memory if required.
111+
* The dynamic allocation of memory shall be required in following cases:
112+
* 1) partition type is NVS
113+
* 2) HMAC encryption is enabled for the API needs to be called
114+
*
115+
* The esp_secure_cert_free_priv_key API needs to be called in order to free the memory.
116+
* The API shall only free the memory if it has been dynamically allocated.
117+
*
118+
* @params
119+
* - buffer(out) This value shall be filled with the private key address
120+
* on successful completion
121+
* - len(out) This value shall be filled with the length of the private key
122+
*
123+
*
124+
* @return
125+
* - ESP_OK On success
126+
* - ESP_FAIL/other relevant esp error code
127+
* On failure
128+
*/
129+
esp_err_t esp_secure_cert_get_priv_key(char **buffer, uint32_t *len);
130+
131+
/*
132+
* Free any internally allocated resources for the priv key.
133+
* @note
134+
* This API would free the memory if it is dynamically allocated
135+
*
136+
* @params
137+
* - buffer(in) The data pointer
138+
* This pointer should be the same one which
139+
* has been obtained through "esp_secure_cert_get_priv_key" API.
140+
*/
141+
esp_err_t esp_secure_cert_free_priv_key(char *buffer);
142+
143+
#else /* !CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL */
144+
/* @info
145+
* This function returns the flash esp_ds_context which can then be
146+
* directly provided to an esp-tls connection through its config structure.
147+
* The memory for the context is dynamically allocated.
148+
*
149+
* @params
150+
* - ds_ctx The pointer to the DS context
151+
* @return
152+
* - NULL On failure
153+
*/
154+
esp_ds_data_ctx_t *esp_secure_cert_get_ds_ctx(void);
155+
156+
/*
157+
*@info
158+
* Free the ds context
159+
*/
160+
void esp_secure_cert_free_ds_ctx(esp_ds_data_ctx_t *ds_ctx);
161+
#endif /* CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL */
162+
163+
#ifdef __cplusplus
164+
}
165+
#endif

0 commit comments

Comments
 (0)