diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f3a31fac57..c5c0b2cc16e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,11 +89,6 @@ set(LIBRARY_SRCS libraries/I2S/src/I2S.cpp libraries/NetBIOS/src/NetBIOS.cpp libraries/Preferences/src/Preferences.cpp - libraries/RainMaker/src/RMaker.cpp - libraries/RainMaker/src/RMakerNode.cpp - libraries/RainMaker/src/RMakerParam.cpp - libraries/RainMaker/src/RMakerDevice.cpp - libraries/RainMaker/src/RMakerType.cpp libraries/SD_MMC/src/SD_MMC.cpp libraries/SD/src/SD.cpp libraries/SD/src/sd_diskio.cpp @@ -183,7 +178,6 @@ set(includedirs libraries/I2S/src libraries/NetBIOS/src libraries/Preferences/src - libraries/RainMaker/src libraries/SD_MMC/src libraries/SD/src libraries/SimpleBLE/src @@ -238,10 +232,6 @@ endfunction() maybe_add_component(esp-dsp) -if(IDF_TARGET MATCHES "esp32" AND CONFIG_ESP_RMAKER_TASK_STACK) - maybe_add_component(esp_rainmaker) - maybe_add_component(qrcode) -endif() if(IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED) maybe_add_component(arduino_tinyusb) endif() diff --git a/boards.txt b/boards.txt index d977ee6a7eb..2a1fbf7022d 100755 --- a/boards.txt +++ b/boards.txt @@ -54,6 +54,7 @@ esp32s3.build.flash_size=4MB esp32s3.build.flash_freq=80m esp32s3.build.flash_mode=dio esp32s3.build.boot=qio +esp32s3.build.boot_freq=80m esp32s3.build.partitions=default esp32s3.build.defines= esp32s3.build.loop_core= @@ -82,21 +83,25 @@ esp32s3.menu.PSRAM.opi.build.psram_type=opi esp32s3.menu.FlashMode.qio=QIO 80MHz esp32s3.menu.FlashMode.qio.build.flash_mode=dio esp32s3.menu.FlashMode.qio.build.boot=qio +esp32s3.menu.FlashMode.qio.build.boot_freq=80m esp32s3.menu.FlashMode.qio.build.flash_freq=80m esp32s3.menu.FlashMode.qio.build.flash_type=qspi esp32s3.menu.FlashMode.qio120=QIO 120MHz esp32s3.menu.FlashMode.qio120.build.flash_mode=dio esp32s3.menu.FlashMode.qio120.build.boot=qio -esp32s3.menu.FlashMode.qio120.build.flash_freq=120m +esp32s3.menu.FlashMode.qio120.build.boot_freq=120m +esp32s3.menu.FlashMode.qio120.build.flash_freq=80m esp32s3.menu.FlashMode.qio120.build.flash_type=qspi esp32s3.menu.FlashMode.dio=DIO 80MHz esp32s3.menu.FlashMode.dio.build.flash_mode=dio esp32s3.menu.FlashMode.dio.build.boot=dio +esp32s3.menu.FlashMode.dio.build.boot_freq=80m esp32s3.menu.FlashMode.dio.build.flash_freq=80m esp32s3.menu.FlashMode.dio.build.flash_type=qspi esp32s3.menu.FlashMode.opi=OPI 80MHz esp32s3.menu.FlashMode.opi.build.flash_mode=dout esp32s3.menu.FlashMode.opi.build.boot=opi +esp32s3.menu.FlashMode.opi.build.boot_freq=80m esp32s3.menu.FlashMode.opi.build.flash_freq=80m esp32s3.menu.FlashMode.opi.build.flash_type=opi @@ -107,8 +112,8 @@ esp32s3.menu.FlashSize.8M.build.flash_size=8MB esp32s3.menu.FlashSize.8M.build.partitions=default_8MB esp32s3.menu.FlashSize.16M=16MB (128Mb) esp32s3.menu.FlashSize.16M.build.flash_size=16MB -esp32s3.menu.FlashSize.32M=32MB (256Mb) -esp32s3.menu.FlashSize.32M.build.flash_size=32MB +#esp32s3.menu.FlashSize.32M=32MB (256Mb) +#esp32s3.menu.FlashSize.32M.build.flash_size=32MB esp32s3.menu.LoopCore.1=Core 1 esp32s3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 diff --git a/libraries/RainMaker/README.md b/libraries/RainMaker/README.md deleted file mode 100644 index 03f5e4c520a..00000000000 --- a/libraries/RainMaker/README.md +++ /dev/null @@ -1,483 +0,0 @@ -# ESP RainMaker library for Arduino -This library allows to work with ESP RainMaker. - -ESP RainMaker is an end-to-end solution offered by Espressif to enable remote control and monitoring for ESP32-S2 and ESP32 based products without any configuration required in the Cloud. The primary components of this solution are: - -- Claiming Service (to get the Cloud connectivity credentials) -- RainMaker library (i.e. this library, to develop the firmware) -- RainMaker Cloud (backend, offering remote connectivity) -- RainMaker Phone App/CLI (Client utilities for remote access) - -The key features of ESP RainMaker are: - -1. Ability to define own devices and parameters, of any type, in the firmware. -2. Zero configuration required on the Cloud. -3. Phone apps that dynamically render the UI as per the device information. - -This ESP RainMaker library is built using esp-rainmaker component. - -#### Repository Source - -- [ESP RainMaker](https://github.com/espressif/esp-rainmaker) - -## Phone Apps - -#### Android - -- [Google PlayStore](https://play.google.com/store/apps/details?id=com.espressif.rainmaker) -- [Direct APK](https://github.com/espressif/esp-rainmaker/wiki) -- [Source Code](https://github.com/espressif/esp-rainmaker-android) - -#### iOS -- [Apple App Store](https://apps.apple.com/app/esp-rainmaker/id1497491540) -- [Source Code](https://github.com/espressif/esp-rainmaker-ios) - -## Documentation - -Additional information about ESP RainMaker can be found [here](https://rainmaker.espressif.com/) - -NOTE : ESP RainMaker library is currently supported for ESP32 board only. - -## ESP RainMaker Agent API - -### RMaker.initNode() -This initializes the ESP RainMaker agent, wifi and creates the node. -``` -Node initNode(const char *name, const char *type); -``` -* **Parameters** -1. `name`: Name of the node -2. `type`: Type of the node - -* **Return** -1. Object of Node. - -* You can also set the configuration of the node using the following API - 1. RMaker.setTimeSync(bool val) -> NOTE: If you want to set the configuration for the node then these configuration API must be called before `RMaker.initNode()`. - -### RMaker.start() -It starts the ESP RainMaker agent. -``` -esp_err_t start() -``` -* **Return** -1. ESP_OK : On success -2. Error in case of failure - -> NOTE : -> 1. ESP RainMaker agent should be initialized before this call. -> 2. Once ESP RainMaker agent starts, compulsorily call WiFi.beginProvision() API. - -### RMaker.stop() -It stops the ESP RainMaker agent which was started using `RMaker.start()`. -``` -esp_err_t stop() -``` -* **Return** -1. ESP_OK : On success -2. Error in case of failure - -### RMaker.deinitNode() -It deinitializes the ESP RainMaker agent and the node created using `RMaker.initNode()`. -``` -esp_err_t deinitNode(Node node) -``` -* **Parameter** -1. `node` : Node object created using `RMaker.initNode()` -* **Return** -1. ESP_OK : On success -2. Error in case of failure - -### RMaker.enableOTA() -It enables OTA as per the ESP RainMaker Specification. For more details refer ESP RainMaker documentation. check [here](https://rainmaker.espressif.com/docs/ota.html) -``` -esp_err_t enableOTA(ota_type_t type); -``` -* **Parameter** -1. `type` : The OTA workflow type. - - OTA_USING_PARAMS - - OTA_USING_TOPICS -* **Return** -1. ESP_OK : On success -2. Error in case of failure - -### RMaker.enableSchedule() -This API enables the scheduling service for the node. For more information, check [here](https://rainmaker.espressif.com/docs/scheduling.html). -``` -esp_err_t enableSchedule(); -``` -* **Return** -1. ESP_OK : On success -2. Error in case of failure - -### RMaker.setTimeZone() -This API set's the timezone as a user friendly location string. Check [here](https://rainmaker.espressif.com/docs/time-service.html) for a list of valid values. -``` -esp_err_t setTimeZone(const char *tz); -``` -* **Parameter** -1. `tz' : Valid values as specified in documentation. - -* **Return** -1. ESP_OK : On success -2. Error in case of failure -> NOTE : default value is "Asia/Shanghai". -> This API comes into picture only when working with scheduling. - -## ESP RainMaker NODE APIs -`Node` class expose API's for node. -> NOTE : my_node is the object of Node class. - -### my_node.getNodeID() -It returns the unique node_id assigned to the node. This node_id is usually the MAC address of the board. -``` -char * getNodeID() -``` -* **Return** -1. `char * ` : Pointer to a NULL terminated node_id string. - -### my_node.getNodeInfo() -It returns pointer to the node_info_t as configured during node initialisation. -``` -node_info_t * getNodeInfo(); -``` -* **Return** -1. `node_info_t` : Pointer to the structure node_info_t on success. -2. `NULL` : On failure. - -* **ESP RainMaker node info** -It has following data member -1. char * name -2. char * type -3. char * fw_version -4. char * model - -### my_node.addNodeAttr() -It adds a new attribute as the metadata to the node. -``` -esp_err_t addNodeAttr(const char *attr_name, const char *val); -``` -* **Parameters** -1. `attr_name` : Name of the attribute -2. `val` : Value of the attribute - -* **Return** -1. `ESP_OK` : On success -2. Error in case of failure - -> NOTE : Only string values are allowed. - -### my_node.addDevice() -It adds a device to the node. -``` -esp_err_t addDevice(Device device); -``` -* **Parameter** -1. `device` : Device object - -* **Return** -1. `ESP_OK` : On success -2. Error in case of failure - -> NOTE : -> - This is the mandatory API to register device to node. -> - Single Node can have multiple devices. -> - Device name should be unique for each device. - -### my_node.removeDevice() -It removes a device from the node. -``` -esp_err_t removeDevice(Device device); -``` -* **Parameter** -1. `device` : Device object - -* **Return** -1. `ESP_OK` : On success -2. Error in case of failure - -## ESP RainMaker DEVICE API's -`Device` class expose API's for virtual devices on the node. -Parameterized constructor is defined which creates the virtual device on the node. Using Device class object you can create your own device. -> NOTE : my_device is the object of Device class -``` -Device my_device(const char *dev_name, const char *dev_type, void *priv_data); -``` -* **Parameters** -1. `dev_name` : Unique device name -2. `dev_type` : Optional device type. It can be kept NULL. - * Standard Device Types - * ESP_RMAKER_DEVICE_SWITCH - * ESP_RMAKER_DEVICE_LIGHTBULB - * ESP_RMAKER_DEVICE_FAN - * ESP_RMAKER_DEVICE_TEMP_SENSOR -3. `priv_data` : Private data associated with the device. This will be passed to the callbacks. - -> NOTE : This created device should be added to the node using `my_node.addDevice(my_device)`. - -- Sample example -``` -Device my_device("Switch"); -Device my_device("Switch1", NULL, NULL); -``` -> Here, dev_name is compulsory, rest are optional. -> Node can have multiple device, each device should have unique device name. - -### Standard Device -- Classes are defined for the standard devices. -- Creating object of these class creates the standard device with default parameters to it. -- Class for standard devices - * Switch - * LightBulb - * TemperatureSensor - * Fan -``` -Switch my_switch(const char *dev_name, void *priv_data, bool power); -``` -* **Parameters** -1. `dev_name` : Unique device name by default it is "switch" for switch device. -2. `priv_data` : Private data associated with the device. This will be passed to the callbacks. -3. `power` : It is the value that can be set for primary parameter. - -- Sample example for standard device. -``` -Switch switch1; -Switch switch2("switch2", NULL, true); -``` -`"switch2"` : Name for standard device. - -`NULL` : Private data for the device, which will be used in callback. - -`true` : Default value for the primary param, in case of switch it is power. - -> NOTE : No parameter are compulsory for standard devices. However if you are creating two objects of same standard class then in that case you will have to set the device name, if not then both device will have same name which is set by default, hence device will not get create. Device name should be unique for each device. - -### my_device.getDeviceName() -It returns the name of the Device. -``` -const char * getDeviceName(); -``` -* **Return** -1. `char *`: Returns Device name. - -> NOTE : Each device on the node should have unique device name. - -### my_device.addDeviceAttr() -It adds attribute to the device. Device attributes are reported only once after a boot-up as part of the node configuration. Eg. Serial Number -``` -esp_err_t addDeviceAttr(const char *attr_name, const char *val); -``` -* **Parameters** -1. `attr_name` : Name of the attribute -2. `val` : Value of the attribute - -* **Return** -1. `ESP_OK` : On success -2. Error in case of failure - -### my_device.deleteDevice() -It deletes the device created using parameterized constructor. This device should be first removed from the node using `my_node.removeDevice(my_device)`. -``` -esp_err_t deleteDevice(); -``` -* **Return** -1. `ESP_OK` : On success -2. Error in case of failure - -### my_device.addXParam() -It adds standard parameter to the device. -> NOTE : X is the default name by which parameter is referred, you can specify your own name to each parameter. - -> Default - -> Eg. `my_device.addPowerParam(true)` here power parameter is referred with name Power. -> Eg. `my_device.addHueParam(12)` here hue parameter is referred with name Hue. - -> You can specify your own name to each parameter - -> Eg. `my_device.addNameParam("NickName")` here name parameter is referred with name NickName. -> Eg. `my_device.addPowerParam(true, "FanPower")` here power parameter is referred with name FanPower. - -``` -esp_err_t addNameParam(const char *param_name = ESP_RMAKER_DEF_NAME_PARAM); -esp_err_t addPowerParam(bool val, const char *param_name = ESP_RMAKER_DEF_POWER_NAME); -esp_err_t addBrightnessParam(int val, const char *param_name = ESP_RMAKER_DEF_BRIGHTNESS_NAME); -esp_err_t addHueParam(int val, const char *param_name = ESP_RMAKER_DEF_HUE_NAME); -esp_err_t addSaturationParam(int val, const char *param_name = ESP_RMAKER_DEF_SATURATION_NAME); -esp_err_t addIntensityParam(int val, const char *param_name = ESP_RMAKER_DEF_INTENSITY_NAME); -esp_err_t addCCTParam(int val, const char *param_name = ESP_RMAKER_DEF_CCT_NAME); -esp_err_t addDirectionParam(int val, const char *param_name = ESP_RMAKER_DEF_DIRECTION_NAME); -esp_err_t addSpeedParam(int val, const char *param_name = ESP_RMAKER_DEF_SPEED_NAME); -esp_err_t addTempratureParam(float val, const char *param_name = ESP_RMAKER_DEF_TEMPERATURE_NAME); -``` -* **Standard Parameters** - -* These are the standard parameters. - * Name : ESP_RMAKER_DEF_NAME_PARAM - * Power : ESP_RMAKER_DEF_POWER_NAME - * Brightness : ESP_RMAKER_DEF_BRIGHTNESS_NAME - * Hue : ESP_RMAKER_DEF_HUE_NAME - * Saturation : ESP_RMAKER_DEF_SATURATION_NAME - * Intensity : ESP_RMAKER_DEF_INTENSITY_NAME - * CCT : ESP_RMAKER_DEF_CCT_NAME - * Direction : ESP_RMAKER_DEF_DIRECTION_NAME - * Speed : ESP_RMAKER_DEF_SPEED_NAME - * Temperature : ESP_RMAKER_DEF_TEMPERATURE_NAME -> NOTE : Care should be taken while accessing name of parameter. Above mentioned are the two ways using which default name of parameters can be accessed. Either LHS or RHS. - -### my_device.assignPrimaryParam() -It assigns a parameter (already added using addXParam() or addParam()) as a primary parameter, which can be used by clients (phone apps specifically) to give prominence to it. -``` -esp_err_t assignPrimaryParam(param_handle_t *param); -``` -* **Parameter** -1. `param` : Handle of the parameter. It is obtained using `my_device.getParamByName()`. -``` -param_handle_t * getParamByName(const char *param_name); -``` -> NOTE : -> `param_name` : It is the name of the parameter which was added using addXparam() or addParam(). - -### my_device.addParam() -It allows user to add custom parameter to the device created using `Param` class. -``` -esp_err_t addParam(Param parameter); -``` -* **Parameter** -1. `parameter` : Object of Param - -* **Return** -1. ESP_OK : On success -2. Error in case of failure -> NOTE : Param class exposes API's to create the custom parameter. - -### my_device.updateAndReportParam() -It updates the parameter assosicated with particular device on ESP RainMaker cloud. -``` -esp_err_t updateAndReportParam(const char *param_name, value); -``` -* **Parameters** -1. `param_name` : Name of the parameter -2. `value` : Value to be updated. It can be int, bool, char * , float. - -* **Return** -1. `ESP_OK` : On success -2. Error in case of failure - -### my_device.addCb() -It registers read and write callback for the device which will be invoked as per requests received from the cloud (or other paths as may be added in future). -``` -void addCb(deviceWriteCb write_cb, deviceReadCb read_cb); -``` -* **Parameters** -1. `write_cb` : Function with signature [ func_name(Device *device, Param *param, const param_val_t val, void *priv_data, write_ctx_t *ctx); ] -2. `read_cb` : Function with signature [ func_name(Device *device, Param *param, void *priv_data, read_ctx_t *ctx); ] - -* **param_val_t val** -Value can be accessed as below -1. `bool` : val.val.b -2. `integer` : val.val.i -3. `float` : val.val.f -4. `char *` : val.val.s - -## ESP RainMaker PARAM API's -`Param` class expose API's for creating custom parameters for the devices and report and update values associated with parameter to the ESP RainMaker cloud. Parameterized constructor is defined which creates custom parameter. -> NOTE : my_param is the object of Param class. - -``` -Param my_param(const char *param_name, const char *param_type, param_val_t val, uint8_t properties); -``` -* **Parameters** -1. `param_name` : Name of the parameter -2. `param_type` : Type of the parameter. It is optional can be kept NULL. -3. `val` : Define the default value for the parameter. It should be defined using `value(int ival)` , `value(bool bval)` , `value(float fval)` , `value(char *sval)`. -4. `properties` : Properties of the parameter, which will be a logical OR of flags. - * Flags - * PROP_FLAG_WRITE - * PROP_FLAG_READ - * PROP_FLAG_TIME_SERIES - * PROP_FLAG_PERSIST - -`Sample example : Param my_param("bright", NULL, value(30), PROP_FLAG_READ | PROP_FLAG_WRITE | PROP_FLAG_PERSIST);` -> NOTE : Parameter created using Param class should be added to the device using `my_device.addParam(my_param);` - -### my_param.addUIType() -Add a UI type to the parameter. This will be used by the Phone apps (or other clients) to render appropriate UI for the given parameter. Please refer the RainMaker documentation [here](https://rainmaker.espressif.com/docs/standard-types.html#ui-elements) for supported UI Types. -``` -esp_err_t addUIType(const char *ui_type); -``` -* **Paramter** -1. `ui_type` : String describing the UI Type. - * Standard UI Types - * ESP_RMAKER_UI_TOGGLE - * ESP_RMAKER_UI_SLIDER - * ESP_RMAKER_UI_DROPDOWN - * ESP_RMAKER_UI_TEXT - -* **Returns** -1. ESP_OK : On success. -2. Error in case of failure. - -### my_param.addBounds() -Add bounds for an integer/float parameter. This can be used to add bounds (min/max values) for a given integer/float parameter. Eg. brightness will have bounds as 0 and 100 if it is a percentage. -``` -esp_err_t addBounds(param_val_t min, param_val_t max, param_val_t step); -``` -* **Parameters** -1. `min` : Minimum value -2. `max` : Maximum value -3. `step` : step Minimum stepping - -* **Returns** -1. ESP_OK : On success. -2. Error in case of failure. - -`Sample example : my_param.addBounds(value(0), value(100), value(5));` - -### my_param.updateAndReport() -It updates the parameter and report it to ESP RainMaker cloud. This is called in callback. -``` -esp_err_t updateAndReport(param_val_t val); -``` -* **Parameters** -1. `val` : New value of the parameter - -* **Return** -1. ESP_OK : On success. -2. Error in case of failure. - -> NOTE : -> - This API should always be called inside device write callback, if you aimed at updating n reporting parameter values, changed via RainMaker Client (Phone App), to the ESP RainMaker cloud. -> - If not called then paramter values will not be updated to the ESP RainMaker cloud. - -### printQR() -This API displays QR code, which is used in provisioning. -``` -printQR(const char *serv_name, const char *pop, const char *transport); -``` -* **Parameters** -1. `name` : Service name used in provisioning API. -2. `pop` : Proof of posession used in provisioning API. -3. `transport` : - 1. `softap` : In case of provisioning using SOFTAP. - 2. `ble` : In case of provisioning using BLE. - -### RMakerFactoryReset() -Reset the device to factory defaults. - -``` -RMakerFactoryReset(2); -``` -* **Parameters** -1. `seconds` : Time in seconds after which the chip should reboot after doing a factory reset. - - -### RMakerWiFiReset() -Reset Wi-Fi credentials. -``` -RMakerWiFiReset(2); -``` - -* **Parameters** -1. `seconds` : Time in seconds after which the chip should reboot after doing a Wi-Fi reset. diff --git a/libraries/RainMaker/examples/README.md b/libraries/RainMaker/examples/README.md deleted file mode 100644 index 6c5bded09ac..00000000000 --- a/libraries/RainMaker/examples/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# ESP RainMaker Examples - -While building any examples for ESP RainMaker, take care of the following: -1. Change partition scheme in Arduino IDE to RainMaker (Tools -> Partition Scheme -> RainMaker). -2. Once ESP RainMaker gets started, compulsorily call `WiFi.beginProvision()` which is responsible for user-node mapping. -3. Use appropriate provisioning scheme as per the board. - - ESP32 Board: BLE Provisioning - - ESP32S2 Board: SoftAP Provisioning -4. Set debug level to Info (Tools -> Core Debug Level -> Info). This is recommended, but not mandatory. - diff --git a/libraries/RainMaker/examples/RMakerCustom/.skip.esp32c3 b/libraries/RainMaker/examples/RMakerCustom/.skip.esp32c3 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/libraries/RainMaker/examples/RMakerCustom/.skip.esp32s2 b/libraries/RainMaker/examples/RMakerCustom/.skip.esp32s2 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/libraries/RainMaker/examples/RMakerCustom/.skip.esp32s3 b/libraries/RainMaker/examples/RMakerCustom/.skip.esp32s3 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/libraries/RainMaker/examples/RMakerCustom/README.md b/libraries/RainMaker/examples/RMakerCustom/README.md deleted file mode 100644 index 42c998d49c4..00000000000 --- a/libraries/RainMaker/examples/RMakerCustom/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# ESP RainMaker Custom Device - -This example demonstrates how to build a custom device to be used with ESP RainMaker. - -## What to expect in this example? - -- This example sketch uses the on board Boot button and GPIO16 to demonstrate an ESP RainMaker AC dimmer device. -- After compiling and flashing the example, add your device using the [ESP RainMaker phone apps](https://rainmaker.espressif.com/docs/quick-links.html#phone-apps) by scanning the QR code. -- Toggling the state from the phone app will toggle the dimmer state (GPIO16). -- Pressing the Boot button will toggle the dimmer state (GPIO16) and the same will reflect on the phone app. -- You can also change the Level from the phone app and see it reflect on the device as a print message. - -### Output - -``` -[ 87][I][RMaker.cpp:13] event_handler(): RainMaker Initialised. -[ 94][I][WiFiProv.cpp:158] beginProvision(): Already Provisioned -[ 95][I][WiFiProv.cpp:162] beginProvision(): Attempting connect to AP: Viking007_2GEXT - -Received value = false for Dimmer - Power -Toggle State to true. -[ 22532][I][RMakerDevice.cpp:162] updateAndReportParam(): Device : Dimmer, Param Name : Power, Val : true - -Received value = 73 for Dimmer - Level -``` - -### Resetting the device -- Press and Hold the Boot button for more than 3 seconds and then release to reset Wi-Fi configuration. -- Press and Hold the Boot button for more than 10 seconds and then release to reset to factory defaults. diff --git a/libraries/RainMaker/examples/RMakerCustom/RMakerCustom.ino b/libraries/RainMaker/examples/RMakerCustom/RMakerCustom.ino deleted file mode 100644 index 55012e413c6..00000000000 --- a/libraries/RainMaker/examples/RMakerCustom/RMakerCustom.ino +++ /dev/null @@ -1,126 +0,0 @@ -//This example demonstrates the ESP RainMaker with a custom device -#include "RMaker.h" -#include "WiFi.h" -#include "WiFiProv.h" - -#define DEFAULT_POWER_MODE true -#define DEFAULT_DIMMER_LEVEL 50 -const char *service_name = "PROV_1234"; -const char *pop = "abcd1234"; - -//GPIO for push button -static int gpio_0 = 0; -//GPIO for virtual device -static int gpio_dimmer = 16; -/* Variable for reading pin status*/ -bool dimmer_state = true; - -// The framework provides some standard device types like switch, lightbulb, fan, temperature sensor. -// But, you can also define custom devices using the 'Device' base class object, as shown here -static Device my_device("Dimmer", "custom.device.dimmer", &gpio_dimmer); - -void sysProvEvent(arduino_event_t *sys_event) -{ - switch (sys_event->event_id) { - case ARDUINO_EVENT_PROV_START: -#if CONFIG_IDF_TARGET_ESP32 - Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop); - printQR(service_name, pop, "ble"); -#else - Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop); - printQR(service_name, pop, "softap"); -#endif - break; - } -} - -void write_callback(Device *device, Param *param, const param_val_t val, void *priv_data, write_ctx_t *ctx) -{ - const char *device_name = device->getDeviceName(); - const char *param_name = param->getParamName(); - - if(strcmp(param_name, "Power") == 0) { - Serial.printf("Received value = %s for %s - %s\n", val.val.b? "true" : "false", device_name, param_name); - dimmer_state = val.val.b; - (dimmer_state == false) ? digitalWrite(gpio_dimmer, LOW) : digitalWrite(gpio_dimmer, HIGH); - param->updateAndReport(val); - } else if (strcmp(param_name, "Level") == 0) { - Serial.printf("\nReceived value = %d for %s - %s\n", val.val.i, device_name, param_name); - param->updateAndReport(val); - } -} - -void setup() -{ - Serial.begin(115200); - pinMode(gpio_0, INPUT); - pinMode(gpio_dimmer, OUTPUT); - digitalWrite(gpio_dimmer, DEFAULT_POWER_MODE); - - Node my_node; - my_node = RMaker.initNode("ESP RainMaker Node"); - - //Create custom dimmer device - my_device.addNameParam(); - my_device.addPowerParam(DEFAULT_POWER_MODE); - my_device.assignPrimaryParam(my_device.getParamByName(ESP_RMAKER_DEF_POWER_NAME)); - - //Create and add a custom level parameter - Param level_param("Level", "custom.param.level", value(DEFAULT_DIMMER_LEVEL), PROP_FLAG_READ | PROP_FLAG_WRITE); - level_param.addBounds(value(0), value(100), value(1)); - level_param.addUIType(ESP_RMAKER_UI_SLIDER); - my_device.addParam(level_param); - - my_device.addCb(write_callback); - - //Add custom dimmer device to the node - my_node.addDevice(my_device); - - //This is optional - RMaker.enableOTA(OTA_USING_PARAMS); - //If you want to enable scheduling, set time zone for your region using setTimeZone(). - //The list of available values are provided here https://rainmaker.espressif.com/docs/time-service.html - // RMaker.setTimeZone("Asia/Shanghai"); - // Alternatively, enable the Timezone service and let the phone apps set the appropriate timezone - RMaker.enableTZService(); - - RMaker.enableSchedule(); - - RMaker.start(); - - WiFi.onEvent(sysProvEvent); -#if CONFIG_IDF_TARGET_ESP32 - WiFiProv.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name); -#else - WiFiProv.beginProvision(WIFI_PROV_SCHEME_SOFTAP, WIFI_PROV_SCHEME_HANDLER_NONE, WIFI_PROV_SECURITY_1, pop, service_name); -#endif -} - -void loop() -{ - if(digitalRead(gpio_0) == LOW) { //Push button pressed - - // Key debounce handling - delay(100); - int startTime = millis(); - while(digitalRead(gpio_0) == LOW) delay(50); - int endTime = millis(); - - if ((endTime - startTime) > 10000) { - // If key pressed for more than 10secs, reset all - Serial.printf("Reset to factory.\n"); - RMakerFactoryReset(2); - } else if ((endTime - startTime) > 3000) { - Serial.printf("Reset Wi-Fi.\n"); - // If key pressed for more than 3secs, but less than 10, reset Wi-Fi - RMakerWiFiReset(2); - } else { - // Toggle device state - dimmer_state = !dimmer_state; - Serial.printf("Toggle State to %s.\n", dimmer_state ? "true" : "false"); - my_device.updateAndReportParam(ESP_RMAKER_DEF_POWER_NAME, dimmer_state); - (dimmer_state == false) ? digitalWrite(gpio_dimmer, LOW) : digitalWrite(gpio_dimmer, HIGH); - } - } - delay(100); -} diff --git a/libraries/RainMaker/examples/RMakerSonoffDualR3/.skip.esp32c3 b/libraries/RainMaker/examples/RMakerSonoffDualR3/.skip.esp32c3 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/libraries/RainMaker/examples/RMakerSonoffDualR3/.skip.esp32s2 b/libraries/RainMaker/examples/RMakerSonoffDualR3/.skip.esp32s2 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/libraries/RainMaker/examples/RMakerSonoffDualR3/.skip.esp32s3 b/libraries/RainMaker/examples/RMakerSonoffDualR3/.skip.esp32s3 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/libraries/RainMaker/examples/RMakerSonoffDualR3/RMakerSonoffDualR3.ino b/libraries/RainMaker/examples/RMakerSonoffDualR3/RMakerSonoffDualR3.ino deleted file mode 100644 index 37eda40134b..00000000000 --- a/libraries/RainMaker/examples/RMakerSonoffDualR3/RMakerSonoffDualR3.ino +++ /dev/null @@ -1,193 +0,0 @@ -//This example demonstrates the ESP RainMaker with a standard Switch device. -#include "RMaker.h" -#include "WiFi.h" -#include "WiFiProv.h" - -#define DEFAULT_POWER_MODE false -const char *service_name = "PROV_SONOFF_DUALR3"; -const char *pop = "123456"; - -// GPIO for push button -static uint8_t gpio_reset = 0; -// GPIO for switch -static uint8_t gpio_switch1 = 32; -static uint8_t gpio_switch2 = 33; -// GPIO for virtual device -static uint8_t gpio_relay1 = 27; -static uint8_t gpio_relay2 = 14; -/* Variable for reading pin status*/ -bool switch_state_ch1 = true; -bool switch_state_ch2 = true; -// GPIO for link status LED -static uint8_t gpio_led = 13; - -struct LightSwitch { - const uint8_t pin; - bool pressed; -}; - -// Define the light switches for channel 1 and 2 -LightSwitch switch_ch1 = {gpio_switch1, false}; -LightSwitch switch_ch2 = {gpio_switch2, false}; - -//The framework provides some standard device types like switch, lightbulb, fan, temperature sensor. -static Switch my_switch1("Switch_ch1", &gpio_relay1); -static Switch my_switch2("Switch_ch2", &gpio_relay2); - -void sysProvEvent(arduino_event_t *sys_event) -{ - switch (sys_event->event_id) { - case ARDUINO_EVENT_PROV_START: -#if CONFIG_IDF_TARGET_ESP32 - Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop); - printQR(service_name, pop, "ble"); -#else - Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop); - printQR(service_name, pop, "softap"); -#endif - break; - case ARDUINO_EVENT_WIFI_STA_CONNECTED: - Serial.printf("\nConnected to Wi-Fi!\n"); - digitalWrite(gpio_led, true); - break; - } -} - -void write_callback(Device *device, Param *param, const param_val_t val, void *priv_data, write_ctx_t *ctx) -{ - const char *device_name = device->getDeviceName(); - const char *param_name = param->getParamName(); - - if(strcmp(device_name, "Switch_ch1") == 0) { - - Serial.printf("Lightbulb = %s\n", val.val.b? "true" : "false"); - - if(strcmp(param_name, "Power") == 0) { - Serial.printf("Received value = %s for %s - %s\n", val.val.b? "true" : "false", device_name, param_name); - switch_state_ch1 = val.val.b; - (switch_state_ch1 == false) ? digitalWrite(gpio_relay1, LOW) : digitalWrite(gpio_relay1, HIGH); - param->updateAndReport(val); - } - - } else if(strcmp(device_name, "Switch_ch2") == 0) { - - Serial.printf("Switch value = %s\n", val.val.b? "true" : "false"); - - if(strcmp(param_name, "Power") == 0) { - Serial.printf("Received value = %s for %s - %s\n", val.val.b? "true" : "false", device_name, param_name); - switch_state_ch2 = val.val.b; - (switch_state_ch2 == false) ? digitalWrite(gpio_relay2, LOW) : digitalWrite(gpio_relay2, HIGH); - param->updateAndReport(val); - } - - } - -} - -void ARDUINO_ISR_ATTR isr(void* arg) { - LightSwitch* s = static_cast(arg); - s->pressed = true; -} - -void setup() -{ - uint32_t chipId = 0; - - Serial.begin(115200); - - // Configure the input GPIOs - pinMode(gpio_reset, INPUT); - pinMode(switch_ch1.pin, INPUT_PULLUP); - attachInterruptArg(switch_ch1.pin, isr, &switch_ch1, CHANGE); - pinMode(switch_ch2.pin, INPUT_PULLUP); - attachInterruptArg(switch_ch2.pin, isr, &switch_ch2, CHANGE); - - // Set the Relays GPIOs as output mode - pinMode(gpio_relay1, OUTPUT); - pinMode(gpio_relay2, OUTPUT); - pinMode(gpio_led, OUTPUT); - // Write to the GPIOs the default state on booting - digitalWrite(gpio_relay1, DEFAULT_POWER_MODE); - digitalWrite(gpio_relay2, DEFAULT_POWER_MODE); - digitalWrite(gpio_led, false); - - Node my_node; - my_node = RMaker.initNode("Sonoff Dual R3"); - - //Standard switch device - my_switch1.addCb(write_callback); - my_switch2.addCb(write_callback); - - //Add switch device to the node - my_node.addDevice(my_switch1); - my_node.addDevice(my_switch2); - - //This is optional - RMaker.enableOTA(OTA_USING_PARAMS); - //If you want to enable scheduling, set time zone for your region using setTimeZone(). - //The list of available values are provided here https://rainmaker.espressif.com/docs/time-service.html - // RMaker.setTimeZone("Asia/Shanghai"); - // Alternatively, enable the Timezone service and let the phone apps set the appropriate timezone - RMaker.enableTZService(); - RMaker.enableSchedule(); - - //Service Name - for(int i=0; i<17; i=i+8) { - chipId |= ((ESP.getEfuseMac() >> (40 - i)) & 0xff) << i; - } - - Serial.printf("\nChip ID: %d Service Name: %s\n", chipId, service_name); - - Serial.printf("\nStarting ESP-RainMaker\n"); - RMaker.start(); - - WiFi.onEvent(sysProvEvent); -#if CONFIG_IDF_TARGET_ESP32 - WiFiProv.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name); -#else - WiFiProv.beginProvision(WIFI_PROV_SCHEME_SOFTAP, WIFI_PROV_SCHEME_HANDLER_NONE, WIFI_PROV_SECURITY_1, pop, service_name); -#endif -} - -void loop() -{ - - if (switch_ch1.pressed) { - Serial.printf("Switch 1 has been changed\n"); - switch_ch1.pressed = false; - // Toggle switch 1 device state - switch_state_ch1 = !switch_state_ch1; - Serial.printf("Toggle State to %s.\n", switch_state_ch1 ? "true" : "false"); - my_switch1.updateAndReportParam(ESP_RMAKER_DEF_POWER_NAME, switch_state_ch1); - (switch_state_ch1 == false) ? digitalWrite(gpio_relay1, LOW) : digitalWrite(gpio_relay1, HIGH); - } else if (switch_ch2.pressed) { - Serial.printf("Switch 2 has been changed\n"); - switch_ch2.pressed = false; - // Toggle switch 2 device state - switch_state_ch2 = !switch_state_ch2; - Serial.printf("Toggle State to %s.\n", switch_state_ch2 ? "true" : "false"); - my_switch2.updateAndReportParam(ESP_RMAKER_DEF_POWER_NAME, switch_state_ch2); - (switch_state_ch2 == false) ? digitalWrite(gpio_relay2, LOW) : digitalWrite(gpio_relay2, HIGH); - } - - // Read GPIO0 (external button to reset device - if(digitalRead(gpio_reset) == LOW) { //Push button pressed - Serial.printf("Reset Button Pressed!\n"); - // Key debounce handling - delay(100); - int startTime = millis(); - while(digitalRead(gpio_reset) == LOW) delay(50); - int endTime = millis(); - - if ((endTime - startTime) > 10000) { - // If key pressed for more than 10secs, reset all - Serial.printf("Reset to factory.\n"); - RMakerFactoryReset(2); - } else if ((endTime - startTime) > 3000) { - Serial.printf("Reset Wi-Fi.\n"); - // If key pressed for more than 3secs, but less than 10, reset Wi-Fi - RMakerWiFiReset(2); - } - } - delay(100); -} diff --git a/libraries/RainMaker/examples/RMakerSwitch/.skip.esp32c3 b/libraries/RainMaker/examples/RMakerSwitch/.skip.esp32c3 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/libraries/RainMaker/examples/RMakerSwitch/.skip.esp32s2 b/libraries/RainMaker/examples/RMakerSwitch/.skip.esp32s2 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/libraries/RainMaker/examples/RMakerSwitch/.skip.esp32s3 b/libraries/RainMaker/examples/RMakerSwitch/.skip.esp32s3 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/libraries/RainMaker/examples/RMakerSwitch/README.md b/libraries/RainMaker/examples/RMakerSwitch/README.md deleted file mode 100644 index 55b5ab1ed41..00000000000 --- a/libraries/RainMaker/examples/RMakerSwitch/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# ESP RainMaker Switch - -This example demonstrates how to build a switch device to be used with ESP RainMaker. - -## What to expect in this example? - -- This example sketch uses the on board Boot button and GPIO16 to demonstrate an ESP RainMaker switch device. -- After compiling and flashing the example, add your device using the [ESP RainMaker phone apps](https://rainmaker.espressif.com/docs/quick-links.html#phone-apps) by scanning the QR code. -- Toggling the state from the phone app will toggle the switch state (GPIO16). -- Pressing the Boot button will toggle the switch state (GPIO16) and the same will reflect on the phone app. - -### Output - -``` -[ 63][I][RMaker.cpp:13] event_handler(): RainMaker Initialised. -[ 69][I][WiFiProv.cpp:158] beginProvision(): Already Provisioned -[ 69][I][WiFiProv.cpp:162] beginProvision(): Attempting connect to AP: Viking007_2GEXT - -Toggle State to false. -[ 8182][I][RMakerDevice.cpp:162] updateAndReportParam(): Device : Switch, Param Name : Power, Val : false -Toggle State to true. -[ 9835][I][RMakerDevice.cpp:162] updateAndReportParam(): Device : Switch, Param Name : Power, Val : true -Received value = false for Switch - Power -Received value = true for Switch - Power -Toggle State to false. -[ 29937][I][RMakerDevice.cpp:162] updateAndReportParam(): Device : Switch, Param Name : Power, Val : false -``` - -### Resetting the device -- Press and Hold the Boot button for more than 3 seconds and then release to reset Wi-Fi configuration. -- Press and Hold the Boot button for more than 10 seconds and then release to reset to factory defaults. diff --git a/libraries/RainMaker/examples/RMakerSwitch/RMakerSwitch.ino b/libraries/RainMaker/examples/RMakerSwitch/RMakerSwitch.ino deleted file mode 100644 index e486bd200fb..00000000000 --- a/libraries/RainMaker/examples/RMakerSwitch/RMakerSwitch.ino +++ /dev/null @@ -1,111 +0,0 @@ -//This example demonstrates the ESP RainMaker with a standard Switch device. -#include "RMaker.h" -#include "WiFi.h" -#include "WiFiProv.h" - -#define DEFAULT_POWER_MODE true -const char *service_name = "PROV_1234"; -const char *pop = "abcd1234"; - -//GPIO for push button -static int gpio_0 = 0; -//GPIO for virtual device -static int gpio_switch = 16; -/* Variable for reading pin status*/ -bool switch_state = true; - -//The framework provides some standard device types like switch, lightbulb, fan, temperaturesensor. -static Switch my_switch("Switch", &gpio_switch); - -void sysProvEvent(arduino_event_t *sys_event) -{ - switch (sys_event->event_id) { - case ARDUINO_EVENT_PROV_START: -#if CONFIG_IDF_TARGET_ESP32 - Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop); - printQR(service_name, pop, "ble"); -#else - Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop); - printQR(service_name, pop, "softap"); -#endif - break; - } -} - -void write_callback(Device *device, Param *param, const param_val_t val, void *priv_data, write_ctx_t *ctx) -{ - const char *device_name = device->getDeviceName(); - const char *param_name = param->getParamName(); - - if(strcmp(param_name, "Power") == 0) { - Serial.printf("Received value = %s for %s - %s\n", val.val.b? "true" : "false", device_name, param_name); - switch_state = val.val.b; - (switch_state == false) ? digitalWrite(gpio_switch, LOW) : digitalWrite(gpio_switch, HIGH); - param->updateAndReport(val); - } -} - -void setup() -{ - Serial.begin(115200); - pinMode(gpio_0, INPUT); - pinMode(gpio_switch, OUTPUT); - digitalWrite(gpio_switch, DEFAULT_POWER_MODE); - - Node my_node; - my_node = RMaker.initNode("ESP RainMaker Node"); - - //Standard switch device - my_switch.addCb(write_callback); - - //Add switch device to the node - my_node.addDevice(my_switch); - - //This is optional - RMaker.enableOTA(OTA_USING_PARAMS); - //If you want to enable scheduling, set time zone for your region using setTimeZone(). - //The list of available values are provided here https://rainmaker.espressif.com/docs/time-service.html - // RMaker.setTimeZone("Asia/Shanghai"); - // Alternatively, enable the Timezone service and let the phone apps set the appropriate timezone - RMaker.enableTZService(); - - RMaker.enableSchedule(); - - RMaker.start(); - - WiFi.onEvent(sysProvEvent); -#if CONFIG_IDF_TARGET_ESP32 - WiFiProv.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name); -#else - WiFiProv.beginProvision(WIFI_PROV_SCHEME_SOFTAP, WIFI_PROV_SCHEME_HANDLER_NONE, WIFI_PROV_SECURITY_1, pop, service_name); -#endif -} - -void loop() -{ - if(digitalRead(gpio_0) == LOW) { //Push button pressed - - // Key debounce handling - delay(100); - int startTime = millis(); - while(digitalRead(gpio_0) == LOW) delay(50); - int endTime = millis(); - - if ((endTime - startTime) > 10000) { - // If key pressed for more than 10secs, reset all - Serial.printf("Reset to factory.\n"); - RMakerFactoryReset(2); - } else if ((endTime - startTime) > 3000) { - Serial.printf("Reset Wi-Fi.\n"); - // If key pressed for more than 3secs, but less than 10, reset Wi-Fi - RMakerWiFiReset(2); - } else { - // Toggle device state - switch_state = !switch_state; - Serial.printf("Toggle State to %s.\n", switch_state ? "true" : "false"); - my_switch.updateAndReportParam(ESP_RMAKER_DEF_POWER_NAME, switch_state); - (switch_state == false) ? digitalWrite(gpio_switch, LOW) : digitalWrite(gpio_switch, HIGH); - } - } - delay(100); -} diff --git a/libraries/RainMaker/library.properties b/libraries/RainMaker/library.properties deleted file mode 100644 index b144328fef2..00000000000 --- a/libraries/RainMaker/library.properties +++ /dev/null @@ -1,8 +0,0 @@ -name=ESP RainMaker -version=2.0.0 -author=Sweety Mhaiske -maintainer=Hristo Gochkov -sentence=ESP RainMaker Support -paragraph=With this library you can build connected devices and access them via phone apps without having to manage the infrastructure. -url=https://rainmaker.espressif.com -architectures=esp32,esp32s2 diff --git a/libraries/RainMaker/src/RMaker.cpp b/libraries/RainMaker/src/RMaker.cpp deleted file mode 100644 index de6903c0538..00000000000 --- a/libraries/RainMaker/src/RMaker.cpp +++ /dev/null @@ -1,116 +0,0 @@ -#include "RMaker.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 -#include -#include -bool wifiLowLevelInit(bool persistent); -static esp_err_t err; - -static void event_handler(void *arg, esp_event_base_t event_base, int event_id, void *event_data) -{ - if (event_base == RMAKER_EVENT) { - switch (event_id) { - case RMAKER_EVENT_INIT_DONE: - log_i("RainMaker Initialised."); - break; - case RMAKER_EVENT_CLAIM_STARTED: - log_i("RainMaker Claim Started."); - break; - case RMAKER_EVENT_CLAIM_SUCCESSFUL: - log_i("RainMaker Claim Successful."); - break; - case RMAKER_EVENT_CLAIM_FAILED: - log_i("RainMaker Claim Failed."); - break; - default: - log_i("Unhandled RainMaker Event:"); - } - } -} - -void RMakerClass::setTimeSync(bool val) -{ - rainmaker_cfg.enable_time_sync = val; -} - -Node RMakerClass::initNode(const char *name, const char *type) -{ - wifiLowLevelInit(true); - Node node; - esp_rmaker_node_t *rnode = NULL; - esp_event_handler_register(RMAKER_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL); - rnode = esp_rmaker_node_init(&rainmaker_cfg, name, type); - if (!rnode){ - log_e("Node init failed"); - return node; - } - node.setNodeHandle(rnode); - return node; -} - -esp_err_t RMakerClass::start() -{ - err = esp_rmaker_start(); - if(err != ESP_OK){ - log_e("ESP RainMaker core task failed"); - } - return err; -} - -esp_err_t RMakerClass::stop() -{ - err = esp_rmaker_stop(); - if(err != ESP_OK) { - log_e("ESP RainMaker stop error"); - } - return err; -} - -esp_err_t RMakerClass::deinitNode(Node rnode) -{ - err = esp_rmaker_node_deinit(rnode.getNodeHandle()); - if(err != ESP_OK) { - log_e("Node deinit failed"); - } - return err; -} - -esp_err_t RMakerClass::setTimeZone(const char *tz) -{ - err = esp_rmaker_time_set_timezone(tz); - if(err != ESP_OK) { - log_e("Setting time zone error"); - } - return err; -} - -esp_err_t RMakerClass::enableSchedule() -{ - err = esp_rmaker_schedule_enable(); - if(err != ESP_OK) { - log_e("Schedule enable failed"); - } - return err; -} - -esp_err_t RMakerClass::enableTZService() -{ - err = esp_rmaker_timezone_service_enable(); - if(err != ESP_OK) { - log_e("Timezone service enable failed"); - } - return err; -} - -esp_err_t RMakerClass::enableOTA(ota_type_t type, const char *cert) -{ - esp_rmaker_ota_config_t ota_config; - ota_config.server_cert = cert; - err = esp_rmaker_ota_enable(&ota_config, type); - if(err != ESP_OK) { - log_e("OTA enable failed"); - } - return err; -} - -RMakerClass RMaker; -#endif diff --git a/libraries/RainMaker/src/RMaker.h b/libraries/RainMaker/src/RMaker.h deleted file mode 100644 index 53c60bce189..00000000000 --- a/libraries/RainMaker/src/RMaker.h +++ /dev/null @@ -1,30 +0,0 @@ -#include "esp_system.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 - -#include "Arduino.h" -#include "RMakerNode.h" -#include "RMakerQR.h" -#include "RMakerUtils.h" -#include - -class RMakerClass -{ - private: - esp_rmaker_config_t rainmaker_cfg = {false}; - - public: - - void setTimeSync(bool val); - Node initNode(const char *name, const char *type = "ESP RainMaker with Arduino"); - esp_err_t deinitNode(Node node); - esp_err_t setTimeZone(const char *tz = "Asia/Shanghai"); - esp_err_t enableSchedule(); - esp_err_t enableTZService(); - esp_err_t enableOTA(ota_type_t type, const char *cert = ESP_RMAKER_OTA_DEFAULT_SERVER_CERT); - esp_err_t start(); - esp_err_t stop(); -}; - -extern RMakerClass RMaker; - -#endif diff --git a/libraries/RainMaker/src/RMakerDevice.cpp b/libraries/RainMaker/src/RMakerDevice.cpp deleted file mode 100644 index e0108c32963..00000000000 --- a/libraries/RainMaker/src/RMakerDevice.cpp +++ /dev/null @@ -1,209 +0,0 @@ -#include "RMakerDevice.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 - -static esp_err_t err; -typedef void (*deviceWriteCb)(Device*, Param*, const param_val_t val, void *priv_data, write_ctx_t *ctx); -typedef void (*deviceReadCb)(Device*, Param*, void *priv_data, read_ctx_t *ctx); - -void (*write_cb)(Device*, Param*, param_val_t, void*, write_ctx_t*); -void (*read_cb)(Device*, Param*, void*, read_ctx_t*); -Device device; -Param param; - -static esp_err_t write_callback(const device_handle_t *dev_handle, const param_handle_t *par_handle, const param_val_t val, void *priv_data, write_ctx_t *ctx) -{ - device.setDeviceHandle(dev_handle); - param.setParamHandle(par_handle); - - write_cb(&device, ¶m, val, priv_data, ctx); - return ESP_OK; -} - -static esp_err_t read_callback(const device_handle_t *dev_handle, const param_handle_t *par_handle, void *priv_data, read_ctx_t *ctx) -{ - device.setDeviceHandle(dev_handle); - param.setParamHandle(par_handle); - - read_cb(&device, ¶m, priv_data, ctx); - return ESP_OK; -} - -esp_err_t Device::deleteDevice() -{ - err = esp_rmaker_device_delete(getDeviceHandle()); - if(err != ESP_OK) { - log_e("Device deletion error"); - return err; - } - return ESP_OK; -} - -void Device::addCb(deviceWriteCb writeCb, deviceReadCb readCb) -{ - write_cb = writeCb; - read_cb = readCb; - err = esp_rmaker_device_add_cb(getDeviceHandle(), write_callback, read_callback); - if(err != ESP_OK) { - log_e("Callback register error"); - } -} - -esp_err_t Device::addDeviceAttr(const char *attr_name, const char *val) -{ - err = esp_rmaker_device_add_attribute(getDeviceHandle(), attr_name, val); - if(err != ESP_OK) { - log_e("Failed to add attriute to the device"); - return err; - } - return ESP_OK; -} - -//Generic Parameter -esp_err_t Device::addParam(Param parameter) -{ - err = esp_rmaker_device_add_param(getDeviceHandle(), parameter.getParamHandle()); - if(err != ESP_OK) { - log_e("Adding custom parameter error"); - return err; - } - return ESP_OK; -} - -//Standard Device Parameter -esp_err_t Device::addNameParam(const char *param_name) -{ - param_handle_t *param = esp_rmaker_name_param_create(param_name, getDeviceName()); - return esp_rmaker_device_add_param(getDeviceHandle(), param); -} - -esp_err_t Device::addPowerParam(bool val, const char *param_name) -{ - param_handle_t *param = esp_rmaker_power_param_create(param_name, val); - return esp_rmaker_device_add_param(getDeviceHandle(), param); -} - -esp_err_t Device::addBrightnessParam(int val, const char *param_name) -{ - param_handle_t *param = esp_rmaker_brightness_param_create(param_name, val); - return esp_rmaker_device_add_param(getDeviceHandle(), param); -} - -esp_err_t Device::addHueParam(int val, const char *param_name) -{ - param_handle_t *param = esp_rmaker_hue_param_create(param_name, val); - return esp_rmaker_device_add_param(getDeviceHandle(), param); -} - -esp_err_t Device::addSaturationParam(int val, const char *param_name) -{ - param_handle_t *param = esp_rmaker_saturation_param_create(param_name, val); - return esp_rmaker_device_add_param(getDeviceHandle(), param); -} - -esp_err_t Device::addIntensityParam(int val, const char *param_name) -{ - param_handle_t *param = esp_rmaker_intensity_param_create(param_name, val); - return esp_rmaker_device_add_param(getDeviceHandle(), param); -} - -esp_err_t Device::addCCTParam(int val, const char *param_name) -{ - param_handle_t *param = esp_rmaker_cct_param_create(param_name, val); - return esp_rmaker_device_add_param(getDeviceHandle(), param); -} - -esp_err_t Device::addDirectionParam(int val, const char *param_name) -{ - param_handle_t *param = esp_rmaker_direction_param_create(param_name, val); - return esp_rmaker_device_add_param(getDeviceHandle(), param); -} - -esp_err_t Device::addSpeedParam(int val, const char *param_name) -{ - param_handle_t *param = esp_rmaker_speed_param_create(param_name, val); - return esp_rmaker_device_add_param(getDeviceHandle(), param); -} - -esp_err_t Device::addTempratureParam(float val, const char *param_name) -{ - param_handle_t *param = esp_rmaker_temperature_param_create(param_name, val); - return esp_rmaker_device_add_param(getDeviceHandle(), param); -} - -param_handle_t *Device::getParamByName(const char *param_name) -{ - return esp_rmaker_device_get_param_by_name(getDeviceHandle(), param_name); -} - -esp_err_t Device::assignPrimaryParam(param_handle_t *param) -{ - err = esp_rmaker_device_assign_primary_param(getDeviceHandle(), param); - if(err != ESP_OK){ - log_e("Assigning primary param error"); - } - return err; -} - -const param_handle_t* getParamHandlebyName(const esp_rmaker_device_t *device_handle, const char *param_name) -{ - const param_handle_t *param = esp_rmaker_device_get_param_by_name(device_handle, param_name); - return param; -} - -esp_err_t Device::updateAndReportParam(const char *param_name, bool my_val) -{ - const param_handle_t *param = getParamHandlebyName(getDeviceHandle(), param_name); - param_val_t val = esp_rmaker_bool(my_val); - err = esp_rmaker_param_update_and_report(param, val); - if(err != ESP_OK) { - log_e("Update paramter failed"); - return err; - }else { - log_i("Device : %s, Param Name : %s, Val : %s", getDeviceName(), param_name, my_val ? "true" : "false"); - } - return ESP_OK; -} - -esp_err_t Device::updateAndReportParam(const char *param_name, int my_val) -{ - const param_handle_t *param = getParamHandlebyName(getDeviceHandle(), param_name); - param_val_t val = esp_rmaker_int(my_val); - esp_err_t err = esp_rmaker_param_update_and_report(param, val); - if(err != ESP_OK) { - log_e("Update paramter failed"); - return err; - }else { - log_i("Device : %s, Param Name : %s, Val : %d", getDeviceName(), param_name, my_val); - } - return ESP_OK; -} - -esp_err_t Device::updateAndReportParam(const char *param_name, float my_val) -{ - const param_handle_t *param = getParamHandlebyName(getDeviceHandle(), param_name); - param_val_t val = esp_rmaker_float(my_val); - esp_err_t err = esp_rmaker_param_update_and_report(param, val); - if(err != ESP_OK) { - log_e("Update paramter failed"); - return err; - }else { - log_i("Device : %s, Param Name : %s, Val : %f", getDeviceName(), param_name, my_val); - } - return ESP_OK; -} - -esp_err_t Device::updateAndReportParam(const char *param_name, const char *my_val) -{ - const param_handle_t *param = getParamHandlebyName(getDeviceHandle(), param_name); - param_val_t val = esp_rmaker_str(my_val); - esp_err_t err = esp_rmaker_param_update_and_report(param, val); - if(err != ESP_OK) { - log_e("Update paramter failed"); - return err; - }else { - log_i("Device : %s, Param Name : %s, Val : %s", getDeviceName(), param_name, my_val); - } - return ESP_OK; -} - -#endif diff --git a/libraries/RainMaker/src/RMakerDevice.h b/libraries/RainMaker/src/RMakerDevice.h deleted file mode 100644 index 13cb67ac302..00000000000 --- a/libraries/RainMaker/src/RMakerDevice.h +++ /dev/null @@ -1,154 +0,0 @@ -#include "esp_system.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 - -#include "RMakerParam.h" -#include -#include - -class Device -{ - private: - const device_handle_t *device_handle; - - public: - Device() - { - device_handle = NULL; - } - Device(const char *dev_name, const char *dev_type = NULL, void *priv_data = NULL) - { - device_handle = esp_rmaker_device_create(dev_name, dev_type, priv_data); - if(device_handle == NULL){ - log_e("Device create error"); - } - } - void setDeviceHandle(const esp_rmaker_device_t *device_handle) - { - this->device_handle = device_handle; - } - const char *getDeviceName() - { - return esp_rmaker_device_get_name(device_handle); - } - const esp_rmaker_device_t *getDeviceHandle() - { - return device_handle; - } - - typedef void (*deviceWriteCb)(Device*, Param*, const param_val_t val, void *priv_data, write_ctx_t *ctx); - typedef void (*deviceReadCb)(Device*, Param*, void *priv_data, read_ctx_t *ctx); - - esp_err_t deleteDevice(); - void addCb(deviceWriteCb write_cb, deviceReadCb read_cb = NULL); - esp_err_t addDeviceAttr(const char *attr_name, const char *val); - param_handle_t *getParamByName(const char *param_name); - esp_err_t assignPrimaryParam(param_handle_t *param); - - //Generic Device Parameter - esp_err_t addParam(Param parameter); - - //Standard Device Parameter - esp_err_t addNameParam(const char *param_name = ESP_RMAKER_DEF_NAME_PARAM); - esp_err_t addPowerParam(bool val, const char *param_name = ESP_RMAKER_DEF_POWER_NAME); - esp_err_t addBrightnessParam(int val, const char *param_name = ESP_RMAKER_DEF_BRIGHTNESS_NAME); - esp_err_t addHueParam(int val, const char *param_name = ESP_RMAKER_DEF_HUE_NAME); - esp_err_t addSaturationParam(int val, const char *param_name = ESP_RMAKER_DEF_SATURATION_NAME); - esp_err_t addIntensityParam(int val, const char *param_name = ESP_RMAKER_DEF_INTENSITY_NAME); - esp_err_t addCCTParam(int val, const char *param_name = ESP_RMAKER_DEF_CCT_NAME); - esp_err_t addDirectionParam(int val, const char *param_name = ESP_RMAKER_DEF_DIRECTION_NAME); - esp_err_t addSpeedParam(int val, const char *param_name = ESP_RMAKER_DEF_SPEED_NAME); - esp_err_t addTempratureParam(float val, const char *param_name = ESP_RMAKER_DEF_TEMPERATURE_NAME); - - //Update Parameter - esp_err_t updateAndReportParam(const char *param_name, bool val); - esp_err_t updateAndReportParam(const char *param_name, int val); - esp_err_t updateAndReportParam(const char *param_name, float val); - esp_err_t updateAndReportParam(const char *param_name, const char *val); - -}; - -class Switch : public Device -{ - public: - Switch() - { - standardSwitchDevice("Switch", NULL, true); - } - Switch(const char *dev_name, void *priv_data = NULL, bool power = true) - { - standardSwitchDevice(dev_name, priv_data, power); - } - void standardSwitchDevice(const char *dev_name, void *priv_data, bool power) - { - esp_rmaker_device_t *dev_handle = esp_rmaker_switch_device_create(dev_name, priv_data, power); - setDeviceHandle(dev_handle); - if(dev_handle == NULL){ - log_e("Switch device not created"); - } - } -}; - -class LightBulb : public Device -{ - public: - LightBulb() - { - standardLightBulbDevice("Light", NULL, true); - } - LightBulb(const char *dev_name, void *priv_data = NULL, bool power = true) - { - standardLightBulbDevice(dev_name, priv_data, power); - } - void standardLightBulbDevice(const char *dev_name, void *priv_data, bool power) - { - esp_rmaker_device_t *dev_handle = esp_rmaker_lightbulb_device_create(dev_name, priv_data, power); - setDeviceHandle(dev_handle); - if(dev_handle == NULL){ - log_e("Light device not created"); - } - } -}; - -class Fan : public Device -{ - public: - Fan() - { - standardFanDevice("Fan", NULL, true); - } - Fan(const char *dev_name, void *priv_data = NULL, bool power = true) - { - standardFanDevice(dev_name, priv_data, power); - } - void standardFanDevice(const char *dev_name, void *priv_data, bool power) - { - esp_rmaker_device_t *dev_handle = esp_rmaker_fan_device_create(dev_name, priv_data, power); - setDeviceHandle(dev_handle); - if(dev_handle == NULL){ - log_e("Fan device not created"); - } - } -}; - -class TemperatureSensor : public Device -{ - public: - TemperatureSensor() - { - standardTemperatureSensorDevice("Temperature-Sensor", NULL, 25.0); - } - TemperatureSensor(const char *dev_name, void *priv_data = NULL, float temp = 25.0) - { - standardTemperatureSensorDevice(dev_name, priv_data, temp); - } - void standardTemperatureSensorDevice(const char *dev_name, void *priv_data, float temp) - { - esp_rmaker_device_t *dev_handle = esp_rmaker_temp_sensor_device_create(dev_name, priv_data, temp); - setDeviceHandle(dev_handle); - if(dev_handle == NULL){ - log_e("Temperature Sensor device not created"); - } - } -}; - -#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerNode.cpp b/libraries/RainMaker/src/RMakerNode.cpp deleted file mode 100644 index 3f2555f8b05..00000000000 --- a/libraries/RainMaker/src/RMakerNode.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "RMakerNode.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 -static esp_err_t err; - -esp_err_t Node::addDevice(Device device) -{ - err = esp_rmaker_node_add_device(node, device.getDeviceHandle()); - if(err != ESP_OK){ - log_e("Device was not added to the Node"); - } - return err; -} - -esp_err_t Node::removeDevice(Device device) -{ - err = esp_rmaker_node_remove_device(node, device.getDeviceHandle()); - if(err != ESP_OK){ - log_e("Device was not removed from the Node"); - } - return err; -} - -char *Node::getNodeID() -{ - return esp_rmaker_get_node_id(); -} - -node_info_t *Node::getNodeInfo() -{ - return esp_rmaker_node_get_info(node); -} - -esp_err_t Node::addNodeAttr(const char *attr_name, const char *val) -{ - err = esp_rmaker_node_add_attribute(node, attr_name, val); - if(err != ESP_OK) { - log_e("Failed to add attribute to the Node"); - } - return err; -} -#endif diff --git a/libraries/RainMaker/src/RMakerNode.h b/libraries/RainMaker/src/RMakerNode.h deleted file mode 100644 index 733ca407f96..00000000000 --- a/libraries/RainMaker/src/RMakerNode.h +++ /dev/null @@ -1,33 +0,0 @@ -#include "esp_system.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 - -#include "RMakerDevice.h" - -class Node -{ - private: - esp_rmaker_node_t *node; - - public: - Node() - { - node = NULL; - } - void setNodeHandle(esp_rmaker_node_t *rnode) - { - node = rnode; - } - esp_rmaker_node_t *getNodeHandle() - { - return node; - } - - esp_err_t addDevice(Device device); - esp_err_t removeDevice(Device device); - - char *getNodeID(); - node_info_t *getNodeInfo(); - esp_err_t addNodeAttr(const char *attr_name, const char *val); -}; - -#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerParam.cpp b/libraries/RainMaker/src/RMakerParam.cpp deleted file mode 100644 index e1de774017f..00000000000 --- a/libraries/RainMaker/src/RMakerParam.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "RMakerParam.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 - -static esp_err_t err; - -esp_err_t Param::addUIType(const char *ui_type) -{ - err = esp_rmaker_param_add_ui_type(param_handle, ui_type); - if(err != ESP_OK) { - log_e("Add UI type error"); - } - return err; -} - -esp_err_t Param::addBounds(param_val_t min, param_val_t max, param_val_t step) -{ - err = esp_rmaker_param_add_bounds(param_handle, min, max, step); - if(err != ESP_OK) { - log_e("Add Bounds error"); - } - return err; -} - -esp_err_t Param::updateAndReport(param_val_t val) -{ - err = esp_rmaker_param_update_and_report(getParamHandle(), val); - if(err != ESP_OK){ - log_e("Update and Report param failed"); - } - return err; -} - -#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerParam.h b/libraries/RainMaker/src/RMakerParam.h deleted file mode 100644 index 0bd9aedb116..00000000000 --- a/libraries/RainMaker/src/RMakerParam.h +++ /dev/null @@ -1,38 +0,0 @@ -#include "esp_system.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 - -#include "RMakerType.h" - -class Param -{ - private: - const param_handle_t *param_handle; - - public: - Param() - { - param_handle = NULL; - } - Param(const char *param_name, const char *param_type, param_val_t val, uint8_t properties) - { - param_handle = esp_rmaker_param_create(param_name, param_type, val, properties); - } - void setParamHandle(const param_handle_t *param_handle) - { - this->param_handle = param_handle; - } - const char *getParamName() - { - return esp_rmaker_param_get_name(param_handle); - } - const param_handle_t *getParamHandle() - { - return param_handle; - } - - esp_err_t addUIType(const char *ui_type); - esp_err_t addBounds(param_val_t min, param_val_t max, param_val_t step); - esp_err_t updateAndReport(param_val_t val); -}; - -#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerQR.h b/libraries/RainMaker/src/RMakerQR.h deleted file mode 100644 index fd5053d0dde..00000000000 --- a/libraries/RainMaker/src/RMakerQR.h +++ /dev/null @@ -1,24 +0,0 @@ -#include "esp_system.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 - -#include - -#define PROV_QR_VERSION "v1" -#define QRCODE_BASE_URL "https://rainmaker.espressif.com/qrcode.html" - -static void printQR(const char *name, const char *pop, const char *transport) -{ - if (!name || !pop || !transport) { - log_w("Cannot generate QR code payload. Data missing."); - return; - } - char payload[150]; - snprintf(payload, sizeof(payload), "{\"ver\":\"%s\",\"name\":\"%s\"" \ - ",\"pop\":\"%s\",\"transport\":\"%s\"}", - PROV_QR_VERSION, name, pop, transport); - Serial.printf("Scan this QR code from the ESP RainMaker phone app.\n"); - qrcode_display(payload); - Serial.printf("If QR code is not visible, copy paste the below URL in a browser.\n%s?data=%s\n", QRCODE_BASE_URL, payload); -} - -#endif diff --git a/libraries/RainMaker/src/RMakerType.cpp b/libraries/RainMaker/src/RMakerType.cpp deleted file mode 100644 index a4f6f2f381f..00000000000 --- a/libraries/RainMaker/src/RMakerType.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "RMakerType.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 - -param_val_t value(int ival) -{ - return esp_rmaker_int(ival); -} - -param_val_t value(bool bval) -{ - return esp_rmaker_bool(bval); -} - -param_val_t value(char *sval) -{ - return esp_rmaker_str(sval); -} - -param_val_t value(float fval) -{ - return esp_rmaker_float(fval); -} - -#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerType.h b/libraries/RainMaker/src/RMakerType.h deleted file mode 100644 index 09029f9e8a0..00000000000 --- a/libraries/RainMaker/src/RMakerType.h +++ /dev/null @@ -1,23 +0,0 @@ -#include "esp_system.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 - -#include -#include -#include -#include - -typedef esp_rmaker_node_t* node_t; -typedef esp_rmaker_node_info_t node_info_t; -typedef esp_rmaker_param_val_t param_val_t; -typedef esp_rmaker_write_ctx_t write_ctx_t; -typedef esp_rmaker_read_ctx_t read_ctx_t; -typedef esp_rmaker_device_t device_handle_t; -typedef esp_rmaker_param_t param_handle_t; -typedef esp_rmaker_ota_type_t ota_type_t; - -param_val_t value(int); -param_val_t value(bool); -param_val_t value(char *); -param_val_t value(float); - -#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerUtils.h b/libraries/RainMaker/src/RMakerUtils.h deleted file mode 100644 index 41745d2e027..00000000000 --- a/libraries/RainMaker/src/RMakerUtils.h +++ /dev/null @@ -1,16 +0,0 @@ -#include "esp_system.h" -#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_ESP_RMAKER_TASK_STACK && CONFIG_IDF_TARGET_ESP32 - -#include - -static void RMakerFactoryReset(int seconds) -{ - esp_rmaker_factory_reset(seconds); -} - -static void RMakerWiFiReset(int seconds) -{ - esp_rmaker_wifi_reset(seconds); -} - -#endif diff --git a/platform.txt b/platform.txt index 8903d17cd3a..2e1e311e415 100644 --- a/platform.txt +++ b/platform.txt @@ -24,8 +24,8 @@ compiler.prefix={build.tarch}-{build.target}-elf- # # ESP32 Support Start # -compiler.cpreprocessor.flags.esp32=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-263-g000d3823bb" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32" "-I{compiler.sdk.path}/include/soc/esp32/include" "-I{compiler.sdk.path}/include/hal/esp32/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32" "-I{compiler.sdk.path}/include/esp_rom/esp32" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/esp32/include" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/json_parser" "-I{compiler.sdk.path}/include/json_parser/jsmn/include" "-I{compiler.sdk.path}/include/json_generator" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-face/include" "-I{compiler.sdk.path}/include/esp-face/include/tool" "-I{compiler.sdk.path}/include/esp-face/include/typedef" "-I{compiler.sdk.path}/include/esp-face/include/image" "-I{compiler.sdk.path}/include/esp-face/include/math" "-I{compiler.sdk.path}/include/esp-face/include/nn" "-I{compiler.sdk.path}/include/esp-face/include/layer" "-I{compiler.sdk.path}/include/esp-face/include/detect" "-I{compiler.sdk.path}/include/esp-face/include/model_zoo" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" -compiler.c.elf.libs.esp32=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lulp -lwifi_provisioning -lbutton -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lqrcode -lws2812_led -lesp-dsp -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_local_ctrl -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lesp_rainmaker -lmqtt -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -ljson -ljson_parser -ljson_generator -lesp_schedule -lqrcode -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lrtc -lesp_phy -lphy -lrtc -lesp_phy -lphy -lrtc -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc +compiler.cpreprocessor.flags.esp32=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-351-g121ddb87e5" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32" "-I{compiler.sdk.path}/include/soc/esp32/include" "-I{compiler.sdk.path}/include/hal/esp32/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32" "-I{compiler.sdk.path}/include/esp_rom/esp32" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/esp32/include" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.c.elf.libs.esp32=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lulp -lwifi_provisioning -lbutton -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lqrcode -lws2812_led -lesp-dsp -lesp-sr -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lesp_local_ctrl -lrmaker_common -lmqtt -ljson_parser -ljson_generator -lesp_schedule -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lwakenet -lmultinet -lesp_audio_processor -lesp_audio_front_end -lesp-sr -lwakenet -lmultinet -lesp_audio_processor -lesp_audio_front_end -ljson -lspiffs -ldl_lib -lc_speech_features -lhilexin_wn5 -lhilexin_wn5X2 -lhilexin_wn5X3 -lnihaoxiaozhi_wn5 -lnihaoxiaozhi_wn5X2 -lnihaoxiaozhi_wn5X3 -lnihaoxiaoxin_wn5X3 -lcustomized_word_wn5 -lmultinet2_ch -lesp_tts_chinese -lvoice_set_xiaole -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lrtc -lesp_phy -lphy -lrtc -lesp_phy -lphy -lrtc -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32=-mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32=-mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fexceptions -fno-rtti -MMD -c compiler.S.flags.esp32=-ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -x assembler-with-cpp -MMD -c @@ -39,12 +39,12 @@ build.extra_flags.esp32=-DARDUINO_USB_CDC_ON_BOOT=0 # # ESP32S3 Support Start # -compiler.cpreprocessor.flags.esp32s3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-263-g000d3823bb" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32s3" "-I{compiler.sdk.path}/include/soc/esp32s3/include" "-I{compiler.sdk.path}/include/hal/esp32s3/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32s3" "-I{compiler.sdk.path}/include/esp_rom/esp32s3" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s3/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s3/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32s3/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32s3/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32s3" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32s3/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/tinycrypt/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/storage" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/btc/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/client/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/server/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/models/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32s3" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/usb/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/freertos/include/freertos" "-I{compiler.sdk.path}/include/arduino_tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/arduino_tinyusb/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-face/include" "-I{compiler.sdk.path}/include/esp-face/include/tool" "-I{compiler.sdk.path}/include/esp-face/include/typedef" "-I{compiler.sdk.path}/include/esp-face/include/image" "-I{compiler.sdk.path}/include/esp-face/include/math" "-I{compiler.sdk.path}/include/esp-face/include/nn" "-I{compiler.sdk.path}/include/esp-face/include/layer" "-I{compiler.sdk.path}/include/esp-face/include/detect" "-I{compiler.sdk.path}/include/esp-face/include/model_zoo" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" -compiler.c.elf.libs.esp32s3=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lusb -lulp -lwifi_provisioning -lesp-dsp -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_local_ctrl -lesp_https_server -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lmqtt -lperfmon -lusb -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -ljson -larduino_tinyusb -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lbtbb -lesp_phy -lphy -lbtbb -lesp_phy -lphy -lbtbb -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc +compiler.cpreprocessor.flags.esp32s3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-351-g121ddb87e5" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32s3" "-I{compiler.sdk.path}/include/soc/esp32s3/include" "-I{compiler.sdk.path}/include/hal/esp32s3/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32s3" "-I{compiler.sdk.path}/include/esp_rom/esp32s3" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s3/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s3/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32s3/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32s3/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32s3" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32s3/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/tinycrypt/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/storage" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/btc/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/client/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/server/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/models/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32s3" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/usb/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/freertos/include/freertos" "-I{compiler.sdk.path}/include/arduino_tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/arduino_tinyusb/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32s3" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.c.elf.libs.esp32s3=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lusb -lulp -lwifi_provisioning -lbutton -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lqrcode -lws2812_led -lesp-dsp -lesp-sr -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lusb -lesp_local_ctrl -lesp_https_server -lrmaker_common -lmqtt -ljson_parser -ljson_generator -lesp_schedule -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -larduino_tinyusb -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lwakenet -lhufzip -lesp_audio_front_end -lesp_audio_processor -lmultinet -lesp-sr -lwakenet -lhufzip -lesp_audio_front_end -lesp_audio_processor -lmultinet -ljson -lspiffs -ldl_lib -lc_speech_features -lesp_tts_chinese -lvoice_set_xiaole -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lbtbb -lesp_phy -lphy -lbtbb -lesp_phy -lphy -lbtbb -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32s3=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32s3=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fexceptions -fno-rtti -MMD -c compiler.S.flags.esp32s3=-ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -x assembler-with-cpp -MMD -c -compiler.c.elf.flags.esp32s3=-T memory.ld -T sections.ld -T esp32s3.rom.ld -T esp32s3.rom.api.ld -T esp32s3.rom.libgcc.ld -T esp32s3.rom.newlib.ld -T esp32s3.rom.version.ld -T esp32s3.peripherals.ld -mlongcalls -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u ld_include_highint_hdl -u start_app -u start_app_other_cores -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy +compiler.c.elf.flags.esp32s3=-T memory.ld -T sections.ld -T esp32s3.rom.ld -T esp32s3.rom.api.ld -T esp32s3.rom.libgcc.ld -T esp32s3.rom.newlib.ld -T esp32s3.rom.version.ld -T esp32s3.rom.newlib-time.ld -T esp32s3.peripherals.ld -mlongcalls -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u ld_include_highint_hdl -u start_app -u start_app_other_cores -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy compiler.ar.flags.esp32s3=cr build.extra_flags.esp32s3=-DARDUINO_USB_MODE={build.usb_mode} -DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} -DARDUINO_USB_MSC_ON_BOOT={build.msc_on_boot} -DARDUINO_USB_DFU_ON_BOOT={build.dfu_on_boot} # @@ -54,12 +54,12 @@ build.extra_flags.esp32s3=-DARDUINO_USB_MODE={build.usb_mode} -DARDUINO_USB_CDC_ # # ESP32S2 Support Start # -compiler.cpreprocessor.flags.esp32s2=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-263-g000d3823bb" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32s2" "-I{compiler.sdk.path}/include/soc/esp32s2/include" "-I{compiler.sdk.path}/include/hal/esp32s2/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32s2" "-I{compiler.sdk.path}/include/esp_rom/esp32s2" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s2/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s2/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32s2/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32s2/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32s2" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32s2" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/usb/include" "-I{compiler.sdk.path}/include/touch_element/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/freertos/include/freertos" "-I{compiler.sdk.path}/include/arduino_tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/arduino_tinyusb/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-face/include" "-I{compiler.sdk.path}/include/esp-face/include/tool" "-I{compiler.sdk.path}/include/esp-face/include/typedef" "-I{compiler.sdk.path}/include/esp-face/include/image" "-I{compiler.sdk.path}/include/esp-face/include/math" "-I{compiler.sdk.path}/include/esp-face/include/nn" "-I{compiler.sdk.path}/include/esp-face/include/layer" "-I{compiler.sdk.path}/include/esp-face/include/detect" "-I{compiler.sdk.path}/include/esp-face/include/model_zoo" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" -compiler.c.elf.libs.esp32s2=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lusb -ltouch_element -lulp -lwifi_provisioning -lesp-dsp -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_local_ctrl -lesp_https_server -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lmqtt -lperfmon -lusb -ltouch_element -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lwifi_provisioning -lprotocomm -lprotobuf-c -lmdns -ljson -larduino_tinyusb -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lesp_phy -lphy -lesp_phy -lphy -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc +compiler.cpreprocessor.flags.esp32s2=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-351-g121ddb87e5" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32s2" "-I{compiler.sdk.path}/include/soc/esp32s2/include" "-I{compiler.sdk.path}/include/hal/esp32s2/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32s2" "-I{compiler.sdk.path}/include/esp_rom/esp32s2" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s2/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s2/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32s2/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32s2/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32s2" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32s2" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/usb/include" "-I{compiler.sdk.path}/include/touch_element/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/freertos/include/freertos" "-I{compiler.sdk.path}/include/arduino_tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/arduino_tinyusb/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.c.elf.libs.esp32s2=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lusb -ltouch_element -lulp -lwifi_provisioning -lbutton -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lqrcode -lws2812_led -lesp-dsp -lesp-sr -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lusb -ltouch_element -lesp_local_ctrl -lesp_https_server -lrmaker_common -lmqtt -ljson_parser -ljson_generator -lesp_schedule -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lwifi_provisioning -lprotocomm -lprotobuf-c -lmdns -larduino_tinyusb -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -ljson -lspiffs -lesp_tts_chinese -lvoice_set_xiaole -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lesp_phy -lphy -lesp_phy -lphy -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32s2=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32s2=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fexceptions -fno-rtti -MMD -c compiler.S.flags.esp32s2=-ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -x assembler-with-cpp -MMD -c -compiler.c.elf.flags.esp32s2=-T memory.ld -T sections.ld -T esp32s2.rom.ld -T esp32s2.rom.api.ld -T esp32s2.rom.libgcc.ld -T esp32s2.rom.newlib-funcs.ld -T esp32s2.rom.newlib-data.ld -T esp32s2.rom.spiflash.ld -T esp32s2.peripherals.ld -mlongcalls -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u ld_include_highint_hdl -u start_app -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy +compiler.c.elf.flags.esp32s2=-T memory.ld -T sections.ld -T esp32s2.rom.ld -T esp32s2.rom.api.ld -T esp32s2.rom.libgcc.ld -T esp32s2.rom.newlib-funcs.ld -T esp32s2.rom.newlib-data.ld -T esp32s2.rom.spiflash.ld -T esp32s2.rom.newlib-time.ld -T esp32s2.peripherals.ld -mlongcalls -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u ld_include_highint_hdl -u start_app -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy compiler.ar.flags.esp32s2=cr build.extra_flags.esp32s2=-DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} -DARDUINO_USB_MSC_ON_BOOT={build.msc_on_boot} -DARDUINO_USB_DFU_ON_BOOT={build.dfu_on_boot} # @@ -69,12 +69,12 @@ build.extra_flags.esp32s2=-DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT={build. # # ESP32C3 Support Start # -compiler.cpreprocessor.flags.esp32c3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-263-g000d3823bb" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/riscv/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32c3" "-I{compiler.sdk.path}/include/soc/esp32c3/include" "-I{compiler.sdk.path}/include/hal/esp32c3/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32c3" "-I{compiler.sdk.path}/include/esp_rom/esp32c3" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/include/riscv" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/riscv/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32c3/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32c3/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32c3/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/riscv" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32c3" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/riscv" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32c3/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32c3" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-face/include" "-I{compiler.sdk.path}/include/esp-face/include/tool" "-I{compiler.sdk.path}/include/esp-face/include/typedef" "-I{compiler.sdk.path}/include/esp-face/include/image" "-I{compiler.sdk.path}/include/esp-face/include/math" "-I{compiler.sdk.path}/include/esp-face/include/nn" "-I{compiler.sdk.path}/include/esp-face/include/layer" "-I{compiler.sdk.path}/include/esp-face/include/detect" "-I{compiler.sdk.path}/include/esp-face/include/model_zoo" "-I{compiler.sdk.path}/include/fb_gfx/include" -compiler.c.elf.libs.esp32c3=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lspiffs -lwifi_provisioning -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_local_ctrl -lesp_https_server -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lmqtt -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -ljson -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lbtbb -lesp_phy -lphy -lbtbb -lesp_phy -lphy -lbtbb -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc -compiler.c.flags.esp32c3=-march=rv32imc -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c -compiler.cpp.flags.esp32c3=-march=rv32imc -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fno-exceptions -fno-rtti -MMD -c -compiler.S.flags.esp32c3=-ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -x assembler-with-cpp -MMD -c -compiler.c.elf.flags.esp32c3=-T memory.ld -T sections.ld -T esp32c3.rom.ld -T esp32c3.rom.api.ld -T esp32c3.rom.libgcc.ld -T esp32c3.rom.newlib.ld -T esp32c3.rom.version.ld -T esp32c3.rom.eco3.ld -T esp32c3.peripherals.ld -nostartfiles -march=rv32imc --specs=nosys.specs -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u start_app -u __ubsan_include -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -Wl,--wrap=_Unwind_SetEnableExceptionFdeSorting -Wl,--wrap=__register_frame_info_bases -Wl,--wrap=__register_frame_info -Wl,--wrap=__register_frame -Wl,--wrap=__register_frame_info_table_bases -Wl,--wrap=__register_frame_info_table -Wl,--wrap=__register_frame_table -Wl,--wrap=__deregister_frame_info_bases -Wl,--wrap=__deregister_frame_info -Wl,--wrap=_Unwind_Find_FDE -Wl,--wrap=_Unwind_GetGR -Wl,--wrap=_Unwind_GetCFA -Wl,--wrap=_Unwind_GetIP -Wl,--wrap=_Unwind_GetIPInfo -Wl,--wrap=_Unwind_GetRegionStart -Wl,--wrap=_Unwind_GetDataRelBase -Wl,--wrap=_Unwind_GetTextRelBase -Wl,--wrap=_Unwind_SetIP -Wl,--wrap=_Unwind_SetGR -Wl,--wrap=_Unwind_GetLanguageSpecificData -Wl,--wrap=_Unwind_FindEnclosingFunction -Wl,--wrap=_Unwind_Resume -Wl,--wrap=_Unwind_RaiseException -Wl,--wrap=_Unwind_DeleteException -Wl,--wrap=_Unwind_ForcedUnwind -Wl,--wrap=_Unwind_Resume_or_Rethrow -Wl,--wrap=_Unwind_Backtrace -Wl,--wrap=__cxa_call_unexpected -Wl,--wrap=__gxx_personality_v0 -u __cxa_guard_dummy -u __cxx_fatal_exception +compiler.cpreprocessor.flags.esp32c3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-351-g121ddb87e5" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/riscv/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32c3" "-I{compiler.sdk.path}/include/soc/esp32c3/include" "-I{compiler.sdk.path}/include/hal/esp32c3/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32c3" "-I{compiler.sdk.path}/include/esp_rom/esp32c3" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/include/riscv" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/riscv/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32c3/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32c3/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32c3/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/riscv" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32c3" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/riscv" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32c3/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32c3" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.c.elf.libs.esp32c3=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lspiffs -lwifi_provisioning -lbutton -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lqrcode -lws2812_led -lesp-dsp -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lesp_local_ctrl -lesp_https_server -lrmaker_common -lmqtt -ljson_parser -ljson_generator -lesp_schedule -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -ljson -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lbtbb -lesp_phy -lphy -lbtbb -lesp_phy -lphy -lbtbb -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc +compiler.c.flags.esp32c3=-march=rv32imc -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c +compiler.cpp.flags.esp32c3=-march=rv32imc -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fexceptions -fno-rtti -MMD -c +compiler.S.flags.esp32c3=-ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -x assembler-with-cpp -MMD -c +compiler.c.elf.flags.esp32c3=-T memory.ld -T sections.ld -T esp32c3.rom.ld -T esp32c3.rom.api.ld -T esp32c3.rom.libgcc.ld -T esp32c3.rom.newlib.ld -T esp32c3.rom.version.ld -T esp32c3.rom.newlib-time.ld -T esp32c3.rom.eco3.ld -T esp32c3.peripherals.ld -nostartfiles -march=rv32imc --specs=nosys.specs -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u start_app -u __ubsan_include -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy compiler.ar.flags.esp32c3=cr build.extra_flags.esp32c3=-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} # @@ -82,7 +82,7 @@ build.extra_flags.esp32c3=-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT={build. # # Compile Flags -compiler.cpreprocessor.flags={compiler.cpreprocessor.flags.{build.mcu}} +compiler.cpreprocessor.flags={compiler.cpreprocessor.flags.{build.mcu}} "-I{compiler.sdk.path}/{build.memory_type}/include" compiler.c.flags={compiler.c.flags.{build.mcu}} compiler.cpp.flags={compiler.cpp.flags.{build.mcu}} compiler.S.flags={compiler.S.flags.{build.mcu}} @@ -120,7 +120,9 @@ compiler.libraries.ldflags= build.memory_type=qspi_qspi build.flash_size=4MB build.flash_mode=dio +build.flash_freq=80m build.boot=qio +build.boot_freq={build.flash_freq} build.bootloader_addr=0x1000 build.code_debug=0 build.defines= @@ -143,8 +145,8 @@ recipe.hooks.prebuild.2.pattern.windows=cmd /c if not exist "{build.path}\partit recipe.hooks.prebuild.3.pattern.windows=cmd /c if not exist "{build.path}\partitions.csv" COPY "{runtime.platform.path}\tools\partitions\{build.partitions}.csv" "{build.path}\partitions.csv" # Check if custom bootloader exist: source > variant > build.boot -recipe.hooks.prebuild.4.pattern=bash -c "[ -f "{build.source.path}"/bootloader.bin ] && cp -f "{build.source.path}"/bootloader.bin "{build.path}"/{build.project_name}.bootloader.bin || ( [ -f "{build.variant.path}"/bootloader.bin ] && cp "{build.variant.path}"/bootloader.bin "{build.path}"/{build.project_name}.bootloader.bin || cp -f "{runtime.platform.path}"/tools/sdk/{build.mcu}/bin/bootloader_{build.boot}_{build.flash_freq}.bin "{build.path}"/{build.project_name}.bootloader.bin )" -recipe.hooks.prebuild.4.pattern.windows=cmd /c IF EXIST "{build.source.path}\bootloader.bin" ( COPY /y "{build.source.path}\bootloader.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ELSE ( IF EXIST "{build.variant.path}\bootloader.bin" ( COPY "{build.variant.path}\bootloader.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ELSE ( COPY /y "{runtime.platform.path}\tools\sdk\{build.mcu}\bin\bootloader_{build.boot}_{build.flash_freq}.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ) +recipe.hooks.prebuild.4.pattern=bash -c "[ -f "{build.source.path}"/bootloader.bin ] && cp -f "{build.source.path}"/bootloader.bin "{build.path}"/{build.project_name}.bootloader.bin || ( [ -f "{build.variant.path}"/bootloader.bin ] && cp "{build.variant.path}"/bootloader.bin "{build.path}"/{build.project_name}.bootloader.bin || cp -f "{runtime.platform.path}"/tools/sdk/{build.mcu}/bin/bootloader_{build.boot}_{build.boot_freq}.bin "{build.path}"/{build.project_name}.bootloader.bin )" +recipe.hooks.prebuild.4.pattern.windows=cmd /c IF EXIST "{build.source.path}\bootloader.bin" ( COPY /y "{build.source.path}\bootloader.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ELSE ( IF EXIST "{build.variant.path}\bootloader.bin" ( COPY "{build.variant.path}\bootloader.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ELSE ( COPY /y "{runtime.platform.path}\tools\sdk\{build.mcu}\bin\bootloader_{build.boot}_{build.boot_freq}.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ) # Check if custom build options exist in the sketch folder recipe.hooks.prebuild.5.pattern=bash -c "[ ! -f "{build.source.path}"/build_opt.h ] || cp -f "{build.source.path}"/build_opt.h "{build.path}"/build_opt.h" diff --git a/tools/esptool.py b/tools/esptool.py index 9545c2e1411..aaec1854581 100755 --- a/tools/esptool.py +++ b/tools/esptool.py @@ -541,7 +541,7 @@ def _get_pid(self): active_port = self._port.port # Pyserial only identifies regular ports, URL handlers are not supported - if not active_port.startswith(("COM", "/dev/")): + if not active_port.lower().startswith(("com", "/dev/")): print("\nDevice PID identification is only supported on COM and /dev/ serial ports.") return # Return the real path if the active port is a symlink @@ -674,7 +674,8 @@ def connect(self, mode='default_reset', attempts=DEFAULT_CONNECT_ATTEMPTS, detec chip_magic_value = self.read_reg(ESPLoader.CHIP_DETECT_MAGIC_REG_ADDR) if chip_magic_value not in self.CHIP_DETECT_MAGIC_VALUE: actually = None - for cls in [ESP8266ROM, ESP32ROM, ESP32S2ROM, ESP32S3BETA2ROM, ESP32S3ROM, ESP32C3ROM, ESP32H2BETA1ROM, ESP32C2ROM, ESP32H2BETA2ROM]: + for cls in [ESP8266ROM, ESP32ROM, ESP32S2ROM, ESP32S3BETA2ROM, ESP32S3ROM, + ESP32C3ROM, ESP32H2BETA1ROM, ESP32H2BETA2ROM, ESP32C2ROM, ESP32C6BETAROM]: if chip_magic_value in cls.CHIP_DETECT_MAGIC_VALUE: actually = cls break diff --git a/tools/platformio-build-esp32.py b/tools/platformio-build-esp32.py index 2fac4cd1b8c..1a63d35f755 100644 --- a/tools/platformio-build-esp32.py +++ b/tools/platformio-build-esp32.py @@ -126,6 +126,7 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_hw_support", "include", "soc"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_hw_support", "include", "soc", "esp32"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_hw_support", "port", "esp32"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_hw_support", "port", "esp32", "private_include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "heap", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "log", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "lwip", "include", "apps"), @@ -239,9 +240,10 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "ulp", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "wifi_provisioning", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "button", "button", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "json_parser"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "json_parser", "jsmn", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "json_generator"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "rmaker_common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "json_parser", "upstream", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "json_parser", "upstream"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "json_generator", "upstream"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_schedule", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_rainmaker", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "qrcode", "include"), @@ -273,29 +275,32 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "kalman", "ekf_imu13states", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_littlefs", "src"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_littlefs", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-face", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-face", "include", "tool"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-face", "include", "typedef"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-face", "include", "image"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-face", "include", "math"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-face", "include", "nn"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-face", "include", "layer"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-face", "include", "detect"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-face", "include", "model_zoo"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dl", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dl", "include", "tool"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dl", "include", "typedef"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dl", "include", "image"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dl", "include", "math"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dl", "include", "nn"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dl", "include", "layer"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dl", "include", "detect"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dl", "include", "model_zoo"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-sr", "esp-tts", "esp_tts_chinese", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-sr", "include", "esp32"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp32-camera", "driver", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp32-camera", "conversions", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "fb_gfx", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", env.BoardConfig().get("build.arduino.memory_type", "qspi_qspi"), "include"), join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core")) ], LIBPATH=[ join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "lib"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "ld"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "qspi_qspi") + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", env.BoardConfig().get("build.arduino.memory_type", "qspi_qspi")) ], LIBS=[ - "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lbt", "-lcbor", "-lunity", "-lcmock", "-lcoap", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lesp_lcd", "-lprotobuf-c", "-lprotocomm", "-lmdns", "-lesp_local_ctrl", "-lsdmmc", "-lesp_serial_slave_link", "-lesp_websocket_client", "-lexpat", "-lwear_levelling", "-lfatfs", "-lfreemodbus", "-ljsmn", "-ljson", "-llibsodium", "-lmqtt", "-lopenssl", "-lperfmon", "-lspiffs", "-lulp", "-lwifi_provisioning", "-lbutton", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lqrcode", "-lws2812_led", "-lesp-dsp", "-lesp32-camera", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcbor", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_local_ctrl", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lperfmon", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lspiffs", "-lesp_rainmaker", "-lmqtt", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-ljson", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lqrcode", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lphy", "-lrtc", "-lesp_phy", "-lphy", "-lrtc", "-lesp_phy", "-lphy", "-lrtc", "-lxt_hal", "-lm", "-lnewlib", "-lstdc++", "-lpthread", "-lgcc", "-lcxx", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" + "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lbt", "-lcbor", "-lunity", "-lcmock", "-lcoap", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lesp_lcd", "-lprotobuf-c", "-lprotocomm", "-lmdns", "-lesp_local_ctrl", "-lsdmmc", "-lesp_serial_slave_link", "-lesp_websocket_client", "-lexpat", "-lwear_levelling", "-lfatfs", "-lfreemodbus", "-ljsmn", "-ljson", "-llibsodium", "-lmqtt", "-lopenssl", "-lperfmon", "-lspiffs", "-lulp", "-lwifi_provisioning", "-lbutton", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lqrcode", "-lws2812_led", "-lesp-dsp", "-lesp-sr", "-lesp32-camera", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcbor", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lperfmon", "-lesp_local_ctrl", "-lrmaker_common", "-lmqtt", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lwakenet", "-lmultinet", "-lesp_audio_processor", "-lesp_audio_front_end", "-lesp-sr", "-lwakenet", "-lmultinet", "-lesp_audio_processor", "-lesp_audio_front_end", "-ljson", "-lspiffs", "-ldl_lib", "-lc_speech_features", "-lhilexin_wn5", "-lhilexin_wn5X2", "-lhilexin_wn5X3", "-lnihaoxiaozhi_wn5", "-lnihaoxiaozhi_wn5X2", "-lnihaoxiaozhi_wn5X3", "-lnihaoxiaoxin_wn5X3", "-lcustomized_word_wn5", "-lmultinet2_ch", "-lesp_tts_chinese", "-lvoice_set_xiaole", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lphy", "-lrtc", "-lesp_phy", "-lphy", "-lrtc", "-lesp_phy", "-lphy", "-lrtc", "-lxt_hal", "-lm", "-lnewlib", "-lstdc++", "-lpthread", "-lgcc", "-lcxx", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" ], CPPDEFINES=[ @@ -304,7 +309,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-263-g000d3823bb\\"'), + ("IDF_VER", '\\"v4.4-351-g121ddb87e5\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32c3.py b/tools/platformio-build-esp32c3.py index 8aaca3faf36..590b173dfb0 100644 --- a/tools/platformio-build-esp32c3.py +++ b/tools/platformio-build-esp32c3.py @@ -48,7 +48,7 @@ CXXFLAGS=[ "-march=rv32imc", "-std=gnu++11", - "-fno-exceptions", + "-fexceptions", "-fno-rtti" ], @@ -66,6 +66,8 @@ "-Wno-format", "-Os", "-freorder-blocks", + "-Wwrite-strings", + "-fstack-protector", "-fstrict-volatile-bitfields", "-Wno-error=unused-but-set-variable", "-fno-jump-tables", @@ -82,35 +84,6 @@ "-fno-rtti", "-fno-lto", "-Wl,--undefined=uxTopUsedPriority", - "-Wl,--wrap=_Unwind_SetEnableExceptionFdeSorting", - "-Wl,--wrap=__register_frame_info_bases", - "-Wl,--wrap=__register_frame_info", - "-Wl,--wrap=__register_frame", - "-Wl,--wrap=__register_frame_info_table_bases", - "-Wl,--wrap=__register_frame_info_table", - "-Wl,--wrap=__register_frame_table", - "-Wl,--wrap=__deregister_frame_info_bases", - "-Wl,--wrap=__deregister_frame_info", - "-Wl,--wrap=_Unwind_Find_FDE", - "-Wl,--wrap=_Unwind_GetGR", - "-Wl,--wrap=_Unwind_GetCFA", - "-Wl,--wrap=_Unwind_GetIP", - "-Wl,--wrap=_Unwind_GetIPInfo", - "-Wl,--wrap=_Unwind_GetRegionStart", - "-Wl,--wrap=_Unwind_GetDataRelBase", - "-Wl,--wrap=_Unwind_GetTextRelBase", - "-Wl,--wrap=_Unwind_SetIP", - "-Wl,--wrap=_Unwind_SetGR", - "-Wl,--wrap=_Unwind_GetLanguageSpecificData", - "-Wl,--wrap=_Unwind_FindEnclosingFunction", - "-Wl,--wrap=_Unwind_Resume", - "-Wl,--wrap=_Unwind_RaiseException", - "-Wl,--wrap=_Unwind_DeleteException", - "-Wl,--wrap=_Unwind_ForcedUnwind", - "-Wl,--wrap=_Unwind_Resume_or_Rethrow", - "-Wl,--wrap=_Unwind_Backtrace", - "-Wl,--wrap=__cxa_call_unexpected", - "-Wl,--wrap=__gxx_personality_v0", "-T", "memory.ld", "-T", "sections.ld", "-T", "esp32c3.rom.ld", @@ -118,6 +91,7 @@ "-T", "esp32c3.rom.libgcc.ld", "-T", "esp32c3.rom.newlib.ld", "-T", "esp32c3.rom.version.ld", + "-T", "esp32c3.rom.newlib-time.ld", "-T", "esp32c3.rom.eco3.ld", "-T", "esp32c3.peripherals.ld", "-u", "_Z5setupv", @@ -137,7 +111,6 @@ "-u", "newlib_include_pthread_impl", "-u", "newlib_include_assert_impl", "-u", "__cxa_guard_dummy", - "-u", "__cxx_fatal_exception", '-Wl,-Map="%s"' % join("$BUILD_DIR", basename(env.subst("${PROJECT_DIR}.map"))) ], @@ -263,29 +236,64 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "openssl", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "spiffs", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "wifi_provisioning", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "button", "button", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "rmaker_common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "json_parser", "upstream", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "json_parser", "upstream"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "json_generator", "upstream"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp_schedule", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp_rainmaker", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "qrcode", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "ws2812_led"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "dotprod", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "support", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "hann", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "blackman", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "blackman_harris", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "blackman_nuttall", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "nuttall", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "flat_top", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "iir", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "fir", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "add", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "sub", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "mul", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "addc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "mulc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "sqrt", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "matrix", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "fft", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "dct", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "conv", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "kalman", "ekf", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "kalman", "ekf_imu13states", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp_littlefs", "src"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp_littlefs", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-face", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-face", "include", "tool"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-face", "include", "typedef"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-face", "include", "image"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-face", "include", "math"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-face", "include", "nn"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-face", "include", "layer"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-face", "include", "detect"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-face", "include", "model_zoo"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "tool"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "typedef"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "image"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "math"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "nn"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "layer"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "detect"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "model_zoo"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "fb_gfx", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", env.BoardConfig().get("build.arduino.memory_type", "qspi_qspi"), "include"), join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core")) ], LIBPATH=[ join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "lib"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "ld"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "qspi_qspi") + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", env.BoardConfig().get("build.arduino.memory_type", "qspi_qspi")) ], LIBS=[ - "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lbt", "-lcbor", "-lunity", "-lcmock", "-lcoap", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lesp_https_server", "-lesp_lcd", "-lprotobuf-c", "-lprotocomm", "-lmdns", "-lesp_local_ctrl", "-lsdmmc", "-lesp_serial_slave_link", "-lesp_websocket_client", "-lexpat", "-lwear_levelling", "-lfatfs", "-lfreemodbus", "-ljsmn", "-ljson", "-llibsodium", "-lmqtt", "-lopenssl", "-lspiffs", "-lwifi_provisioning", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcbor", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_local_ctrl", "-lesp_https_server", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lmqtt", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lspiffs", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-ljson", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lm", "-lnewlib", "-lstdc++", "-lpthread", "-lgcc", "-lcxx", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" + "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lbt", "-lcbor", "-lunity", "-lcmock", "-lcoap", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lesp_https_server", "-lesp_lcd", "-lprotobuf-c", "-lprotocomm", "-lmdns", "-lesp_local_ctrl", "-lsdmmc", "-lesp_serial_slave_link", "-lesp_websocket_client", "-lexpat", "-lwear_levelling", "-lfatfs", "-lfreemodbus", "-ljsmn", "-ljson", "-llibsodium", "-lmqtt", "-lopenssl", "-lspiffs", "-lwifi_provisioning", "-lbutton", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lqrcode", "-lws2812_led", "-lesp-dsp", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcbor", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lesp_local_ctrl", "-lesp_https_server", "-lrmaker_common", "-lmqtt", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lspiffs", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-ljson", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lriscv", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lm", "-lnewlib", "-lstdc++", "-lpthread", "-lgcc", "-lcxx", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" ], CPPDEFINES=[ @@ -294,7 +302,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-263-g000d3823bb\\"'), + ("IDF_VER", '\\"v4.4-351-g121ddb87e5\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32s2.py b/tools/platformio-build-esp32s2.py index 6538a61e85e..b55dcf4af2f 100644 --- a/tools/platformio-build-esp32s2.py +++ b/tools/platformio-build-esp32s2.py @@ -88,6 +88,7 @@ "-T", "esp32s2.rom.newlib-funcs.ld", "-T", "esp32s2.rom.newlib-data.ld", "-T", "esp32s2.rom.spiflash.ld", + "-T", "esp32s2.rom.newlib-time.ld", "-T", "esp32s2.peripherals.ld", "-u", "_Z5setupv", "-u", "_Z4loopv", @@ -230,6 +231,15 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "touch_element", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "ulp", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "wifi_provisioning", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "button", "button", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "rmaker_common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "json_parser", "upstream", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "json_parser", "upstream"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "json_generator", "upstream"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp_schedule", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp_rainmaker", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "qrcode", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "ws2812_led"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "dotprod", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "support", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "windows", "include"), @@ -260,29 +270,32 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "arduino_tinyusb", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp_littlefs", "src"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp_littlefs", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-face", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-face", "include", "tool"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-face", "include", "typedef"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-face", "include", "image"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-face", "include", "math"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-face", "include", "nn"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-face", "include", "layer"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-face", "include", "detect"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-face", "include", "model_zoo"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dl", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dl", "include", "tool"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dl", "include", "typedef"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dl", "include", "image"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dl", "include", "math"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dl", "include", "nn"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dl", "include", "layer"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dl", "include", "detect"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dl", "include", "model_zoo"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-sr", "esp-tts", "esp_tts_chinese", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-sr", "include", "esp32"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp32-camera", "driver", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp32-camera", "conversions", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "fb_gfx", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", env.BoardConfig().get("build.arduino.memory_type", "qspi_qspi"), "include"), join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core")) ], LIBPATH=[ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "lib"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "ld"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "qspi_qspi") + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", env.BoardConfig().get("build.arduino.memory_type", "qspi_qspi")) ], LIBS=[ - "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lcbor", "-lunity", "-lcmock", "-lcoap", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lesp_https_server", "-lesp_lcd", "-lprotobuf-c", "-lprotocomm", "-lmdns", "-lesp_local_ctrl", "-lsdmmc", "-lesp_serial_slave_link", "-lesp_websocket_client", "-lexpat", "-lwear_levelling", "-lfatfs", "-lfreemodbus", "-ljsmn", "-ljson", "-llibsodium", "-lmqtt", "-lopenssl", "-lperfmon", "-lspiffs", "-lusb", "-ltouch_element", "-lulp", "-lwifi_provisioning", "-lesp-dsp", "-lesp32-camera", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcbor", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_local_ctrl", "-lesp_https_server", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lmqtt", "-lperfmon", "-lusb", "-ltouch_element", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lspiffs", "-lwifi_provisioning", "-lprotocomm", "-lprotobuf-c", "-lmdns", "-ljson", "-larduino_tinyusb", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lphy", "-lesp_phy", "-lphy", "-lesp_phy", "-lphy", "-lxt_hal", "-lm", "-lnewlib", "-lstdc++", "-lpthread", "-lgcc", "-lcxx", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" + "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lcbor", "-lunity", "-lcmock", "-lcoap", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lesp_https_server", "-lesp_lcd", "-lprotobuf-c", "-lprotocomm", "-lmdns", "-lesp_local_ctrl", "-lsdmmc", "-lesp_serial_slave_link", "-lesp_websocket_client", "-lexpat", "-lwear_levelling", "-lfatfs", "-lfreemodbus", "-ljsmn", "-ljson", "-llibsodium", "-lmqtt", "-lopenssl", "-lperfmon", "-lspiffs", "-lusb", "-ltouch_element", "-lulp", "-lwifi_provisioning", "-lbutton", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lqrcode", "-lws2812_led", "-lesp-dsp", "-lesp-sr", "-lesp32-camera", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcbor", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lperfmon", "-lusb", "-ltouch_element", "-lesp_local_ctrl", "-lesp_https_server", "-lrmaker_common", "-lmqtt", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lwifi_provisioning", "-lprotocomm", "-lprotobuf-c", "-lmdns", "-larduino_tinyusb", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-ljson", "-lspiffs", "-lesp_tts_chinese", "-lvoice_set_xiaole", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lphy", "-lesp_phy", "-lphy", "-lesp_phy", "-lphy", "-lxt_hal", "-lm", "-lnewlib", "-lstdc++", "-lpthread", "-lgcc", "-lcxx", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" ], CPPDEFINES=[ @@ -291,7 +304,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-263-g000d3823bb\\"'), + ("IDF_VER", '\\"v4.4-351-g121ddb87e5\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32s3.py b/tools/platformio-build-esp32s3.py index 3bf393d0762..5d0c598b7f3 100644 --- a/tools/platformio-build-esp32s3.py +++ b/tools/platformio-build-esp32s3.py @@ -87,6 +87,7 @@ "-T", "esp32s3.rom.libgcc.ld", "-T", "esp32s3.rom.newlib.ld", "-T", "esp32s3.rom.version.ld", + "-T", "esp32s3.rom.newlib-time.ld", "-T", "esp32s3.peripherals.ld", "-u", "_Z5setupv", "-u", "_Z4loopv", @@ -247,6 +248,15 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "usb", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "ulp", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "wifi_provisioning", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "button", "button", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "rmaker_common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "json_parser", "upstream", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "json_parser", "upstream"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "json_generator", "upstream"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp_schedule", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp_rainmaker", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "qrcode", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "ws2812_led"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "dotprod", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "support", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "windows", "include"), @@ -277,29 +287,32 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "arduino_tinyusb", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp_littlefs", "src"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp_littlefs", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-face", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-face", "include", "tool"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-face", "include", "typedef"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-face", "include", "image"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-face", "include", "math"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-face", "include", "nn"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-face", "include", "layer"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-face", "include", "detect"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-face", "include", "model_zoo"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dl", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dl", "include", "tool"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dl", "include", "typedef"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dl", "include", "image"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dl", "include", "math"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dl", "include", "nn"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dl", "include", "layer"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dl", "include", "detect"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dl", "include", "model_zoo"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-sr", "esp-tts", "esp_tts_chinese", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-sr", "include", "esp32s3"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp32-camera", "driver", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp32-camera", "conversions", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "fb_gfx", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", env.BoardConfig().get("build.arduino.memory_type", "qspi_qspi"), "include"), join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core")) ], LIBPATH=[ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "lib"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "ld"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "qspi_qspi") + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", env.BoardConfig().get("build.arduino.memory_type", "qspi_qspi")) ], LIBS=[ - "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lbt", "-lcbor", "-lunity", "-lcmock", "-lcoap", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lesp_https_server", "-lesp_lcd", "-lprotobuf-c", "-lprotocomm", "-lmdns", "-lesp_local_ctrl", "-lsdmmc", "-lesp_serial_slave_link", "-lesp_websocket_client", "-lexpat", "-lwear_levelling", "-lfatfs", "-lfreemodbus", "-ljsmn", "-ljson", "-llibsodium", "-lmqtt", "-lopenssl", "-lperfmon", "-lspiffs", "-lusb", "-lulp", "-lwifi_provisioning", "-lesp-dsp", "-lesp32-camera", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcbor", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_local_ctrl", "-lesp_https_server", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lmqtt", "-lperfmon", "-lusb", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lspiffs", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-ljson", "-larduino_tinyusb", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lxt_hal", "-lm", "-lnewlib", "-lstdc++", "-lpthread", "-lgcc", "-lcxx", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" + "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lbt", "-lcbor", "-lunity", "-lcmock", "-lcoap", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lesp_https_server", "-lesp_lcd", "-lprotobuf-c", "-lprotocomm", "-lmdns", "-lesp_local_ctrl", "-lsdmmc", "-lesp_serial_slave_link", "-lesp_websocket_client", "-lexpat", "-lwear_levelling", "-lfatfs", "-lfreemodbus", "-ljsmn", "-ljson", "-llibsodium", "-lmqtt", "-lopenssl", "-lperfmon", "-lspiffs", "-lusb", "-lulp", "-lwifi_provisioning", "-lbutton", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lqrcode", "-lws2812_led", "-lesp-dsp", "-lesp-sr", "-lesp32-camera", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcbor", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lperfmon", "-lusb", "-lesp_local_ctrl", "-lesp_https_server", "-lrmaker_common", "-lmqtt", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-larduino_tinyusb", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lwakenet", "-lhufzip", "-lesp_audio_front_end", "-lesp_audio_processor", "-lmultinet", "-lesp-sr", "-lwakenet", "-lhufzip", "-lesp_audio_front_end", "-lesp_audio_processor", "-lmultinet", "-ljson", "-lspiffs", "-ldl_lib", "-lc_speech_features", "-lesp_tts_chinese", "-lvoice_set_xiaole", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lesp_ringbuf", "-lefuse", "-lesp_ipc", "-ldriver", "-lesp_pm", "-lmbedtls", "-lapp_update", "-lbootloader_support", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_gdbstub", "-lespcoredump", "-lesp_phy", "-lesp_system", "-lesp_rom", "-lhal", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-lconsole", "-llwip", "-llog", "-lheap", "-lsoc", "-lesp_hw_support", "-lxtensa", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lxt_hal", "-lm", "-lnewlib", "-lstdc++", "-lpthread", "-lgcc", "-lcxx", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" ], CPPDEFINES=[ @@ -308,7 +321,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-263-g000d3823bb\\"'), + ("IDF_VER", '\\"v4.4-351-g121ddb87e5\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/sdk/esp32/bin/bootloader_dio_40m.bin b/tools/sdk/esp32/bin/bootloader_dio_40m.bin index 7c679745c09..b134810d704 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dio_40m.bin and b/tools/sdk/esp32/bin/bootloader_dio_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_dio_80m.bin b/tools/sdk/esp32/bin/bootloader_dio_80m.bin index 9b66fe6565d..2f35e47d98d 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dio_80m.bin and b/tools/sdk/esp32/bin/bootloader_dio_80m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_dout_40m.bin b/tools/sdk/esp32/bin/bootloader_dout_40m.bin index f6778761b72..685f655930a 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dout_40m.bin and b/tools/sdk/esp32/bin/bootloader_dout_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_dout_80m.bin b/tools/sdk/esp32/bin/bootloader_dout_80m.bin index 8e05b024f0a..7a11199ee36 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dout_80m.bin and b/tools/sdk/esp32/bin/bootloader_dout_80m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qio_40m.bin b/tools/sdk/esp32/bin/bootloader_qio_40m.bin index 0f0c054ca64..d316c3b852f 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qio_40m.bin and b/tools/sdk/esp32/bin/bootloader_qio_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qio_80m.bin b/tools/sdk/esp32/bin/bootloader_qio_80m.bin index dffa930bd1f..82fd51d672a 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qio_80m.bin and b/tools/sdk/esp32/bin/bootloader_qio_80m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qout_40m.bin b/tools/sdk/esp32/bin/bootloader_qout_40m.bin index 16a3a4d0552..4bb8709cbee 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qout_40m.bin and b/tools/sdk/esp32/bin/bootloader_qout_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qout_80m.bin b/tools/sdk/esp32/bin/bootloader_qout_80m.bin index 312d5a0de28..311266e9179 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qout_80m.bin and b/tools/sdk/esp32/bin/bootloader_qout_80m.bin differ diff --git a/tools/sdk/esp32/include/driver/include/driver/i2s.h b/tools/sdk/esp32/include/driver/include/driver/i2s.h index aa649ed479c..389b631ba7e 100644 --- a/tools/sdk/esp32/include/driver/include/driver/i2s.h +++ b/tools/sdk/esp32/include/driver/include/driver/i2s.h @@ -78,7 +78,7 @@ typedef struct { * */ typedef struct { - int mck_io_num; /*!< MCK in out pin*/ + int mck_io_num; /*!< MCK in out pin. Note that ESP32 supports setting MCK on GPIO0/GPIO1/GPIO3 only*/ int bck_io_num; /*!< BCK in out pin*/ int ws_io_num; /*!< WS in out pin*/ int data_out_num; /*!< DATA out pin*/ @@ -97,8 +97,22 @@ typedef struct { i2s_channel_fmt_t channel_format; /*!< I2S channel format.*/ i2s_comm_format_t communication_format; /*!< I2S communication format */ int intr_alloc_flags; /*!< Flags used to allocate the interrupt. One or multiple (ORred) ESP_INTR_FLAG_* values. See esp_intr_alloc.h for more info */ - int dma_buf_count; /*!< I2S DMA Buffer Count */ - int dma_buf_len; /*!< I2S DMA Buffer Length */ + int dma_buf_count; /**< The total number of DMA buffers to receive/transmit data. + * A descriptor includes some information such as buffer address, + * the address of the next descriptor, and the buffer length. + * Since one descriptor points to one buffer, therefore, 'dma_desc_num' can be interpreted as the total number of DMA buffers used to store data from DMA interrupt. + * Notice that these buffers are internal to'i2s_read' and descriptors are created automatically inside of the I2S driver. + * Users only need to set the buffer number while the length is derived from the parameter described below. + */ + int dma_buf_len; /**< Number of frames in a DMA buffer. + * A frame means the data of all channels in a WS cycle. + * The real_dma_buf_size = dma_buf_len * chan_num * bits_per_chan / 8. + * For example, if two channels in stereo mode (i.e., 'channel_format' is set to 'I2S_CHANNEL_FMT_RIGHT_LEFT') are active, + * and each channel transfers 32 bits (i.e., 'bits_per_sample' is set to 'I2S_BITS_PER_CHAN_32BIT'), + * then the total number of bytes of a frame is 'channel_format' * 'bits_per_sample' = 2 * 32 / 8 = 8 bytes. + * We assume that the current 'dma_buf_len' is 100, then the real length of the DMA buffer is 8 * 100 = 800 bytes. + * Note that the length of an internal real DMA buffer shouldn't be greater than 4092. + */ bool use_apll; /*!< I2S using APLL as main I2S clock, enable it to get accurate clock */ bool tx_desc_auto_clear; /*!< I2S auto clear tx descriptor if there is underflow condition (helps in avoiding noise in case of data unavailability) */ int fixed_mclk; /*!< I2S using fixed MCLK output. If use_apll = true and fixed_mclk > 0, then the clock output for i2s is fixed and equal to the fixed_mclk value. If fixed_mclk set, mclk_multiple won't take effect */ diff --git a/tools/sdk/esp32/include/driver/include/driver/ledc.h b/tools/sdk/esp32/include/driver/include/driver/ledc.h index 0e7f7169296..7b22f3d1779 100644 --- a/tools/sdk/esp32/include/driver/include/driver/ledc.h +++ b/tools/sdk/esp32/include/driver/include/driver/ledc.h @@ -85,6 +85,7 @@ esp_err_t ledc_timer_config(const ledc_timer_config_t* timer_conf); * @brief LEDC update channel parameters * @note Call this function to activate the LEDC updated parameters. * After ledc_set_duty, we need to call this function to update the settings. + * And the new LEDC parameters don't take effect until the next PWM cycle. * @note ledc_set_duty, ledc_set_duty_with_hpoint and ledc_update_duty are not thread-safe, do not call these functions to * control one LEDC channel in different tasks at the same time. * A thread-safe version of API is ledc_set_duty_and_update @@ -203,6 +204,9 @@ esp_err_t ledc_set_duty(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t /** * @brief LEDC get duty + * This function returns the duty at the present PWM cycle. + * You shouldn't expect the function to return the new duty in the same cycle of calling ledc_update_duty, + * because duty update doesn't take effect until the next cycle. * * @param speed_mode Select the LEDC channel group with specified speed mode. Note that not all targets support high speed mode. * @param channel LEDC channel (0 - LEDC_CHANNEL_MAX-1), select from ledc_channel_t @@ -385,7 +389,8 @@ void ledc_fade_func_uninstall(void); * Other duty operations will have to wait until the fade operation has finished. * @param speed_mode Select the LEDC channel group with specified speed mode. Note that not all targets support high speed mode. * @param channel LEDC channel number - * @param fade_mode Whether to block until fading done. + * @param fade_mode Whether to block until fading done. See ledc_types.h ledc_fade_mode_t for more info. + * Note that this function will not return until fading to the target duty if LEDC_FADE_WAIT_DONE mode is selected. * * @return * - ESP_OK Success diff --git a/tools/sdk/esp32/include/esp-face/include/detect/dl_detect_define.hpp b/tools/sdk/esp32/include/esp-dl/include/detect/dl_detect_define.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/detect/dl_detect_define.hpp rename to tools/sdk/esp32/include/esp-dl/include/detect/dl_detect_define.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/dl_define.hpp b/tools/sdk/esp32/include/esp-dl/include/dl_define.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/dl_define.hpp rename to tools/sdk/esp32/include/esp-dl/include/dl_define.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/image/dl_image.hpp b/tools/sdk/esp32/include/esp-dl/include/image/dl_image.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/image/dl_image.hpp rename to tools/sdk/esp32/include/esp-dl/include/image/dl_image.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_add2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_add2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_add2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_add2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_avg_pool2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_avg_pool2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_base.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_base.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_base.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_base.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_concat.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_concat.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_concat.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_concat.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_concat2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_concat2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_concat2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_concat2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_conv2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_conv2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_conv2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_conv2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_depthwise_conv2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_depthwise_conv2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_depthwise_conv2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_depthwise_conv2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_expand_dims.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_expand_dims.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_flatten.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_flatten.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_fullyconnected.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_fullyconnected.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_fullyconnected.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_fullyconnected.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_global_avg_pool2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_global_avg_pool2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_global_avg_pool2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_global_avg_pool2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_global_max_pool2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_global_max_pool2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_global_max_pool2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_global_max_pool2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_leakyrelu.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_leakyrelu.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_leakyrelu.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_leakyrelu.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_max2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_max2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max_pool2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_max_pool2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max_pool2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_max_pool2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_min2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_min2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_min2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_min2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_model.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_model.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_model.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_model.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_mul2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_mul2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_mul2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_mul2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_pad.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_pad.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_pad.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_pad.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_prelu.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_prelu.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_prelu.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_prelu.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_relu.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_relu.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_reshape.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_reshape.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_squeeze.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_squeeze.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_sub2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_sub2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp b/tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_transpose.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp rename to tools/sdk/esp32/include/esp-dl/include/layer/dl_layer_transpose.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/math/dl_math.hpp b/tools/sdk/esp32/include/esp-dl/include/math/dl_math.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/math/dl_math.hpp rename to tools/sdk/esp32/include/esp-dl/include/math/dl_math.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/math/dl_math_matrix.hpp b/tools/sdk/esp32/include/esp-dl/include/math/dl_math_matrix.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/math/dl_math_matrix.hpp rename to tools/sdk/esp32/include/esp-dl/include/math/dl_math_matrix.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/model_zoo/cat_face_detect_mn03.hpp b/tools/sdk/esp32/include/esp-dl/include/model_zoo/cat_face_detect_mn03.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/model_zoo/cat_face_detect_mn03.hpp rename to tools/sdk/esp32/include/esp-dl/include/model_zoo/cat_face_detect_mn03.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/model_zoo/color_detector.hpp b/tools/sdk/esp32/include/esp-dl/include/model_zoo/color_detector.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/model_zoo/color_detector.hpp rename to tools/sdk/esp32/include/esp-dl/include/model_zoo/color_detector.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognition_112_v1_s16.hpp b/tools/sdk/esp32/include/esp-dl/include/model_zoo/face_recognition_112_v1_s16.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognition_112_v1_s16.hpp rename to tools/sdk/esp32/include/esp-dl/include/model_zoo/face_recognition_112_v1_s16.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognition_112_v1_s8.hpp b/tools/sdk/esp32/include/esp-dl/include/model_zoo/face_recognition_112_v1_s8.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognition_112_v1_s8.hpp rename to tools/sdk/esp32/include/esp-dl/include/model_zoo/face_recognition_112_v1_s8.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognition_tool.hpp b/tools/sdk/esp32/include/esp-dl/include/model_zoo/face_recognition_tool.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognition_tool.hpp rename to tools/sdk/esp32/include/esp-dl/include/model_zoo/face_recognition_tool.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognizer.hpp b/tools/sdk/esp32/include/esp-dl/include/model_zoo/face_recognizer.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognizer.hpp rename to tools/sdk/esp32/include/esp-dl/include/model_zoo/face_recognizer.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/model_zoo/human_face_detect_mnp01.hpp b/tools/sdk/esp32/include/esp-dl/include/model_zoo/human_face_detect_mnp01.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/model_zoo/human_face_detect_mnp01.hpp rename to tools/sdk/esp32/include/esp-dl/include/model_zoo/human_face_detect_mnp01.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/model_zoo/human_face_detect_msr01.hpp b/tools/sdk/esp32/include/esp-dl/include/model_zoo/human_face_detect_msr01.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/model_zoo/human_face_detect_msr01.hpp rename to tools/sdk/esp32/include/esp-dl/include/model_zoo/human_face_detect_msr01.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_add2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_add2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_add2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_add2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_avg_pool2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_avg_pool2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_avg_pool2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_avg_pool2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_concat.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_concat.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_concat.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_concat.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_concat2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_concat2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_concat2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_concat2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_conv2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_conv2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_conv2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_conv2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_depthwise_conv2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_depthwise_conv2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_depthwise_conv2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_depthwise_conv2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_fully_connected.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_fully_connected.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_fully_connected.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_fully_connected.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_global_avg_pool2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_global_avg_pool2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_global_avg_pool2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_global_avg_pool2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_global_max_pool2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_global_max_pool2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_global_max_pool2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_global_max_pool2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_leakyrelu.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_leakyrelu.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_leakyrelu.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_leakyrelu.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_max2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_max2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_max2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_max2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_max_pool2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_max_pool2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_max_pool2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_max_pool2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_min2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_min2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_min2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_min2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_mul2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_mul2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_mul2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_mul2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_pad.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_pad.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_pad.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_pad.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_prelu.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_prelu.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_prelu.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_prelu.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_relu.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_relu.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_relu.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_relu.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/nn/dl_nn_sub2d.hpp b/tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_sub2d.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/nn/dl_nn_sub2d.hpp rename to tools/sdk/esp32/include/esp-dl/include/nn/dl_nn_sub2d.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/tool/dl_tool.hpp b/tools/sdk/esp32/include/esp-dl/include/tool/dl_tool.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/tool/dl_tool.hpp rename to tools/sdk/esp32/include/esp-dl/include/tool/dl_tool.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/tool/dl_tool_cache.hpp b/tools/sdk/esp32/include/esp-dl/include/tool/dl_tool_cache.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/tool/dl_tool_cache.hpp rename to tools/sdk/esp32/include/esp-dl/include/tool/dl_tool_cache.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/typedef/dl_constant.hpp b/tools/sdk/esp32/include/esp-dl/include/typedef/dl_constant.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/typedef/dl_constant.hpp rename to tools/sdk/esp32/include/esp-dl/include/typedef/dl_constant.hpp diff --git a/tools/sdk/esp32/include/esp-face/include/typedef/dl_variable.hpp b/tools/sdk/esp32/include/esp-dl/include/typedef/dl_variable.hpp similarity index 100% rename from tools/sdk/esp32/include/esp-face/include/typedef/dl_variable.hpp rename to tools/sdk/esp32/include/esp-dl/include/typedef/dl_variable.hpp diff --git a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_common.h b/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_common.h index 68cfc5c694d..da7b001f3d4 100644 --- a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_common.h +++ b/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_common.h @@ -18,7 +18,12 @@ #include #include "dsp_err.h" #include "esp_idf_version.h" + +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0) +#include "esp_cpu.h" +#else #include "soc/cpu.h" +#endif #ifdef __cplusplus extern "C" @@ -58,4 +63,4 @@ int dsp_power_of_two(int x); #define dsp_get_cpu_cycle_count xthal_get_ccount #endif -#endif // _dsp_common_H_ \ No newline at end of file +#endif // _dsp_common_H_ diff --git a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_platform.h b/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_platform.h index d04f9dc783b..239b325bd52 100644 --- a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_platform.h +++ b/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_platform.h @@ -15,11 +15,16 @@ #ifndef dsp_platform_h_ #define dsp_platform_h_ +#include "esp_idf_version.h" +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0) +#include "esp_cpu.h" +#else #include "soc/cpu.h" +#endif #include "freertos/FreeRTOS.h" #include "freertos/portable.h" #include "freertos/task.h" #include "freertos/semphr.h" -#endif // dsp_platform_h_ \ No newline at end of file +#endif // dsp_platform_h_ diff --git a/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_conv.h b/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_conv.h index 7dc9e517bfa..07dbf7a2b30 100644 --- a/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_conv.h +++ b/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_conv.h @@ -43,7 +43,7 @@ extern "C" */ esp_err_t dsps_conv_f32_ae32(const float *Signal, const int siglen, const float *Kernel, const int kernlen, float *convout); esp_err_t dsps_conv_f32_ansi(const float *Signal, const int siglen, const float *Kernel, const int kernlen, float *convout); -/**}@*/ +/**@}*/ #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_corr.h b/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_corr.h index 7104d30c4b7..06f62ca8d81 100644 --- a/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_corr.h +++ b/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_corr.h @@ -43,7 +43,7 @@ extern "C" */ esp_err_t dsps_corr_f32_ansi(const float *Signal, const int siglen, const float *Pattern, const int patlen, float *dest); esp_err_t dsps_corr_f32_ae32(const float *Signal, const int siglen, const float *Pattern, const int patlen, float *dest); -/**}@*/ +/**@}*/ #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r.h b/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r.h index da306bf13b3..e1302f83e46 100644 --- a/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r.h +++ b/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r.h @@ -69,8 +69,6 @@ esp_err_t dsps_fft2r_init_sc16(int16_t *fft_table_buff, int table_size); * Free resources of Complex FFT. This function delete coefficients table if it was allocated by dsps_fft2r_init_fc32. * The implementation use ANSI C and could be compiled and run on any platform * - * - * @return */ void dsps_fft2r_deinit_fc32(void); void dsps_fft2r_deinit_sc16(void); @@ -128,13 +126,13 @@ esp_err_t dsps_fft2r_sc16_aes3_(int16_t *data, int N, int16_t *w); esp_err_t dsps_bit_rev_fc32_ansi(float *data, int N); esp_err_t dsps_bit_rev_sc16_ansi(int16_t *data, int N); esp_err_t dsps_bit_rev2r_fc32(float *data, int N); - -/**@{*/ +/**@}*/ esp_err_t dsps_bit_rev_lookup_fc32_ansi(float *data, int reverse_size, uint16_t *reverse_tab); esp_err_t dsps_bit_rev_lookup_fc32_ae32(float *data, int reverse_size, uint16_t *reverse_tab); esp_err_t dsps_bit_rev_lookup_fc32_aes3(float *data, int reverse_size, uint16_t *reverse_tab); +/**@{*/ /** * @brief Generate coefficients table for the FFT radix 2 * diff --git a/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h b/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h index 17506e7dc40..04e088d87aa 100644 --- a/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h +++ b/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h @@ -30,7 +30,7 @@ #if CONFIG_IDF_TARGET_ESP32S3 #define dsps_fft2r_fc32_aes3_enabled 1 #define dsps_fft2r_sc16_aes3_enabled 1 -#endif +#endif #endif // _dsps_fft2r_platform_H_ \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft4r.h b/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft4r.h index 0f87b6f0f5d..6443dc80d18 100644 --- a/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft4r.h +++ b/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft4r.h @@ -65,7 +65,6 @@ esp_err_t dsps_fft4r_init_fc32(float *fft_table_buff, int max_fft_size); * The implementation use ANSI C and could be compiled and run on any platform * * - * @return */ void dsps_fft4r_deinit_fc32(void); /**@}*/ @@ -115,7 +114,7 @@ esp_err_t dsps_bit_rev4r_fc32(float *data, int N); esp_err_t dsps_bit_rev4r_fc32_ae32(float *data, int N); esp_err_t dsps_bit_rev4r_direct_fc32_ansi(float *data, int N); esp_err_t dsps_bit_rev4r_sc16_ansi(int16_t *data, int N); - +/**@}*/ /**@{*/ /** diff --git a/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts.h b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts.h new file mode 100644 index 00000000000..ad800303a17 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts.h @@ -0,0 +1,135 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License +#ifndef _ESP_TTS_H_ +#define _ESP_TTS_H_ + +#include "stdlib.h" +#include "stdio.h" +#include "esp_tts_voice.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + NONE_MODE = 0, //do not play any word before playing a specific number + ALI_PAY_MODE, //play zhi fu bao shou kuan before playing a specific number + WEIXIN_PAY_MODE //play wei xin shou kuan before playing a specific number +} pay_mode_t; + +typedef void * esp_tts_handle_t; + + +/** + * @brief Init an instance of the TTS voice set structure. + * + * @param template The const esp_tts_voice_template. + * @param data The customize voice data + * @return + * - NULL: Init failed + * - Others: The instance of voice set + */ +esp_tts_voice_t *esp_tts_voice_set_init(const esp_tts_voice_t *template, void *data); + +/** + * @brief Init an instance of the TTS voice set structure. + * + * @param template The const esp_tts_voice_template. + * @param data The customize voice data + * @return + * - NULL: Init failed + * - Others: The instance of voice set + */ +void esp_tts_voice_set_free(esp_tts_voice_t *voice); + +/** + * @brief Creates an instance of the TTS structure. + * + * @param voice Voice set containing all basic phonemes. + * @return + * - NULL: Create failed + * - Others: The instance of TTS structure + */ +esp_tts_handle_t esp_tts_create(esp_tts_voice_t *voice); + +/** + * @brief parse money pronuciation. + * + * @param tts_handle Instance of TTS + * @param yuan The number of yuan + * @param jiao The number of jiao + * @param fen The number of fen + * @param mode The pay mode: please refer to pay_mode_t + * @return + * - 0: failed + * - 1: succeeded + */ +int esp_tts_parse_money(esp_tts_handle_t tts_handle, int yuan, int jiao, int fen, pay_mode_t mode); + +/** + * @brief parse Chinese PinYin pronuciation. + * + * @param tts_handle Instance of TTS + * @param pinyin PinYin string, like this "da4 jia1 hao3" + * @return + * - 0: failed + * - 1: succeeded + */ +int esp_tts_parse_pinyin(esp_tts_handle_t tts_handle, const char *pinyin); + +/** + * @brief parse Chinese string. + * + * @param tts_handle Instance of TTS + * @param str Chinese string, like this "大家好" + * @return + * - 0: failed + * - 1: succeeded + */ +int esp_tts_parse_chinese(esp_tts_handle_t tts_handle, const char *str); + +/** + * @brief output TTS voice data by stream. + * + * @Warning The output data should not be freed. + Once the output length is 0, the all voice data has been output. + * + * @param tts_handle Instance of TTS + * @param len The length of output data + * @param speed The speech speed speed of synthesized speech, + range:0~5, 0: the slowest speed, 5: the fastest speech + * @return + * - voice raw data + */ +short* esp_tts_stream_play(esp_tts_handle_t tts_handle, int *len, unsigned int speed); + +/** + * @brief reset tts stream and clean all cache of TTS instance. + * + * @param tts_handle Instance of TTS + */ +void esp_tts_stream_reset(esp_tts_handle_t tts_handle); + +/** + * @brief Free the TTS instance + * + * @param tts_handle The instance of TTS. + */ +void esp_tts_destroy(esp_tts_handle_t tts_handle); + +#ifdef __cplusplus +extern "C" { +#endif + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_parser.h b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_parser.h new file mode 100644 index 00000000000..ce71b04e319 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_parser.h @@ -0,0 +1,25 @@ +#ifndef _ESP_TTS_PARSER_H_ +#define _ESP_TTS_PARSER_H_ + +#include "stdlib.h" +#include "esp_tts_voice.h" + + +typedef struct { + int *syll_idx; + int syll_num; + int total_num; + esp_tts_voice_t *voice; +}esp_tts_utt_t; + +esp_tts_utt_t* esp_tts_parser_chinese (const char* str, esp_tts_voice_t *voice); + +esp_tts_utt_t* esp_tts_parser_money(char *play_tag, int yuan, int jiao, int fen, esp_tts_voice_t *voice); + +esp_tts_utt_t* esp_tts_parser_pinyin(char* pinyin, esp_tts_voice_t *voice); + +esp_tts_utt_t* esp_tts_utt_alloc(int syll_num, esp_tts_voice_t *voice); + +void esp_tts_utt_free(esp_tts_utt_t *utt); + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_player.h b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_player.h new file mode 100644 index 00000000000..2070011af41 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_player.h @@ -0,0 +1,67 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License +#ifndef _ESP_TTS_PLAYER_H_ +#define _ESP_TTS_PLAYER_H_ + +#include "stdlib.h" +#include "stdio.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef void * esp_tts_player_handle_t; + +/** + * @brief Creates an instance of the TTS Player structure. + * + * @param mode mode of player, default:0 + * @return + * - NULL: Create failed + * - Others: The instance of TTS Player + */ +esp_tts_player_handle_t esp_tts_player_create(int mode); + + + +/** + * @brief Concatenate audio files. + * + * @Warning Just support mono audio data. + * + * @param player The handle of TTS player + * @param file_list The dir of files + * @param file_num The number of file + * @param len The length of return audio buffer + * @param sample_rate The sample rate of input audio file + * @param sample_width The sample width of input audio file, sample_width=1:8-bit, sample_width=2:16-bit,... + * @return + * - audio data buffer + */ +unsigned char* esp_tts_stream_play_by_concat(esp_tts_player_handle_t player, const char **file_list, int file_num, int *len, int *sample_rate, int *sample_width); + + +/** + * @brief Free the TTS Player instance + * + * @param player The instance of TTS Player. + */ +void esp_tts_player_destroy(esp_tts_player_handle_t player); + +#ifdef __cplusplus +extern "C" { +#endif + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_stretcher.h b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_stretcher.h new file mode 100644 index 00000000000..ab47b272c0d --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_stretcher.h @@ -0,0 +1,48 @@ +//////////////////////////////////////////////////////////////////////////// +// **** AUDIO-STRETCH **** // +// Time Domain Harmonic Scaler // +// Copyright (c) 2019 David Bryant // +// All Rights Reserved. // +// Distributed under the BSD Software License (see license.txt) // +//////////////////////////////////////////////////////////////////////////// + +// stretch.h + +// Time Domain Harmonic Compression and Expansion +// +// This library performs time domain harmonic scaling with pitch detection +// to stretch the timing of a 16-bit PCM signal (either mono or stereo) from +// 1/2 to 2 times its original length. This is done without altering any of +// its tonal characteristics. + +#ifndef STRETCH_H +#define STRETCH_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *StretchHandle; + +/* extern function */ +StretchHandle stretch_init (int shortest_period, int longest_period, int num_chans, int fast_mode); +int stretch_samples (StretchHandle handle, short *samples, int num_samples, short *output, float ratio); +int stretch_flush (StretchHandle handle, short *output); +void stretch_deinit (StretchHandle handle); + +/* internel function */ +StretchHandle stretcher_init_internal(int shortest_period, int longest_period, int buff_len); +void stretcher_deinit (StretchHandle handle); +int stretcher_is_empty(StretchHandle handle); +int stretcher_is_full(StretchHandle handle, int num_samples); +int stretcher_push_data(StretchHandle handle, short *samples, int num_samples); +int stretcher_stretch_samples(StretchHandle handle, short *output, float ratio); +int stretcher_stretch_samples_flash(StretchHandle handle, short *output, float ratio, const short *period_data, + int *start_idx, int end_idx); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice.h b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice.h new file mode 100644 index 00000000000..77f263e3935 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice.h @@ -0,0 +1,20 @@ +#ifndef _ESP_TTS_VOICE_H_ +#define _ESP_TTS_VOICE_H_ + +typedef struct { + char *voice_name; // voice set name + char *format; // the format of voice data, currently support pcm and amrwb + int sample_rate; // the sample rate of voice data, just for pcm format + int bit_width; // the bit width of voice data, just for pcm format + int syll_num; // the syllable mumber + char **sylls; // the syllable names + int *syll_pos; // the position of syllable in syllable audio data array + short *pinyin_idx; // the index of pinyin + short *phrase_dict; // the pinyin dictionary of common phrase + short *extern_idx; // the idx of extern phrases + short *extern_dict; // the extern phrase dictionary + unsigned char *data; // the audio data of all syllables +} esp_tts_voice_t; + + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_template.h b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_template.h new file mode 100644 index 00000000000..ce5f5b6f455 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_template.h @@ -0,0 +1,5 @@ +#pragma once + + +#include "esp_tts.h" +extern const esp_tts_voice_t esp_tts_voice_template; diff --git a/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_xiaole.h b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_xiaole.h new file mode 100644 index 00000000000..f87866ae6cb --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_xiaole.h @@ -0,0 +1,5 @@ +#pragma once + + +#include "esp_tts.h" +extern const esp_tts_voice_t esp_tts_voice_xiaole; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/customized_word_wn5.h b/tools/sdk/esp32/include/esp-sr/include/esp32/customized_word_wn5.h new file mode 100644 index 00000000000..57199e5abe0 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/customized_word_wn5.h @@ -0,0 +1,8 @@ +//Generated by mkmodel +#pragma once +#include +#include "dl_lib_coefgetter_if.h" +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" + +extern const model_coeff_getter_t get_coeff_customized_word_wn5; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib.h b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib.h new file mode 100644 index 00000000000..d7b6d8fbe77 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib.h @@ -0,0 +1,411 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef DL_LIB_H +#define DL_LIB_H + +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" +#include "dl_lib_matrixq8.h" + +#ifdef ESP_PLATFORM +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "freertos/queue.h" +#include "esp_system.h" +#include "esp_heap_caps.h" +#include "sdkconfig.h" +#define DL_SPIRAM_SUPPORT 1 +#endif + +#ifdef CONFIG_IDF_TARGET_ESP32S3 +#include "esp32s3/rom/cache.h" +#endif + +typedef int padding_state; + +// /** +// * @brief Allocate a chunk of memory which has the given capabilities. +// * Equivalent semantics to libc malloc(), for capability-aware memory. +// * In IDF, malloc(p) is equivalent to heap_caps_malloc(p, MALLOC_CAP_8BIT). +// * +// * @param size In bytes, of the amount of memory to allocate +// * @param caps Bitwise OR of MALLOC_CAP_* flags indicating the type of memory to be returned +// * MALLOC_CAP_SPIRAM: Memory must be in SPI RAM +// * MALLOC_CAP_INTERNAL: Memory must be internal; specifically it should not disappear when flash/spiram cache is switched off +// * MALLOC_CAP_DMA: Memory must be able to accessed by DMA +// * MALLOC_CAP_DEFAULT: Memory can be returned in a non-capability-specific memory allocation +// * @return Pointer to currently allocated heap memory +// **/ +// void *heap_caps_malloc(size_t size, uint32_t caps); + +/** + * @brief Allocate aligned memory from internal memory or external memory. + * if cnt*size > CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL, allocate memory from internal RAM + * else, allocate memory from PSRAM + * + * @param cnt Number of continuing chunks of memory to allocate + * @param size Size, in bytes, of a chunk of memory to allocate + * @param align Aligned size, in bits + * @return Pointer to currently allocated heap memory + */ +void *dl_lib_calloc(int cnt, int size, int align); + +/** + * @brief Always allocate aligned memory from external memory. + * + * @param cnt Number of continuing chunks of memory to allocate + * @param size Size, in bytes, of a chunk of memory to allocate + * @param align Aligned size, in bits + * @return Pointer to currently aligned heap memory + */ +void *dl_lib_calloc_psram(int cnt, int size, int align); + +/** + * @brief Free aligned memory allocated by `dl_lib_calloc` or `dl_lib_calloc_psram` + * + * @param prt Pointer to free + */ +void dl_lib_free(void *ptr); + +/** + * @brief Does a fast version of the exp() operation on a floating point number. + * + * As described in https://codingforspeed.com/using-faster-exponential-approximation/ + * Should be good til an input of 5 or so with a steps factor of 8. + * + * @param in Floating point input + * @param steps Approximation steps. More is more precise. 8 or 10 should be good enough for most purposes. + * @return Exp()'ed output + */ +fptp_t fast_exp(double x, int steps); + +/** + * @brief Does a fast version of the exp() operation on a floating point number. + * + * @param in Floating point input + * @return Exp()'ed output + */ +double fast_exp_pro(double x); + +/** + * @brief Does a softmax operation on a matrix. + * + * @param in Input matrix + * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. + */ +void dl_softmax(const dl_matrix2d_t *in, dl_matrix2d_t *out); + + +/** + * @brief Does a softmax operation on a quantized matrix. + * + * @param in Input matrix + * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. + */ +void dl_softmax_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); + +/** + * @brief Does a sigmoid operation on a floating point number + * + * @param in Floating point input + * @return Sigmoid output + */ + +fptp_t dl_sigmoid_op(fptp_t in); + + +/** + * @brief Does a sigmoid operation on a matrix. + * + * @param in Input matrix + * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. + */ +void dl_sigmoid(const dl_matrix2d_t *in, dl_matrix2d_t *out); + +/** + * @brief Does a tanh operation on a floating point number + * + * @param in Floating point input number + * @return Tanh value + */ +fptp_t dl_tanh_op(fptp_t v); + +/** + * @brief Does a tanh operation on a matrix. + * + * @param in Input matrix + * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. + */ +void dl_tanh(const dl_matrix2d_t *in, dl_matrix2d_t *out); + + +/** + * @brief Does a relu (Rectifier Linear Unit) operation on a floating point number + * + * @param in Floating point input + * @param clip If value is higher than this, it will be clipped to this value + * @return Relu output + */ +fptp_t dl_relu_op(fptp_t in, fptp_t clip); + +/** + * @brief Does a ReLu operation on a matrix. + * + * @param in Input matrix + * @param clip If values are higher than this, they will be clipped to this value + * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. + */ +void dl_relu(const dl_matrix2d_t *in, fptp_t clip, dl_matrix2d_t *out); + +/** + * @brief Fully connected layer operation + * + * @param in Input vector + * @param weight Weights of the neurons + * @param bias Biases for the neurons. Can be NULL if a bias of 0 is required. + * @param out Output array. Outputs are placed here. Needs to be an initialized, weight->w by in->h in size, matrix. + */ +void dl_fully_connect_layer(const dl_matrix2d_t *in, const dl_matrix2d_t *weight, const dl_matrix2d_t *bias, dl_matrix2d_t *out); + +/** + * @brief Pre-calculate the sqrtvari variable for the batch_normalize function. + * The sqrtvari matrix depends on the variance and epsilon values, which normally are constant. Hence, + * this matrix only needs to be calculated once. This function does that. + * + * @param + * @return + */ +void dl_batch_normalize_get_sqrtvar(const dl_matrix2d_t *variance, fptp_t epsilon, dl_matrix2d_t *out); + +/** + * @brief Batch-normalize a matrix + * + * @param m The matrix to normalize + * @param offset Offset matrix + * @param scale Scale matrix + * @param mean Mean matrix + * @param sqrtvari Matrix precalculated using dl_batch_normalize_get_sqrtvar + * @return + */ +void dl_batch_normalize(dl_matrix2d_t *m, const dl_matrix2d_t *offset, const dl_matrix2d_t *scale, + const dl_matrix2d_t *mean, const dl_matrix2d_t *sqrtvari); + +/** + * @brief Do a basic LSTM layer pass. + * + * @warning Returns state_h pointer, so do not free result. + + * @param in Input vector + * @param state_c Internal state of the LSTM network + * @param state_h Internal state (previous output values) of the LSTM network + * @param weights Weights for the neurons + * @param bias Bias for the neurons. Can be NULL if no bias is required + * @return Output values of the neurons + */ +dl_matrix2d_t *dl_basic_lstm_layer(const dl_matrix2d_t *in, dl_matrix2d_t *state_c, dl_matrix2d_t *state_h, + const dl_matrix2d_t *weight, const dl_matrix2d_t *bias); + +/** + * @brief Do a basic LSTM layer pass, partial quantized version. + * This LSTM function accepts 16-bit fixed-point weights and 32-bit float-point bias. + * + * @warning Returns state_h pointer, so do not free result. + + * @param in Input vector + * @param state_c Internal state of the LSTM network + * @param state_h Internal state (previous output values) of the LSTM network + * @param weights Weights for the neurons, need to be quantised + * @param bias Bias for the neurons. Can be NULL if no bias is required + * @return Output values of the neurons + */ +dl_matrix2dq_t *dl_basic_lstm_layer_quantised_weights(const dl_matrix2d_t *in, dl_matrix2d_t *state_c, dl_matrix2d_t *state_h, + const dl_matrix2dq_t *weight, const dl_matrix2d_t *bias); + +/** + * @brief Do a fully-connected layer pass, fully-quantized version. + * + * @param in Input vector + * @param weight Weights of the neurons + * @param bias Bias values of the neurons. Can be NULL if no bias is needed. + * @param shift Number of bits to shift the result back by. See dl_lib_matrixq.h for more info + * @return Output values of the neurons + */ +void dl_fully_connect_layer_q(const dl_matrix2dq_t *in, const dl_matrix2dq_t *weight, const dl_matrix2dq_t *bias, dl_matrix2dq_t *out, int shift); + +/** + * @brief Do a basic LSTM layer pass, fully-quantized version + * + * @warning Returns state_h pointer, so do not free result. + + * @param in Input vector + * @param state_c Internal state of the LSTM network + * @param state_h Internal state (previous output values) of the LSTM network + * @param weights Weights for the neurons + * @param bias Bias for the neurons. Can be NULL if no bias is required + * @param shift Number of bits to shift the result back by. See dl_lib_matrixq.h for more info + * @return Output values of the neurons + */ +dl_matrix2dq_t *dl_basic_lstm_layer_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *state_c, dl_matrix2dq_t *state_h, + const dl_matrix2dq_t *weight, const dl_matrix2dq_t *bias, int shift); + +/** + * @brief Batch-normalize a matrix, fully-quantized version + * + * @param m The matrix to normalize + * @param offset Offset matrix + * @param scale Scale matrix + * @param mean Mean matrix + * @param sqrtvari Matrix precalculated using dl_batch_normalize_get_sqrtvar + * @param shift Number of bits to shift the result back by. See dl_lib_matrixq.h for more info + * @return + */ +void dl_batch_normalize_q(dl_matrix2dq_t *m, const dl_matrix2dq_t *offset, const dl_matrix2dq_t *scale, + const dl_matrix2dq_t *mean, const dl_matrix2dq_t *sqrtvari, int shift); + +/** + * @brief Does a relu (Rectifier Linear Unit) operation on a fixed-point number + * This accepts and returns fixed-point 32-bit number with the last 15 bits being the bits after the decimal + * point. (Equivalent to a mantissa in a quantized matrix with exponent -15.) + * + * @param in Fixed-point input + * @param clip If value is higher than this, it will be clipped to this value + * @return Relu output + */ +qtp_t dl_relu_q_op(qtp_t in, qtp_t clip); + +/** + * @brief Does a ReLu operation on a matrix, quantized version + * + * @param in Input matrix + * @param clip If values are higher than this, they will be clipped to this value + * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. + */ +void dl_relu_q(const dl_matrix2dq_t *in, fptp_t clip, dl_matrix2dq_t *out); + +/** + * @brief Does a sigmoid operation on a fixed-point number. + * This accepts and returns a fixed-point 32-bit number with the last 15 bits being the bits after the decimal + * point. (Equivalent to a mantissa in a quantized matrix with exponent -15.) + * + * @param in Fixed-point input + * @return Sigmoid output + */ +int dl_sigmoid_op_q(const int in); +int16_t dl_sigmoid_op_q8(const int16_t in); +/** + * @brief Does a sigmoid operation on a matrix, quantized version + * + * @param in Input matrix + * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. + */ +void dl_sigmoid_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); + +/** + * @brief Does a tanh operation on a matrix, quantized version + * + * @param in Input matrix + * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. + */ +void dl_tanh_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); + +/** + * @brief Does a tanh operation on a fixed-point number. + * This accepts and returns a fixed-point 32-bit number with the last 15 bits being the bits after the decimal + * point. (Equivalent to a mantissa in a quantized matrix with exponent -15.) + * + * @param in Fixed-point input + * @return tanh output + */ +int dl_tanh_op_q(int v); +int16_t dl_tanh_op_q8(int16_t v); + +void load_mat_psram_mn4(void); +void load_mat_psram_mn3(void); +void free_mat_psram_mn4(void); +void free_mat_psram_mn3(void); +qtp_t dl_hard_sigmoid_op(qtp_t in, int exponent); +qtp_t dl_hard_tanh_op(qtp_t in, int exponent); + +int16_t dl_table_tanh_op(int16_t in, int exponent); +int16_t dl_table_sigmoid_op(int16_t in, int exponent); + +void dl_hard_sigmoid_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); +void dl_hard_tanh_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); + +void dl_table_sigmoid_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); +void dl_table_tanh_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); + + +/** + * @brief Filter out the number greater than clip in the matrix, quantized version + * + * @param in Input matrix + * @param clip If values are higher than this, they will be clipped to this value + * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. + */ +void dl_minimum(const dl_matrix2d_t *in, fptp_t clip, dl_matrix2d_t *out); + +/** + * @brief Filter out the number greater than clip in the matrix, float version + * + * @param in Input matrix + * @param clip If values are higher than this, they will be clipped to this value + * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. + */ +void dl_minimum_q(const dl_matrix2dq_t *in, fptp_t clip, dl_matrix2dq_t *out); +/** + * @brief Do a basic CNN layer pass. + * + * @Warning This just supports the single channel input image, and the output is single row matrix. + That is to say, the height of output is 1, and the weight of output is out_channels*out_image_width*out_image_height + * + * @param in Input single channel image + * @param weight Weights of the neurons, weight->w = out_channels, weight->h = filter_width*filter_height + * @param bias Bias for the CNN layer. + * @param filter_height The height of convolution kernel + * @param filter_width The width of convolution kernel + * @param out_channels The number of output channels of convolution kernel + * @param stride_x The step length of the convolution window in x(width) direction + * @param stride_y The step length of the convolution window in y(height) direction + * @param pad One of `"VALID"` or `"SAME"`, 0 is "VALID" and the other is "SAME" + * @param out The result of CNN layer, out->h=1. + * @return The result of CNN layer. + */ +dl_matrix2d_t *dl_basic_conv_layer(const dl_matrix2d_t *in, const dl_matrix2d_t *weight, const dl_matrix2d_t *bias, int filter_width, int filter_height, + const int out_channels, const int stride_x, const int stride_y, padding_state pad, const dl_matrix2d_t* out); + + +/** + * @brief Do a basic CNN layer pass, quantised wersion. + * + * @Warning This just supports the single channel input image, and the output is single row matrix. + That is to say, the height of output is 1, and the weight of output is out_channels*out_image_width*out_image_height + * + * @param in Input single channel image + * @param weight Weights of the neurons, weight->w = out_channels, weight->h = filter_width*filter_height, + * @param bias Bias of the neurons. + * @param filter_height The height of convolution kernel + * @param filter_width The width of convolution kernel + * @param out_channels The number of output channels of convolution kernel + * @param stride_x The step length of the convolution window in x(width) direction + * @param stride_y The step length of the convolution window in y(height) direction + * @param pad One of `"VALID"` or `"SAME"`, 0 is "VALID" and the other is "SAME" + * @param out The result of CNN layer, out->h=1 + * @return The result of CNN layer + */ +dl_matrix2d_t *dl_basic_conv_layer_quantised_weight(const dl_matrix2d_t *in, const dl_matrix2dq_t *weight, const dl_matrix2d_t *bias, int filter_width, int filter_height, + const int out_channels, const int stride_x, const int stride_y, padding_state pad, const dl_matrix2d_t* out); + +#endif + diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_coefgetter_if.h b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_coefgetter_if.h new file mode 100644 index 00000000000..f1a937343bf --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_coefgetter_if.h @@ -0,0 +1,72 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef DL_LIB_COEFGETTER_IF_H +#define DL_LIB_COEFGETTER_IF_H + +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" +#include "dl_lib_matrixq8.h" +#include "cJSON.h" + +//Set this if the coefficient requested is a batch-normalization popvar matrix which needs to be preprocessed by +//dl_batch_normalize_get_sqrtvar first. +#define COEF_GETTER_HINT_BNVAR (1<<0) + +/* +This struct describes the basic information of model data: +word_num: the number of wake words or speech commands +word_list: the name list of wake words or speech commands +thres_list: the threshold list of wake words or speech commands +info_str: the string used to reflect the version and information of model data + which consist of the architecture of network, the version of model data, wake words and their threshold +*/ +typedef struct { + int word_num; + char **word_list; + int *win_list; + float *thresh_list; + char *info_str; +} model_info_t; + +/* +Alphabet struct describes the basic grapheme or phoneme. +item_num: the number of baisc item(grapheme or phonemr) +items: the list of basic item +*/ +typedef struct { + int item_num; + char **items; +}alphabet_t; + +/* +This struct describes a generic coefficient getter: a way to get the constant coefficients needed for a neural network. +For the two getters, the name describes the name of the coefficient matrix, usually the same as the Numpy filename the +coefficient was originally stored in. The arg argument can be used to optionally pass an additional user-defined argument +to the getter (e.g. the directory to look for files in the case of the Numpy file loader getter). The hint argument +is a bitwise OR of the COEF_GETTER_HINT_* flags or 0 when none is needed. Use the free_f/free_q functions to release the +memory for the returned matrices, when applicable. +*/ +typedef struct { + const dl_matrix2d_t* (*getter_f)(const char *name, void *arg, int hint); + const dl_matrix2dq_t* (*getter_q)(const char *name, void *arg, int hint); + const dl_matrix2dq8_t* (*getter_q8)(const char *name, void *arg, int hint); + void (*free_f)(const dl_matrix2d_t *m); + void (*free_q)(const dl_matrix2dq_t *m); + void (*free_q8)(const dl_matrix2dq8_t *m); + const model_info_t* (*getter_info)(void *arg); + const alphabet_t* (*getter_alphabet)(void *arg); + const cJSON* (*getter_config)(void *arg); +} model_coeff_getter_t; + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_conv_queue.h b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_conv_queue.h new file mode 100644 index 00000000000..e0ca0a1d457 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_conv_queue.h @@ -0,0 +1,164 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef DL_LIB_CONV_QUEUE_H +#define DL_LIB_CONV_QUEUE_H + + +#include "dl_lib_matrix.h" +typedef float fptp_t; + + +//Flags for matrices +#define DL_MF_FOREIGNDATA (1<<0) /*< Matrix *item data actually points to another matrix and should not be freed */ + +//Float convolution FIFO queue. +typedef struct { + int n; /*< the length of queue */ + int c; /*< the channel number of queue element*/ + int front; /*< the front(top) position of queue */ + int flag; /*< not used*/ + fptp_t *item; /*< Pointer to item array */ +} dl_conv_queue_t; + +/** + * @brief Allocate a convolution queue + * + * @param n The length of queue + * @param c The channel number of elements in the queue + * @return The convolution queue, or NULL if out of memory + */ +dl_conv_queue_t *dl_conv_queue_alloc(int n, int c); + +/** + * @brief Free a convolution queue + * + * @param cq The convolution queue to free + */ +void dl_conv_queue_free(dl_conv_queue_t *cq); + +void dl_conv_to_matrix2d(dl_conv_queue_t *cq, dl_matrix2d_t* out); + +/** + * @brief Move the front pointer of queue forward, + the First(oldest) element become the last(newest) element, + * + * @param cq Input convolution queue + * @return Pointer of oldest element + */ +fptp_t *dl_conv_queue_pop(dl_conv_queue_t *cq); + +/** + * @brief Remove the oldest element, then insert the input element at the end of queue + * + * @param cq Input convolution queue + * @param item The new element + */ +void dl_conv_queue_push(dl_conv_queue_t *cq, fptp_t* item); + + +/** + * @brief Get the pointer of element in the queue by offset + * + * @param cq Input convolution queue + * @param offset Offset from the front of the queue + * @return Pointer of the element + */ +fptp_t *dl_get_queue_item(dl_conv_queue_t *cq, int offset); + +/** + * @brief Does a sigmoid operation on the one of element in the convolution queue. + * Gets the pointer of element in the convolution queue by offset, and does a sigmoid operation + * by this pointer, then return the pointer + * + * @param cq Input convolution queue + * @param offset Offset from the front of the queue + * @return Pointer of the element + */ +fptp_t *dl_sigmoid_step(dl_conv_queue_t *cq, int offset); + +/** + * @brief Does a tanh operation on the one of element in the convolution queue. + * Gets the pointer of element in the convolution queue by offset, and does a tanh operation + * by this pointer, then return the pointer + * + * @param cq Input convolution queue + * @param offset Offset from the front of the queue + * @return Pointer of the element + */ +fptp_t *dl_tanh_step(dl_conv_queue_t *cq, int offset); + +/** + * @brief Does a softmax operation on the one of element in the convolution queue. + * Gets the pointer of element in the convolution queue by offset, and does a softmax operation + * by this pointer, then return the pointer + * + * @param cq Input convolution queue + * @param offset Offset from the front of the queue + * @return Pointer of the element + */ +fptp_t *dl_softmax_step(dl_conv_queue_t *cq, int offset); + +fptp_t *dl_relu_step(dl_conv_queue_t *cq, int offset); +fptp_t *dl_relu_look(dl_matrix2d_t *cq, int offset); +dl_matrix2d_t *dl_matrix_concat1(const dl_conv_queue_t *a, const dl_matrix2d_t *b); +dl_matrix2d_t *dl_basic_lstm_layer1(const dl_conv_queue_t *in, dl_matrix2d_t *state_c, dl_matrix2d_t *state_h, + const dl_matrix2d_t *weight, const dl_matrix2d_t *bias); +/** + * @brief Fast implement for 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) + * based on convolution queue. + * + * @Warning All input and output convolution queue and matrix should be allocated. The return pointer + * is first element of output queue and should not be freed separately. + * + * @param in Input convolution queue + * @param out Output convolution queue + * @param rate A positive int, the stride with which we sample input value + * @param size A positive int, the size of 1D-filter + * @param kernel The kernel matrix of filter + * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. + * @return The result of atrous convolution + */ +fptp_t *dl_atrous_conv1d_step(dl_conv_queue_t *in, dl_conv_queue_t *out, int rate, int size, + dl_matrix2d_t* kernel, dl_matrix2d_t* bias); +fptp_t *dl_look_conv_step(dl_conv_queue_t *in, dl_matrix2d_t *out, int rate, int size, + dl_matrix2d_t* kernel, dl_matrix2d_t* bias); + +/** + * @brief Fast implement of dilation layer as follows + * + * |-> [gate(sigmoid)] -| + * input - | |-> (*) - output + * |-> [filter(tanh)] -| + * + * @Warning All input and output convolution queue and matrix should be allocated. The return pointer + * is first element of output queue and should not be freed separately. + * + * @param in Input convolution queue + * @param out Output convolution queue + * @param rate A positive int, the stride with which we sample input value + * @param size A positive int, the size of 1D-filter + * @param filter_kernel The kernel matrix of filter + * @param filter_bias The bias matrix of filter. Can be NULL if a bias of 0 is required. + * @param gate_kernel The kernel matrix of gate + * @param gate_bias The bias matrix of gate. Can be NULL if a bias of 0 is required. + * @return The result of dilation layer + */ +fptp_t *dl_dilation_layer(dl_conv_queue_t *in, dl_conv_queue_t *out, int rate, int size, + dl_matrix2d_t* filter_kernel, dl_matrix2d_t* filter_bias, + dl_matrix2d_t* gate_kernel, dl_matrix2d_t* gate_bias); + + +void test_atrous_conv(int size, int rate, int in_channel, int out_channel); + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_convq8_queue.h b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_convq8_queue.h new file mode 100644 index 00000000000..c5964195f81 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_convq8_queue.h @@ -0,0 +1,251 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef DL_LIB_CONVQ8_QUEUE_H +#define DL_LIB_CONVQ8_QUEUE_H + + +#include "dl_lib_matrixq.h" +#include "dl_lib_matrixq8.h" +#include "dl_lib_conv_queue.h" +#include "dl_lib_convq_queue.h" + +//[nch, n, c] +typedef struct { + int n; /*< the length of queue */ + int c; /*< the number of queue element*/ + int front; /*< the front(top) position of queue */ + int nch; /*< the channel of queue */ + int exponent; /*< The values in items should be multiplied by pow(2,exponent) + to get the real values */ + q8tp_t *itemq; /*< Pointer to item array */ +} dl_convq8_queue_t; + +/** + * @brief Allocate a fixed-point convolution queue + * + * @param n The length of queue + * @param c The number of elements in the queue + * @return The convolution queue, or NULL if out of memory + */ +dl_convq8_queue_t *dl_convq8_queue_alloc(int n, int c); + +/** + * @brief Allocate a fixed-point convolution queue + * + * @param n The length of queue + * @param c The number of elements in the queue + * @param c The channel of queue + * @return The convolution queue, or NULL if out of memory + */ +dl_convq8_queue_t *dl_convq8_queue_alloc_mc(int n, int c, int nch); + +/** + * @brief Free a fixed-point convolution queue + * + * @param cq The fixed-point convolution queue to free + */ +void dl_convq8_queue_free(dl_convq8_queue_t *cq); + +/** + * @brief Set itemq of convolution queue to 0 + * + * @param cq The fixed-point convolution queue to free + */ +void dl_convq8_queue_bzero(dl_convq8_queue_t *cqm); + +/** + * @brief Insert the float-point element at the end of queue. + * The precision of fixed-point numbers is described by the Qm.f notation, + * + * @param cq Input fixed-point convolution queue + * @param item The float-point element + * @param m_bit The number of integer bits including the sign bits + * @param f_bit The number of fractional bits + */ +void dl_convq8_queue_push_by_qmf(dl_convq8_queue_t *cq, fptp_t* item, int m_bit, int f_bit); + +/** + * @brief Get the pointer of element in the queue by offset + * + * @param cq Input fixed-point convolution queue + * @param offset Offset from the front of the queue + * @return Pointer of the element + */ +q8tp_t *dl_get_queue_itemq8(dl_convq8_queue_t *cq, int offset); + +/** + * @brief Get the pointer of element in the queue by offset + * + * @param cq Input fixed-point convolution queue + * @param offset Offset from the front of the queue + * @param ch Channel index of queue + * @return Pointer of the element + */ +q8tp_t *dl_get_queue_itemq8_mc(dl_convq8_queue_t *cq, int offset, int ch); + +/** + * @brief Fast and quantised implement for 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) + * based on convolution queue. + * + * @Warning All input and output convolution queue and matrix should be allocated. The return pointer + * is last element of output queue and should not be freed separately. + * + * @param in Input fixed-point convolution queue + * @param out Output fixed-point convolution queue + * @param rate A positive int, the stride with which we sample input value + * @param size A positive int, the size of 1D-filter + * @param kernel Kernel matrix of filter + * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. + * @param out_exponent Shift ratio used in dot operation between two 16-bit fixed point vector + * @param offset Offset used to calculate the beginning of input conv queue + * @param prenum The num to control the parameter size of preload operation + * @return The result of atrous convolution + */ +void dl_atrous_conv1dq8_steps(dl_convq8_queue_t *in, dl_convq8_queue_t *out, int rate, int size, + dl_matrix2dq8_t* kernel, dl_matrix2dq8_t* bias, + int out_exponent, int offset, int prenum); + +/** + * @brief Fast implement of dilation layer as follows + * + * |-> [gate(sigmoid)] -| + * input - | |-> (*) - output + * |-> [filter(tanh)] -| + * + * @Warning All input and output convolution queue and matrix should be allocated. The return pointer + * is last element of output queue and should not be freed separately. + * + * @param in Input fixed-point convolution queue + * @param out Output fixed-point convolution queue + * @param rate A positive int, the stride with which we sample input value + * @param size A positive int, the size of 1D-filter + * @param filter_kernel The kernel matrix of filter + * @param filter_bias The bias matrix of filter. Can be NULL if a bias of 0 is required. + * @param gate_kernel The kernel matrix of gate + * @param gate_bias The bias matrix of gate. Can be NULL if a bias of 0 is required. + * @param offset Offset used to calculate the beginning of input conv queue + * @param prenum The num to control the parameter size of preload operation + * @return The result of dilation layer + */ +void dl_dilation_layerq8_steps(dl_convq8_queue_t *in, dl_convq8_queue_t *out, int rate, int size, + dl_matrix2dq8_t* filter_kernel, dl_matrix2dq8_t* filter_bias, + dl_matrix2dq8_t* gate_kernel, dl_matrix2dq8_t* gate_bias, + int offset, int prenum); + + + + +dl_conv_queue_t *dl_convq8_queue_add(dl_convq8_queue_t *cq1, dl_convq8_queue_t *cq2); + +int8_t dl_sigmoid_lutq8(int in); +/** + * @brief Allocate a 8-bit fixed-point Multi-Channel convolution queue + * + * @param n The length of queue + * @param c The number of elements in the queue + * @param nch  The channel number + * @return The convolution queue, or NULL if out of memory + */ +dl_convq8_queue_t **dl_convq8_queue_mc_alloc(int n, int c, int nch); + +/** + * @brief Free a 8-bit fixed-point Multi-Channel convolution queue + * + * @param cqm The fixed-point convolution queue to free + * @param nch The channel number + */ +void dl_convq8_queue_mc_free(dl_convq8_queue_t **cqm, int nch); + +/** + * @brief Tanh activation function for 8-bit fixed-point Multi-Channel convolution queue input + * + * @param cqm Input 8-bit fixed-point Multi-Channel convolution queue + * @param offset Offset used to calculate the beginning of input conv queue + * @param nch The channel number + */ +void dl_tanh_convq8_mc(dl_convq8_queue_t **cqm, int offset, int nch); + +/** + * @brief Fast and quantised 16-bit implement for Multi-channel 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) + * Usually, this layer is used as first layer for 8-bit network. + * + * @Warning All input and output convolution queue and matrix should be allocated. The return pointer + * Input is a 16-bit queue point, Output is an 8-bit queue point. + * + * @param in Input 16bit fixed-point convolution queue array + * @param out Output 8bit fixed-point convolution queue array + * @param rate A positive int, the stride with which we sample input value + * @param size A positive int, the size of 1D-filter + * @param kernel The kernel matrix of filter + * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. + * @param out_exponent Exponent of output + * @param offset Offset used to calculate the beginning of input conv queue + * @param prenum The num to control the parameter size of preload operation + */ +void dl_atrous_conv1dq8_16in_mc_steps(dl_convq_queue_t **in, dl_convq8_queue_t **out, int nch, int rate, int size, + dl_matrix2dq_t* kernel, dl_matrix2dq_t* bias, int out_exponent, int offset, int prenum); + +/** + * @brief Fast and quantised 8-bit implement for Multi-channel 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) + * based on convolution queue. + * + * @Warning All input and output convolution queue and matrix should be allocated. The return pointer + * is last element of output queue and should not be freed separately. + * + * @param in Input 8bit fixed-point convolution queue array + * @param out Output 8bit fixed-point convolution queue array + * @param rate A positive int, the stride with which we sample input value + * @param size A positive int, the size of 1D-filter + * @param kernel The kernel matrix of filter + * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. + * @param out_exponent Exponent of output + * @param offset Offset used to calculate the beginning of input conv queue + * @param prenum The num to control the parameter size of preload operation + */ +void dl_atrous_conv1dq8_mc_steps(dl_convq8_queue_t **in, dl_convq8_queue_t **out, + int nch, int rate, int size, + dl_matrix2dq8_t* kernel, dl_matrix2dq8_t* bias, + int out_exponent, int offset, int prenum); + +/** + * @brief Fast implement of 8-bit dilation layer as follows + * + * |-> [gate(sigmoid)] -| + * input - | |-> (*) - output + * |-> [filter(tanh)] -| + * + * @Warning All input and output convolution queue and matrix should be allocated. The return pointer + * is last element of output queue and should not be freed separately. + * + * @param in Input 8-bit fixed-point convolution queue + * @param out Output 8-bit fixed-point convolution queue + * @param rate A positive int, the stride with which we sample input value + * @param size A positive int, the size of 1D-filter + * @param filter_kernel The kernel matrix of filter + * @param filter_bias The bias matrix of filter. Can be NULL if a bias of 0 is required. + * @param gate_kernel The kernel matrix of gate + * @param gate_bias The bias matrix of gate. Can be NULL if a bias of 0 is required. + * @param offset Offset used to calculate the beginning of input conv queue + * @param prenum The num to control the parameter size of preload operation + */ +void dl_dilation_layerq8_mc_steps(dl_convq8_queue_t **in, dl_convq8_queue_t **out, int nch, int rate, int size, + dl_matrix2dq8_t* filter_kernel, dl_matrix2dq8_t* filter_bias, + dl_matrix2dq8_t* gate_kernel, dl_matrix2dq8_t* gate_bias, + int offset, int prenum); + +void dl_convq8_queue_mc_bzero(dl_convq8_queue_t **cqm, int nch); + +void print_convq8(dl_convq8_queue_t *cq, int offset); +void print_convq(dl_convq_queue_t *cq, int offset); +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_convq_queue.h b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_convq_queue.h new file mode 100644 index 00000000000..80693718f95 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_convq_queue.h @@ -0,0 +1,375 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef DL_LIB_CONVQ_QUEUE_H +#define DL_LIB_CONVQ_QUEUE_H + +#include "dl_lib_matrixq.h" +#include "dl_lib_conv_queue.h" +#include "dl_lib.h" + + +//fixed-point convolution FIFO queue. +//[nch, n, c] +typedef struct { + int n; /*< the length of queue */ + int c; /*< the number of queue element*/ + int front; /*< the front(top) position of queue */ + int nch; /*< the multiple of queue*/ + int exponent; /*< The values in items should be multiplied by pow(2,exponent) + to get the real values */ + qtp_t *itemq; /*< Pointer to item array */ +} dl_convq_queue_t; + +/** + * @brief Allocate a fixed-point convolution queue + * + * @param n The length of queue + * @param c The number of elements in the queue + * @return The convolution queue, or NULL if out of memory + */ +dl_convq_queue_t *dl_convq_queue_alloc(int n, int c); + +/** + * @brief Allocate a fixed-point convolution queue from PSRAM + * + * @param n The length of queue + * @param c The number of elements in the queue + * @return The convolution queue, or NULL if out of memory + */ +dl_convq_queue_t *dl_convq_queue_alloc_from_psram(int n, int c); + +/** + * @brief Allocate a fixed-point multi-channel convolution queue + * + * @param n The length of queue + * @param c The number of elements in the queue + * @param nch The channel of conv queue + * @return The convolution queue, or NULL if out of memory + */ +dl_convq_queue_t *dl_convq_queue_alloc_mc(int n, int c, int nch); + +/** + * @brief Allocate a fixed-point multi-channel convolution queue from PSRAM + * + * @param n The length of queue + * @param c The number of elements in the queue + * @param nch The channel of conv queue + * @return The convolution queue, or NULL if out of memory + */ +dl_convq_queue_t *dl_convq_queue_alloc_mc_from_psram(int n, int c, int nch); + + +void dl_convq_to_matrix2dq(dl_convq_queue_t *cq, dl_matrix2dq_t* out, int row); + +/** + * @brief Free a fixed-point convolution queue + * + * @param cq The fixed-point convolution queue to free + */ +void dl_convq_queue_free(dl_convq_queue_t *cq); + +/** + * @brief Set itemq of convolution queue to 0 + * + * @param cq The fixed-point convolution queue point + */ +void dl_convq_queue_bzero(dl_convq_queue_t *cq); + +/** + * @brief Move the front pointer of queue forward, + the First(oldest) element become the last(newest) element, + * + * @param cq Input fixed-point convolution queue + * @return Pointer of oldest element + */ +inline qtp_t *dl_convq_queue_pop(dl_convq_queue_t *cq); +inline qtp_t *dl_convq_queue_popn(dl_convq_queue_t *cq, int n); +/** + * @brief Remove the oldest element, then insert the input element at the end of queue + * + * @param cq Input fixed-point convolution queue + * @param item The new element + */ +void dl_convq_queue_push(dl_convq_queue_t *cq, dl_matrix2dq_t *a, int shift); + +/** + * @brief Insert the float-point element at the end of queue. + * The precision of fixed-point numbers is described by the Qm.f notation, + * + * @param cq Input fixed-point convolution queue + * @param item The float-point element + * @param m_bit The number of integer bits including the sign bits + * @param f_bit The number of fractional bits + */ +void dl_convq_queue_push_by_qmf(dl_convq_queue_t *cq, fptp_t* item, int m_bit, int f_bit); + +void dl_convq16_queue_push_by_qmf(dl_convq_queue_t *cq, fptp_t* item, int m_bit, int f_bit); + +dl_conv_queue_t *dl_queue_from_convq(dl_convq_queue_t *cq1); + +/** + * @brief Get the pointer of element in the queue by offset + * + * @param cq Input fixed-point convolution queue + * @param last_num Offset from the front of the queue + * @return Pointer of the element + */ +inline qtp_t *dl_get_queue_itemq(dl_convq_queue_t *cq, int last_num); + +/** + * @brief Get the pointer of element in the queue by offset + * + * @param cq Input fixed-point convolution queue + * @param offset Offset from the front of the queue + * @param ch Channel index of convolution queue + * @return Pointer of the element + */ +qtp_t *dl_get_queue_itemq_mc(dl_convq_queue_t *cq, int offset, int ch); + +/** + * @brief Does a tanh operation on the one of element in the convolution queue. + * Gets the pointer of element in the convolution queue by offset, and does a + * tanh operation by this pointer, then return the pointer + * + * @param cq Input fixed-point convolution queue + * @param offset Offset from the front of the queue + * @return Pointer of the element + */ +void dl_tanh_convq(dl_convq_queue_t *cq, int offset); + +/** + * @brief Does a tanh operation on the one of element in multi channel convolution queue. + * Gets the pointer of element in the convolution queue by offset, and does a + * tanh operation by this pointer, then return the pointer + * + * @param cq Input fixed-point multi channnel convolution queue + * @param offset Offset from the front of the queue + * @param nch The channel number of cqm + * @return Pointer of the element + */ +void dl_tanh_convq_mc(dl_convq_queue_t **cqm, int offset, int nch); + +/** + * @brief Does a relu operation on the one of element in the convolution queue. + * Gets the pointer of element in the convolution queue by offset, and does a + * relu operation by this pointer, then return the pointer + * + * @param cq Input fixed-point convolution queue + * @param offset Offset from the front of the queue + * @return Pointer of the element + */ +void dl_relu_convq(dl_convq_queue_t *cq, fptp_t clip, int last_num); + +/** + * @brief Does a softmax operation on the one of element in the convolution queue. + * Gets the pointer of element in the convolution queue by offset, input data + stay as it is. Results are saved into the *out* array. + * + * @param cq Input fixed-point convolution queue + * @param offset Offset from the front of the queue + * @param out Old array to re-use. Passing NULL will allocate a new matrix. + * @return softmax results + */ +fptp_t * dl_softmax_step_q(dl_convq_queue_t *cq, int offset, fptp_t *out); + +/** + * @brief Fast and quantised implement for 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) + * based on convolution queue. + * + * @Warning All input and output convolution queue and matrix should be allocated. The return pointer + * is last element of output queue and should not be freed separately. + * + * @param in Input fixed-point convolution queue + * @param out Output fixed-point convolution queue + * @param rate A positive int, the stride with which we sample input value + * @param size A positive int, the size of 1D-filter + * @param kernel The kernel matrix of filter + * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. + * @param shift Shift ratio used in dot operation between two 16-bit fixed point vector + * @return The result of atrous convolution + */ +qtp_t * dl_atrous_conv1dq(dl_convq_queue_t *in, dl_convq_queue_t *out, int rate, int size, + dl_matrix2dq_t* kernel, dl_matrix2dq_t* bias, int shift, int prenum); + +/** + * @brief Fast implement of dilation layer as follows + * + * |-> [gate(sigmoid)] -| + * input - | |-> (*) - output + * |-> [filter(tanh)] -| + * + * @Warning All input and output convolution queue and matrix should be allocated. The return pointer + * is last element of output queue and should not be freed separately. + * + * @param in Input fixed-point convolution queue + * @param out Output fixed-point convolution queue + * @param rate A positive int, the stride with which we sample input value + * @param size A positive int, the size of 1D-filter + * @param filter_kernel The kernel matrix of filter + * @param filter_bias The bias matrix of filter. Can be NULL if a bias of 0 is required. + * @param gate_kernel The kernel matrix of gate + * @param gate_bias The bias matrix of gate. Can be NULL if a bias of 0 is required. + * @param filter_shift Shift ratio used in filter operation between two 16-bit fixed point vector + * @param gate_shift Shift ratio used in gate operation between two 16-bit fixed point vector + * @return The result of dilation layer + */ +qtp_t *dl_dilation_layerq_steps(dl_convq_queue_t *in, dl_convq_queue_t *out, int rate, int size, + dl_matrix2dq_t* filter_kernel, dl_matrix2dq_t* filter_bias, + dl_matrix2dq_t* gate_kernel, dl_matrix2dq_t* gate_bias, + int filter_shift, int gate_shift, int offset, int prenum); + + +qtp_t *dl_dilation_layerq(dl_convq_queue_t *in, dl_convq_queue_t *out, int rate, int size, + dl_matrix2dq_t* filter_kernel, dl_matrix2dq_t* filter_bias, + dl_matrix2dq_t* gate_kernel, dl_matrix2dq_t* gate_bias, + int filter_shift, int gate_shift, int prenum); + +qtp_t *dl_dilation_layerq16(dl_convq_queue_t *in, dl_convq_queue_t *out, int rate, int size, + dl_matrix2dq_t* filter_kernel, dl_matrix2dq_t* filter_bias, + dl_matrix2dq_t* gate_kernel, dl_matrix2dq_t* gate_bias, int prenum); + + +qtp_t *dl_atrous_conv1dq_steps(dl_convq_queue_t *in, dl_convq_queue_t *out, int rate, int size, + dl_matrix2dq_t* kernel, dl_matrix2dq_t* bias, int shift, int offset, int prenum); + +/** + * @brief Add a pair of fixed-point convolution queue item-by-item, and return float-point convolution queue + * + * @param cq1 First fixed-point convolution queue + * @param cq2 Seconf fixed-point convolution queue + * @return The result of float-point convolution queue + */ +dl_conv_queue_t *dl_convq_queue_add(dl_convq_queue_t *cq1, dl_convq_queue_t *cq2); + +/** + * @brief Fast implement of LSTM layer by dl_atrous_conv1dq function + * + * @Warning LSTM kernel is split into two part, the first part input is the last layer output, + * and kernel is parameter *in_weight*. The second part input is the last frame LSTM output, + * the kernel is parameters *h_weight*. + * + * @param in Input fixed-point convolution queue + * @param out Output fixed-point convolution queue + * @param state_c Internal state of the LSTM network + * @param state_h Internal state (previous output values) of the LSTM network + * @param in_weight the LSTM kernel needed by first part + * @param h_weight the LSTM kernel needed by second part + * @param bias The bias matrix of LSTM. Can be NULL if a bias of 0 is required. + * @in_shift Shift ratio used in first part + * @h_shift Shift ratio used in second part + * @return The result of LSTM layer + */ +dl_matrix2dq_t *dl_convq_lstm_layer(const dl_convq_queue_t *in, dl_convq_queue_t *out, dl_matrix2dq_t *state_c, + dl_matrix2dq_t *state_h, const dl_matrix2dq_t *in_weight, const dl_matrix2dq_t *h_weight, + const dl_matrix2dq_t *bias, int in_shift, int h_shift, int prenum); +dl_matrix2dq_t *dl_basic_lstm_layer1_q(const dl_convq_queue_t *in, dl_matrix2dq_t *state_c, dl_matrix2dq_t *state_h, + const dl_matrix2dq_t *weight, const dl_matrix2dq_t *bias, int step, int shift); + +dl_matrix2dq_t *dl_convq16_lstm_layer(const dl_convq_queue_t *in, dl_convq_queue_t *out, dl_matrix2dq_t *state_c, + dl_matrix2dq_t *state_h, const dl_matrix2dq_t *in_weight, const dl_matrix2dq_t *h_weight, + const dl_matrix2dq_t *bias, int prenum); + +/** + * @brief Allocate a fixed-point multi channel convolution queue + * + * @param n The length of queue + * @param c The channel number of elements in the queue + * @param nch the channel numbet of convolution queue + * @return The convolution queue, or NULL if out of memory + */ +dl_convq_queue_t **dl_convq_queue_mc_alloc(int n, int c, int nch); + +/** + * @brief Free a fixed-point multi channel convolution queue + * + * @param cqm The fixed-point convolution queue to free + * @param nch The channel number of cqm + */ +void dl_convq_queue_mc_free(dl_convq_queue_t **cqm, int nch); + +/** + * @brief Fast and quantised implement for 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) + * based on convolution queue. + * + * @Warning All input and output convolution queue and matrix should be allocated. The return pointer + * is last element of output queue and should not be freed separately. + * + * @param in Input fixed-point convolution queue + * @param out Output fixed-point convolution queue + * @param nch The channel number of input + * @param rate A positive int, the stride with which we sample input value + * @param size A positive int, the size of 1D-filter + * @param kernel The kernel matrix of filter + * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. + * @param shift Shift ratio used in dot operation between two 16-bit fixed point vector + * @param offset the offset to calculate input convq + * @param prenum the preload size, 0: do not use preload function + * @return The result of atrous convolution + */ +qtp_t *dl_atrous_conv1dq_mc_steps( dl_convq_queue_t **in, + dl_convq_queue_t **out, + int nch, + int rate, + int size, + dl_matrix2dq_t* kernel, + dl_matrix2dq_t* bias, + int shift, + int offset, + int prenum); + +/** + * @brief Fast implement of dilation layer as follows for multi channel input + * + * |-> [gate(sigmoid)] -| + * input - | |-> (*) - output + * |-> [filter(tanh)] -| + * + * @Warning All input and output convolution queue and matrix should be allocated. The return pointer + * is last element of output queue and should not be freed separately. + * + * @param in Input fixed-point convolution queue + * @param out Output fixed-point convolution queue + * @param nch The channel number of input + * @param rate A positive int, the stride with which we sample input value + * @param size A positive int, the size of 1D-filter + * @param filter_kernel The kernel matrix of filter + * @param filter_bias The bias matrix of filter. Can be NULL if a bias of 0 is required. + * @param gate_kernel The kernel matrix of gate + * @param gate_bias The bias matrix of gate. Can be NULL if a bias of 0 is required. + * @param filter_shift Shift ratio used in filter operation between two 16-bit fixed point vector + * @param gate_shift Shift ratio used in gate operation between two 16-bit fixed point vector + * @param offset The offset to calculate input convq + * @param prenum The preload size, 0: do not use preload function + * @return The result of dilation layer + */ +qtp_t *dl_dilation_layerq_mc_steps( dl_convq_queue_t **in, + dl_convq_queue_t **out, + int nch, + int rate, + int size, + dl_matrix2dq_t* filter_kernel, + dl_matrix2dq_t* filter_bias, + dl_matrix2dq_t* gate_kernel, + dl_matrix2dq_t* gate_bias, + int filter_shift, + int gate_shift, + int offset, + int prenum); + +void test_atrous_convq(int size, int rate, int in_channel, int out_channel); +void test_lstm_convq(int size, int in_dim, int lstm_cell); +void dl_nn_tanh_i162(dl_convq_queue_t **cqm, int offset, int nch); +void dl_copy_queue_item_by_qmf(dl_convq_queue_t *cq, fptp_t* item, int m_bit, int f_bit, int offset, int ch); +void dl_convq_queue_mc_bzero(dl_convq_queue_t **cqm, int nch); +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_matrix.h b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_matrix.h new file mode 100644 index 00000000000..d046e2452f7 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_matrix.h @@ -0,0 +1,252 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef DL_LIB_MATRIX_H +#define DL_LIB_MATRIX_H + +#ifdef ESP_PLATFORM +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "freertos/queue.h" +#include "esp_system.h" +#endif + +// #ifdef CONFIG_IDF_TARGET_ESP32S3 +// #include "dl_tie728_bzero.h" +// #endif + +typedef float fptp_t; + +#if CONFIG_BT_SHARE_MEM_REUSE +extern multi_heap_handle_t gst_heap; +#endif + +//Flags for matrices +#define DL_MF_FOREIGNDATA (1<<0) /*< Matrix *item data actually points to another matrix and should not be freed */ + +//'Normal' float matrix +typedef struct { + int w; /*< Width */ + int h; /*< Height */ + int stride; /*< Row stride, essentially how many items to skip to get to the same position in the next row */ + int flags; /*< Flags. OR of DL_MF_* values */ + fptp_t *item; /*< Pointer to item array */ +} dl_matrix2d_t; + +//Macro to quickly access the raw items in a matrix +#define DL_ITM(m, x, y) m->item[(x)+(y)*m->stride] + + +/** + * @brief Allocate a matrix + * + * @param w Width of the matrix + * @param h Height of the matrix + * @return The matrix, or NULL if out of memory + */ +dl_matrix2d_t *dl_matrix_alloc(int w, int h); + + +/** + * @brief Free a matrix + * Frees the matrix structure and (if it doesn't have the DL_MF_FOREIGNDATA flag set) the m->items space as well. + * + * @param m Matrix to free + */ +void dl_matrix_free(dl_matrix2d_t *m); + +/** + * @brief Zero out the matrix + * Sets all entries in the matrix to 0. + * + * @param m Matrix to zero + */ +void dl_matrix_zero(dl_matrix2d_t *m); + +/** + * @brief Copy the matrix into psram + * Copy the matrix from flash or iram/psram into psram + * + * @param m Matrix to zero + */ +dl_matrix2d_t *dl_matrix_copy_to_psram(const dl_matrix2d_t *m); + +/** + * @brief Generate a new matrix using a range of items from an existing matrix. + * When using this, the data of the new matrix is not allocated/copied but it re-uses a pointer + * to the existing data. Changing the data in the resulting matrix, as a result, will also change + * the data in the existing matrix that has been sliced. + * + * @param x X-offset of the origin of the returned matrix within the sliced matrix + * @param y Y-offset of the origin of the returned matrix within the sliced matrix + * @param w Width of the resulting matrix + * @param h Height of the resulting matrix + * @param in Old matrix (with foreign data) to re-use. Passing NULL will allocate a new matrix. + * @return The resulting slice matrix, or NULL if out of memory + */ +dl_matrix2d_t *dl_matrix_slice(const dl_matrix2d_t *src, int x, int y, int w, int h, dl_matrix2d_t *in); + +/** + * @brief select a range of items from an existing matrix and flatten them into one dimension. + * + * @Warning The results are flattened in row-major order. + * + * @param x X-offset of the origin of the returned matrix within the sliced matrix + * @param y Y-offset of the origin of the returned matrix within the sliced matrix + * @param w Width of the resulting matrix + * @param h Height of the resulting matrix + * @param in Old matrix to re-use. Passing NULL will allocate a new matrix. + * @return The resulting flatten matrix, or NULL if out of memory + */ +dl_matrix2d_t *dl_matrix_flatten(const dl_matrix2d_t *src, int x, int y, int w, int h, dl_matrix2d_t *in); + +/** + * @brief Generate a matrix from existing floating-point data + * + * @param w Width of resulting matrix + * @param h Height of resulting matrix + * @param data Data to populate matrix with + * @return A newaly allocated matrix populated with the given input data, or NULL if out of memory. + */ +dl_matrix2d_t *dl_matrix_from_data(int w, int h, int stride, const void *data); + + +/** + * @brief Multiply a pair of matrices item-by-item: res=a*b + * + * @param a First multiplicand + * @param b Second multiplicand + * @param res Multiplicated data. Can be equal to a or b to overwrite that. + */ +void dl_matrix_mul(const dl_matrix2d_t *a, const dl_matrix2d_t *b, dl_matrix2d_t *res); + +/** + * @brief Do a dotproduct of two matrices : res=a.b + * + * @param a First multiplicand + * @param b Second multiplicand + * @param res Dotproduct data. *Must* be a *different* matrix from a or b! + */ +void dl_matrix_dot(const dl_matrix2d_t *a, const dl_matrix2d_t *b, dl_matrix2d_t *res); + +/** + * @brief Add a pair of matrices item-by-item: res=a-b + * + * @param a First matrix + * @param b Second matrix + * @param res Added data. Can be equal to a or b to overwrite that. + */ +void dl_matrix_add(const dl_matrix2d_t *a, const dl_matrix2d_t *b, dl_matrix2d_t *out); + + +/** + * @brief Divide a pair of matrices item-by-item: res=a/b + * + * @param a First matrix + * @param b Second matrix + * @param res Divided data. Can be equal to a or b to overwrite that. + */ +void dl_matrix_div(const dl_matrix2d_t *a, const dl_matrix2d_t *b, dl_matrix2d_t *out); + +/** + * @brief Subtract a matrix from another, item-by-item: res=a-b + * + * @param a First matrix + * @param b Second matrix + * @param res Subtracted data. Can be equal to a or b to overwrite that. + */ +void dl_matrix_sub(const dl_matrix2d_t *a, const dl_matrix2d_t *b, dl_matrix2d_t *out); + +/** + * @brief Add a constant to every item of the matrix + * + * @param subj Matrix to add the constant to + * @param add The constant + */ +void dl_matrix_add_const(dl_matrix2d_t *subj, const fptp_t add); + + +/** + * @brief Concatenate the rows of two matrices into a new matrix + * + * @param a First matrix + * @param b Second matrix + * @return A newly allocated array with as avlues a|b + */ +dl_matrix2d_t *dl_matrix_concat(const dl_matrix2d_t *a, const dl_matrix2d_t *b); + +dl_matrix2d_t *dl_matrix_concat_h( dl_matrix2d_t *a, const dl_matrix2d_t *b); + +/** + * @brief Print the contents of a matrix to stdout. Used for debugging. + * + * @param a The matrix to print. + */ +void dl_printmatrix(const dl_matrix2d_t *a); + +/** + * @brief Return the average square error given a correct and a test matrix. + * + * ...Well, more or less. If anything, it gives an indication of the error between + * the two. Check the code for the exact implementation. + * + * @param a First of the two matrices to compare + * @param b Second of the two matrices to compare + * @return value indicating the relative difference between matrices + */ +float dl_matrix_get_avg_sq_err(const dl_matrix2d_t *a, const dl_matrix2d_t *b); + + + +/** + * @brief Check if two matrices have the same shape, that is, the same amount of rows and columns + * + * @param a First of the two matrices to compare + * @param b Second of the two matrices to compare + * @return true if the two matrices are shaped the same, false otherwise. + */ +int dl_matrix_same_shape(const dl_matrix2d_t *a, const dl_matrix2d_t *b); + + +/** + * @brief Get a specific item from the matrix + * + * Please use these for external matrix access instead of DL_ITM + * + * @param m Matrix to access + * @param x Column address + * @param y Row address + * @return Value in that position + */ +inline static fptp_t dl_matrix_get(const dl_matrix2d_t *m, const int x, const int y) { + return DL_ITM(m, x, y); +} + +/** + * @brief Set a specific item in the matrix to the given value + * + * Please use these for external matrix access instead of DL_ITM + * + * @param m Matrix to access + * @param x Column address + * @param y Row address + * @param val Value to write to that position + */ +inline static void dl_matrix_set(dl_matrix2d_t *m, const int x, const int y, fptp_t val) { + DL_ITM(m, x, y)=val; +} + +void matrix_get_range(const dl_matrix2d_t *m, fptp_t *rmin, fptp_t *rmax); + +#endif + diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_matrixq.h b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_matrixq.h new file mode 100644 index 00000000000..5f0474a08fd --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_matrixq.h @@ -0,0 +1,378 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef DL_LIB_MATRIXQ_H +#define DL_LIB_MATRIXQ_H + +#include +#include "dl_lib_matrix.h" + +typedef int16_t qtp_t; + +//Quantized matrix. Uses fixed numbers and has the storage for the rows/columns inverted +//for easy use as a multiplicand without stressing out the flash cache too much. +typedef struct { + int w; + int h; + int stride; //Normally equals h, not w! + int flags; + int exponent; //The values in items should be multiplied by pow(2,exponent) to get the real values. + qtp_t *itemq; +} dl_matrix2dq_t; + +#define DL_QTP_SHIFT 15 +#define DL_QTP_RANGE ((1<itemq[(y)+(x)*m->stride] +#define DL_QTP_EXP_NA 255 //non-applicable exponent because matrix is null + +#define DL_SHIFT_AUTO 32 + +/** + * @info About quantized matrices and shift values + * + * Grab a coffee (or tea, or hot water) and sit down when you read this for the first + * time. Quantized matrices can speed up your operations, but come with some quirks, and + * it's good to understand how they work before using them. + * + * The data in the quantized matrix type is stored similarily to floating-point types: + * when storing a real value, the value is stored as a mantissa (base number) and an + * exponent. The 'real' value that can be re-derived from those two numbers is something + * similar to mantissa*2^exponent. Up to this point, there's not that much difference from + * the standard floating point implementations like e.g. IEEE-754. + * + * The difference with respect to quantized matrices is that for a quantized matrix, it is + * assumed all values stored have more-or-less the same order of magnitude. This allows the + * matrix to only store all the mantissas, while the exponents are shared; there is only one + * exponent for the entire matrix. This makes it quicker to handle matrix operations - the + * logic to fix the exponents only needs to happen once, while the rest can be done in simple + * integer arithmetic. It also nets us some memory savings - while normally a floating point + * number is 32-bit, storing only 16-bit mantissas as the matrix items almost halves the + * memory requirements. + * + * While most of the details of handling the intricacies of the quantized matrixes are done + * transparently by the code in dl_lib_matrixq.c, some implementation details leak out, + * specifically in places where addition/subtraction/division happens. + * + * The problem is that the routines do not know what the size of the resulting operation is. For + * instance, when adding two matrices of numbers, the resulting numbers *could* be large enough + * to overflow the mantissa of the result if the exponent is the same. However, if by default we + * assume the mantissas needs to be scaled back, we may lose precision. + * + * In order to counter this, all operations that have this issue have a ``shift`` argument. If + * the argument is zero, the routine will be conservative, that is, increase the exponent of + * the result to such an extent it's mathematically impossible a value in the result will exceed + * the maximum value that can be stored. However, when this argument is larger than zero, the + * algorithm will hold back on this scaling by the indicated amount of bits, preserving precision + * but increasing the chance of some of the calculated values not fitting in the mantissa anymore. + * If this happens, the value will be clipped to the largest (or, for negative values, smallest) + * value possible. (Neural networks usually are okay with this happening for a limited amount + * of matrix indices). + * + * For deciding on these shift values, it is recommended to start with a shift value of one, then + * use dl_matrixq_check_sanity on the result. If this indicates clipping, lower the shift value. + * If it indicates bits are under-used, increase it. Note that for adding and subtraction, only + * shift values of 0 or 1 make sense; these routines will error out if you try to do something + * else. + * + * For neural networks and other noise-tolerant applications, note that even when + * dl_matrixq_check_sanity does not indicate any problems, twiddling with the shift value may lead + * to slightly improved precision. Feel free to experiment. + **/ + + +/** + * @brief Allocate a matrix + * + * @param w Width of the matrix + * @param h Height of the matrix + * @return The matrix, or NULL if out of memory + */ +dl_matrix2dq_t *dl_matrixq_alloc(int w, int h); +dl_matrix2dq_t *dl_matrixq_alloc_psram(int w, int h); +/** + * @brief Convert a floating-point matrix to a quantized matrix + * + * @param m Floating-point matrix to convert + * @param out Quantized matrix to re-use. If NULL, allocate a new one. + * @Return The quantized version of the floating-point matrix + */ +dl_matrix2dq_t *dl_matrixq_from_matrix2d(const dl_matrix2d_t *m, dl_matrix2dq_t *out); + +/** + * TODO: DESCRIBE THIS FUNCTION + */ +dl_matrix2dq_t *dl_matrixq_from_matrix2d_by_qmf(const dl_matrix2d_t *m, dl_matrix2dq_t *out, int m_bit, int f_bit); + + +/** + * @brief Convert a quantized matrix to a floating-point one. + * + * @param m Floating-point matrix to convert + * @param out Quantized matrix to re-use. If NULL, allocate a new one. + * @Return The quantized version of the floating-point matrix + **/ +dl_matrix2d_t *dl_matrix2d_from_matrixq(const dl_matrix2dq_t *m, dl_matrix2d_t *out); + + +/** + * @brief Free a quantized matrix + * Frees the matrix structure and (if it doesn't have the DL_MF_FOREIGNDATA flag set) the m->items space as well. + * + * @param m Matrix to free + */ +void dl_matrixq_free(dl_matrix2dq_t *m); + +/** + * @brief Zero out the matrix + * Sets all entries in the matrix to 0. + * + * @param m Matrix to zero + */ +void dl_matrixq_zero(dl_matrix2dq_t *m); + +/** + * @brief Copy the matrix into psram + * Copy the matrix from flash or iram/psram into psram + * + * @param m Matrix to copy + */ +dl_matrix2dq_t *dl_matrixq_copy_to_psram(const dl_matrix2dq_t *m); + +/** + * @brief Do a dotproduct of two quantized matrices : res=a.b, Result is a fixed-point matrix. + * + * @param a First multiplicand + * @param b Second multiplicand + * @param res Dotproduct data. *Must* be a *different* matrix from a or b! + * @param shift Shift ratio + */ +void dl_matrixq_dot(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2dq_t *res, int shift); + +/** + * @brief Do a dotproduct of two quantized matrices: res=a.b, Result is a floating-point matrix. + * + * @param a First multiplicand + * @param b Second multiplicand + * @param res Dotproduct data. *Must* be a *different* matrix from a or b! + */ +void dl_matrixq_dot_matrix_out(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2d_t *res); + +/** + * @brief Do a dotproduct of two quantized matrices : res=a.b. This always uses the simple & stupid C algo for the dot product. + * + * Result is a fixed-point matrix. + * + * Use this only if you expect something is wrong with the accelerated routines that dl_matrixq_dot calls; this function can be + * much slower than dl_matrixq_dot . + * + * @param a First multiplicand + * @param b Second multiplicand + * @param res Dotproduct data. *Must* be a *different* matrix from a or b! + * @param shift Shift ratio + */ +void dl_matrixq_dot_c_impl(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2dq_t *res, int shift); + +/** + * @brief Do a dotproduct of two quantized matrices : res=a.b. This always uses the simple & stupid C algo for the dot product. + * + * Result is a floating-point matrix. + * + * Use this only if you expect something is wrong with the accelerated routines that dl_matrixq_dot_matrix_out calls; this function can be + * much slower than dl_matrixq_dot_matrix_out. + * + * @param a First multiplicand + * @param b Second multiplicand + * @param res Dotproduct data. *Must* be a *different* matrix from a or b! + */ +void dl_matrixq_dot_matrix_out_c_impl(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2d_t *res); + +/** + * @brief Do a dotproduct of a floating point and a quantized matrix. Result is a floating-point matrix. + * + * @param a First multiplicand; float matrix + * @param b Second multiplicand; quantized matrix + * @param res Dotproduct data; float matrix. *Must* be a *different* matrix from a or b! + */ +void dl_matrix_matrixq_dot(const dl_matrix2d_t *a, const dl_matrix2dq_t *b, dl_matrix2d_t *res); + + +/** + * @brief Print the contents of a quantized matrix to stdout. Used for debugging. + * + * @param a The matrix to print. + */ +void dl_printmatrixq(const dl_matrix2dq_t *a); + + +/** + * @brief Add a pair of quantizedmatrices item-by-item: res=a-b + * + * @param a First matrix + * @param b Second matrix + * @param res Added data. Can be equal to a or b to overwrite that. + * @param shift Shift value. Only 0 or 1 makes sense here. + */ +void dl_matrixq_add(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2dq_t *res, int shift); + +/** + * @brief Generate a new matrix using a range of items from an existing matrix. + * When using this, the data of the new matrix is not allocated/copied but it re-uses a pointer + * to the existing data. Changing the data in the resulting matrix, as a result, will also change + * the data in the existing matrix that has been sliced. + * + * @Warning In contrast to the floating point equivalent of this function, the fixed-point version + * of this has the issue that as soon as the output exponent of one of the slices changes, the data + * in the sliced matrix gets corrupted (because the exponent of that matrix is still the same.) If you + * use this function, either treat the slices as read-only, or assume the sliced matrix contains + * garbage after modifying the data in one of the slices. + * + * @param x X-offset of the origin of the returned matrix within the sliced matrix + * @param y Y-offset of the origin of the returned matrix within the sliced matrix + * @param w Width of the resulting matrix + * @param h Height of the resulting matrix + * @param in Old matrix (with foreign data) to re-use. Passing NULL will allocate a new matrix. + * @return The resulting slice matrix, or NULL if out of memory + */ +dl_matrix2dq_t *dl_matrixq_slice(const dl_matrix2dq_t *src, int x, int y, int w, int h, dl_matrix2dq_t *in); + +/** + * @brief select a range of items from an existing matrix and flatten them into one dimension. + * + * @Warning The results are flattened in row-major order. + * + * @param x X-offset of the origin of the returned matrix within the sliced matrix + * @param y Y-offset of the origin of the returned matrix within the sliced matrix + * @param w Width of the resulting matrix + * @param h Height of the resulting matrix + * @param in Old matrix to re-use. Passing NULL will allocate a new matrix. + * @return The resulting flatten matrix, or NULL if out of memory + */ +dl_matrix2dq_t *dl_matrixq_flatten(const dl_matrix2dq_t *src, int x, int y, int w, int h, dl_matrix2dq_t *in); + +/** + * @brief Subtract a quantized matrix from another, item-by-item: res=a-b + * + * @param a First matrix + * @param b Second matrix + * @param res Subtracted data. Can be equal to a or b to overwrite that. + * @param shift Shift value. Only 0 or 1 makes sense here. + */ +void dl_matrixq_sub(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2dq_t *res, int shift); + +/** + * @brief Multiply a pair of quantized matrices item-by-item: res=a*b + * + * @param a First multiplicand + * @param b Second multiplicand + * @param res Multiplicated data. Can be equal to a or b to overwrite that matrix. + */ +void dl_matrixq_mul( dl_matrix2dq_t *a, dl_matrix2dq_t *b, dl_matrix2dq_t *res); + +/** + * @brief Divide a pair of quantized matrices item-by-item: res=a/b + * + * @param a First matrix + * @param b Second matrix + * @param res Divided data. Can be equal to a or b to overwrite that. + */ +void dl_matrixq_div(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2dq_t *out, int shift); + +/** + * @brief Check if two quantized matrices have the same shape, that is, the same amount of + * rows and columns + * + * @param a First of the two matrices to compare + * @param b Second of the two matrices to compare + * @return true if the two matrices are shaped the same, false otherwise. + */ +int dl_matrixq_same_shape(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b); + +/** + * @brief Concatenate the rows of two quantized matrices into a new matrix + * + * @param a First matrix + * @param b Second matrix + * @return A newly allocated quantized matrix with as values a|b + */ +dl_matrix2dq_t *dl_matrixq_concat(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b); + +/** + * @brief Add a constant to every item of the quantized matrix + * + * @param subj Matrix to add the constant to + * @param add The constant + */ +void dl_matrixq_add_const(dl_matrix2dq_t *subj, const fptp_t add, int shift); + +/** + * @brief Check the sanity of a quantized matrix + * + * Due to the nature of quantized matrices, depending on the calculations a quantized + * matrix is the result of and the shift values chosen in those calculations, a quantized + * matrix may have an exponent and mantissas that lead to a loss of precision, either because + * most significant mantissa bits are unused, or because a fair amount of mantissas are + * clipped. This function checks if this is the case and will report a message to stdout + * if significant loss of precision is detected. + * + * @param m The quantized matrix to check + * @param name A string to be displayed in the message if the sanity check fails + * @return True if matrix is sane, false otherwise + **/ + +int dl_matrixq_check_sanity(dl_matrix2dq_t *m, const char *name); + +/** + * @brief re-adjust the exponent of the matrix to fit the mantissa better + * + * This function will shift up all the data in the mantissas so there are no + * most-significant bits that are unused in all mantissas. It will also adjust + * the exponent to keep the actua values in the matrix the same. + * + * Some operations done on a matrix, especially operations that re-use the + * result of earlier operations done in the same way, can lead to the loss of + * data because the exponent of the quantized matrix is never re-adjusted. You + * can do that implicitely by calling this function. + * + * @param m The matrix to re-adjust +**/ +void dl_matrixq_readjust_exp(dl_matrix2dq_t *m); + + + +/** + * @brief Get the floating-point value of a specific item from the quantized matrix + * + * @param m Matrix to access + * @param x Column address + * @param y Row address + * @return Value in that position + */ +fptp_t dl_matrixq_get(const dl_matrix2dq_t *m, const int x, const int y); + +/** + * @brief Set a specific item in the quantized matrix to the given + * floating-point value + * + * @warning If the given value is more than the exponent in the quantized matrix + * allows for, all mantissas in the matrix will be shifted down to make the value + * 'fit'. If, however, the exponent is such that the value would result in a + * quantized mantissa of 0, nothing is done. + * + * @param m Matrix to access + * @param x Column address + * @param y Row address + * @param val Value to write to that position + */ +void dl_matrixq_set(dl_matrix2dq_t *m, const int x, const int y, fptp_t val); + +#endif diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_matrixq8.h b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_matrixq8.h new file mode 100644 index 00000000000..579b1c08aaf --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/dl_lib_matrixq8.h @@ -0,0 +1,71 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef DL_LIB_MATRIXQ8_H +#define DL_LIB_MATRIXQ8_H + +#include +#include "dl_lib_matrix.h" +#include "dl_lib.h" +#include "dl_lib_matrixq.h" + +typedef int8_t q8tp_t; + +typedef struct { + int w; + int h; + int stride; //Normally equals h, not w! + int flags; + int exponent; //The values in items should be multiplied by pow(2,exponent) to get the real values. + q8tp_t *itemq; +} dl_matrix2dq8_t; + +#define DL_Q8TP_SHIFT 7 +#define DL_Q8TP_RANGE ((1<itemq[(y)+(x)*m->stride] + +/** + * @brief Allocate a matrix + * + * @param w Width of the matrix + * @param h Height of the matrix + * @return The matrix, or NULL if out of memory + */ +dl_matrix2dq8_t *dl_matrixq8_alloc(int w, int h); + +/** + * @brief Free a quantized matrix + * Frees the matrix structure and (if it doesn't have the DL_MF_FOREIGNDATA flag set) the m->items space as well. + * + * @param m Matrix to free + */ +void dl_matrixq8_free(dl_matrix2dq8_t *m); + +/** + * @brief Copy a quantized matrix + * Copy a quantized matrix from flash or iram/psram + * + * @param m Matrix to copy + */ +dl_matrix2dq8_t *dl_matrixq8_copy_to_psram(const dl_matrix2dq8_t *m); + +/** + * @brief Convert a floating-point matrix to a quantized matrix + * + * @param m Floating-point matrix to convert + * @param out Quantized matrix to re-use. If NULL, allocate a new one. + * @Return The quantized version of the floating-point matrix + */ +dl_matrix2dq8_t *dl_matrixq8_from_matrix2d(const dl_matrix2d_t *m, dl_matrix2dq8_t *out); + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_aec.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_aec.h new file mode 100644 index 00000000000..03afc90ff04 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_aec.h @@ -0,0 +1,112 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License +#ifndef _ESP_AEC_H_ +#define _ESP_AEC_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define USE_AEC_FFT // Not kiss_fft +#define AEC_USE_SPIRAM 0 +#define AEC_SAMPLE_RATE 16000 // Only Support 16000Hz +#define AEC_FRAME_LENGTH_MS 16 +#define AEC_FILTER_LENGTH 1200 // Number of samples of echo to cancel + +typedef void* aec_handle_t; + +/** + * @brief Creates an instance to the AEC structure. + * + * @deprecated This API will be deprecated after version 1.0, please use aec_pro_create + * + * @param sample_rate The Sampling frequency (Hz) must be 16000. + * + * @param frame_length The length of the audio processing must be 16ms. + * + * @param filter_length Number of samples of echo to cancel. + * + * @return + * - NULL: Create failed + * - Others: The instance of AEC + */ +aec_handle_t aec_create(int sample_rate, int frame_length, int filter_length); + +/** + * @brief Creates an instance to the AEC structure. + * + * @deprecated This API will be deprecated after version 1.0, please use aec_pro_create + * + * @param sample_rate The Sampling frequency (Hz) must be 16000. + * + * @param frame_length The length of the audio processing must be 16ms. + * + * @param filter_length Number of samples of echo to cancel. + * + * @param nch Number of input signal channel. + * + * @return + * - NULL: Create failed + * - Others: The instance of AEC + */ +aec_handle_t aec_create_multimic(int sample_rate, int frame_length, int filter_length, int nch); + +/** + * @brief Creates an instance of more powerful AEC. + * + * @param frame_length Length of input signal. Must be 16ms if mode is 0; otherwise could be 16ms or 32ms. Length of input signal to aec_process must be modified accordingly. + * + * @param nch Number of microphones. + * + * @param mode Mode of AEC (0 to 5), indicating aggressiveness and RAM allocation. 0: mild; 1 or 2: medium (1: internal RAM, 2: SPIRAM); 3 and 4: aggressive (3: internal RAM, 4: SPIRAM); 5: agressive, accelerated for ESP32-S3. + * + * @return + * - NULL: Create failed + * - Others: An Instance of AEC + */ +aec_handle_t aec_pro_create(int frame_length, int nch, int mode); + +/** + * @brief Performs echo cancellation a frame, based on the audio sent to the speaker and frame from mic. + * + * @param inst The instance of AEC. + * + * @param indata An array of 16-bit signed audio samples from mic. + * + * @param refdata An array of 16-bit signed audio samples sent to the speaker. + * + * @param outdata Returns near-end signal with echo removed. + * + * @return None + * + */ +void aec_process(const aec_handle_t inst, int16_t *indata, int16_t *refdata, int16_t *outdata); + +/** + * @brief Free the AEC instance + * + * @param inst The instance of AEC. + * + * @return None + * + */ +void aec_destroy(aec_handle_t inst); + +#ifdef __cplusplus +} +#endif + +#endif //_ESP_AEC_H_ diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_afe_sr_iface.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_afe_sr_iface.h new file mode 100644 index 00000000000..73f60c3c11f --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_afe_sr_iface.h @@ -0,0 +1,245 @@ +#pragma once +#include "stdint.h" +#include "esp_wn_iface.h" +#include "esp_wn_models.h" + +//AFE: Audio Front-End +//SR: Speech Recognition +//afe_sr/AFE_SR: the audio front-end for speech recognition + +//Opaque AFE_SR data container +typedef struct esp_afe_sr_data_t esp_afe_sr_data_t; + +//Set AFE_SR mode +typedef enum { + SR_MODE_LOW_COST = 0, + SR_MODE_HIGH_PERF = 1 +} afe_sr_mode_t; + +// the output state of fetch function +typedef enum { + AFE_FETCH_CHANNEL_VERIFIED = -2, // wwe state: output channel is verified + AFE_FETCH_NOISE = -1, // vad state: noise or silence + AFE_FETCH_SPEECH = 0, // vad state: speech + AFE_FETCH_WWE_DETECTED = 1 // wwe state: wake word is detected +} afe_fetch_mode_t; + +typedef enum { + AFE_PSRAM_LOW_COST = 1, + AFE_PSRAM_MEDIA_COST = 2, + AFE_PSRAM_HIGH_COST = 3 +} afe_use_psram_mode_t; + +typedef struct { + bool aec_init; + bool se_init; + bool vad_init; + bool wakenet_init; + int vad_mode; + const esp_wn_iface_t *wakenet_model; + const model_coeff_getter_t *wakenet_coeff; + det_mode_t wakenet_mode; + afe_sr_mode_t afe_mode; + int afe_perferred_core; + int afe_perferred_priority; + int afe_ringbuf_size; + int alloc_from_psram; + int agc_mode; +} afe_config_t; + + +#if CONFIG_IDF_TARGET_ESP32 +#define AFE_CONFIG_DEFAULT() { \ + .aec_init = true, \ + .se_init = true, \ + .vad_init = true, \ + .wakenet_init = true, \ + .vad_mode = 3, \ + .wakenet_model = &WAKENET_MODEL, \ + .wakenet_coeff = &WAKENET_COEFF, \ + .wakenet_mode = DET_MODE_90, \ + .afe_mode = SR_MODE_HIGH_PERF, \ + .afe_perferred_core = 0, \ + .afe_perferred_priority = 5, \ + .afe_ringbuf_size = 50, \ + .alloc_from_psram = 1, \ + .agc_mode = 2, \ +} +#elif CONFIG_IDF_TARGET_ESP32S3 +#define AFE_CONFIG_DEFAULT() { \ + .aec_init = true, \ + .se_init = true, \ + .vad_init = true, \ + .wakenet_init = true, \ + .vad_mode = 3, \ + .wakenet_model = &WAKENET_MODEL, \ + .wakenet_coeff = &WAKENET_COEFF, \ + .wakenet_mode = DET_MODE_2CH_90, \ + .afe_mode = SR_MODE_LOW_COST, \ + .afe_perferred_core = 0, \ + .afe_perferred_priority = 5, \ + .afe_ringbuf_size = 50, \ + .alloc_from_psram = AFE_PSRAM_MEDIA_COST, \ + .agc_mode = 2, \ +} +#endif +/** + * @brief Function to initialze a AFE_SR instance with a specified mode + * + * @param mode The mode of AFE_SR + * @param perferred_core The perferred core to be pinned. + * If all task in AFE_SR can not run in real time by only one core, the another core would be used. + * @returns Handle to the AFE_SR data + */ +typedef esp_afe_sr_data_t* (*esp_afe_sr_iface_op_create_t)(afe_sr_mode_t mode, int perferred_cor); + +/** + * @brief Function to initialze a AFE_SR instance + * + * @param afe_config The config of AFE_SR + * @returns Handle to the AFE_SR data + */ +typedef esp_afe_sr_data_t* (*esp_afe_sr_iface_op_create_from_config_t)(afe_config_t *afe_config); + +/** + * @brief Get the amount of each channel samples per frame that need to be passed to the function + * + * Every speech enhancement AFE_SR processes a certain number of samples at the same time. This function + * can be used to query that amount. Note that the returned amount is in 16-bit samples, not in bytes. + * + * @param afe The AFE_SR object to query + * @return The amount of samples to feed the fetch function + */ +typedef int (*esp_afe_sr_iface_op_get_samp_chunksize_t)(esp_afe_sr_data_t *afe); + +/** + * @brief Get the channel number of samples that need to be passed to the fetch function + * + * @param afe The AFE_SR object to query + * @return The amount of samples to feed the fetch function + */ +typedef int (*esp_afe_sr_iface_op_get_channel_num_t)(esp_afe_sr_data_t *afe); + +/** + * @brief Get the sample rate of the samples to feed to the function + * + * @param afe The AFE_SR object to query + * @return The sample rate, in hz + */ +typedef int (*esp_afe_sr_iface_op_get_samp_rate_t)(esp_afe_sr_data_t *afe); + +/** + * @brief Feed samples of an audio stream to the AFE_SR + * + * @Warning The input data should be arranged in the format of [CH0_0, CH1_0, ..., CHN_0, CH0_1, CH1_1, ..., CHN_1, ...]. + * The last channel is reference signal or far-end signal. + * + * @param afe The AFE_SR object to queryq + * + * @param in The input microphone signal, only support signed 16-bit @ 16 KHZ. The frame size can be queried by the + * `get_samp_chunksize`. The channel number can be queried `get_channel_num`. + * @return The size of input + */ +typedef int (*esp_afe_sr_iface_op_feed_t)(esp_afe_sr_data_t *afe, const int16_t* in); + +/** + * @brief fetch enhanced samples of an audio stream from the AFE_SR + * + * @Warning The output is single channel data, no matter how many channels the input is. + * + * @param afe The AFE_SR object to query + * @param out The output enhanced signal. The frame size can be queried by the `get_samp_chunksize`. + * @return The state of output, please refer to the definition of `afe_fetch_mode_t` + */ +typedef afe_fetch_mode_t (*esp_afe_sr_iface_op_fetch_t)(esp_afe_sr_data_t *afe, int16_t* out); + +/** + * @brief Initial wakenet and wake words coefficient, or reset wakenet and wake words coefficient + * when wakenet has been initialized. + * + * @param afe The AFE_SR object to query + * @param wakenet The pointer of wakenet + * @param model_coeff The coefficient of wake word model + * @return 0: fail, 1: success + */ +typedef int (*esp_afe_sr_iface_op_set_wakenet_t)(esp_afe_sr_data_t *afe, + esp_wn_iface_t *wakenet, + const model_coeff_getter_t *model_coeff); + +/** + * @brief Disable wakenet model. + * + * @param afe The AFE_SR object to query + * @return 0: fail, 1: success + */ +typedef int (*esp_afe_sr_iface_op_disable_wakenet_t)(esp_afe_sr_data_t *afe); + +/** + * @brief Enable wakenet model. + * + * @param afe The AFE_SR object to query + * @return 0: fail, 1: success + */ +typedef int (*esp_afe_sr_iface_op_enable_wakenet_t)(esp_afe_sr_data_t *afe); + +/** + * @brief Disable AEC algorithm. + * + * @param afe The AFE_SR object to query + * @return 0: fail, 1: success + */ +typedef int (*esp_afe_sr_iface_op_disable_aec_t)(esp_afe_sr_data_t *afe); + +/** + * @brief Enable AEC algorithm. + * + * @param afe The AFE_SR object to query + * @return 0: fail, 1: success + */ +typedef int (*esp_afe_sr_iface_op_enable_aec_t)(esp_afe_sr_data_t *afe); + +/** + * @brief Disable SE algorithm. + * + * @param afe The AFE_SR object to query + * @return 0: fail, 1: success + */ +typedef int (*esp_afe_sr_iface_op_disable_se_t)(esp_afe_sr_data_t *afe); + +/** + * @brief Enable SE algorithm. + * + * @param afe The AFE_SR object to query + * @return 0: fail, 1: success + */ +typedef int (*esp_afe_sr_iface_op_enable_se_t)(esp_afe_sr_data_t *afe); + +/** + * @brief Destroy a AFE_SR instance + * + * @param afe AFE_SR object to destroy + */ +typedef void (*esp_afe_sr_iface_op_destroy_t)(esp_afe_sr_data_t *afe); + + +/** + * This structure contains the functions used to do operations on a AFE_SR. + */ +typedef struct { + esp_afe_sr_iface_op_create_t create; + esp_afe_sr_iface_op_create_from_config_t create_from_config; + esp_afe_sr_iface_op_feed_t feed; + esp_afe_sr_iface_op_fetch_t fetch; + esp_afe_sr_iface_op_get_samp_chunksize_t get_feed_chunksize; + esp_afe_sr_iface_op_get_samp_chunksize_t get_fetch_chunksize; + esp_afe_sr_iface_op_get_channel_num_t get_channel_num; + esp_afe_sr_iface_op_get_samp_rate_t get_samp_rate; + esp_afe_sr_iface_op_set_wakenet_t set_wakenet; + esp_afe_sr_iface_op_disable_wakenet_t disable_wakenet; + esp_afe_sr_iface_op_enable_wakenet_t enable_wakenet; + esp_afe_sr_iface_op_disable_aec_t disable_aec; + esp_afe_sr_iface_op_enable_aec_t enable_aec; + esp_afe_sr_iface_op_disable_se_t disable_se; + esp_afe_sr_iface_op_enable_se_t enable_se; + esp_afe_sr_iface_op_destroy_t destroy; +} esp_afe_sr_iface_t; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_afe_sr_models.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_afe_sr_models.h new file mode 100644 index 00000000000..5424134ab1e --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_afe_sr_models.h @@ -0,0 +1,6 @@ +#pragma once +#include "esp_afe_sr_iface.h" + +extern const esp_afe_sr_iface_t esp_afe_sr_2mic; +extern const esp_afe_sr_iface_t esp_afe_sr_1mic; + diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_agc.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_agc.h new file mode 100644 index 00000000000..20b0e3f2259 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_agc.h @@ -0,0 +1,39 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License +#ifndef _ESP_AGC_H_ +#define _ESP_AGC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +////all positive value is valid, negective is error +typedef enum { + ESP_AGC_SUCCESS = 0, ////success + ESP_AGC_FAIL = -1, ////agc fail + ESP_AGC_SAMPLE_RATE_ERROR = -2, ///sample rate can be only 8khz, 16khz, 32khz + ESP_AGC_FRAME_SIZE_ERROR = -3, ////the input frame size should be only 10ms, so should together with sample-rate to get the frame size +} ESP_AGE_ERR; + + +void *esp_agc_open(int agc_mode, int sample_rate); +void set_agc_config(void *agc_handle, int gain_dB, int limiter_enable, int target_level_dbfs); +int esp_agc_process(void *agc_handle, short *in_pcm, short *out_pcm, int frame_size, int sample_rate); +void esp_agc_close(void *agc_handle); + +#ifdef __cplusplus +} +#endif + +#endif // _ESP_AGC_H_ diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_map.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_map.h new file mode 100644 index 00000000000..794afdc54c8 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_map.h @@ -0,0 +1,90 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License +#ifndef _ESP_MAP_H_ +#define _ESP_MAP_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define MAP_SAMPLE_RATE 16000 // Supports 16kHz only +#define MAP_FRAME_SIZE 16 // Supports 16ms only +#define MAP_MIC_DISTANCE 50 // According to physical design of mic-array +#define MAP_AEC_ON true +#define MAP_AEC_OFF false +#define MAP_AEC_FILTER_LENGTH 1200 // Number of samples of echo to cancel + +/** + * @brief Sets mic-array type, currently 2-mic line array and 3-mic circular array + * are supported. + */ +typedef enum { + TWO_MIC_LINE = 0, + THREE_MIC_CIRCLE = 1 +} map_mic_array_type_t; + +typedef void* mic_array_processor_t; + +/** + * @brief Creates an instance to the MAP structure. + * + * @param sample_rate The sampling frequency (Hz) must be 16000. + * + * @param frame_size The length of the audio processing must be 16ms. + * + * @param array_type '0' for 2-mic line array and '1' for 3-mic circular array. + * + * @param mic_distance The distance between neiboring microphones in mm. + * + * @param aec_on Decides whether to turn on AEC. + * + * @param filter_length Number of samples of echo to cancel, effective when AEC is on. + * + * @return + * - NULL: Create failed + * - Others: An instance of MAP + */ +mic_array_processor_t map_create(int fs, int frame_size, int array_type, float mic_distance, bool aec_on, int filter_length); + +/** + * @brief Performs mic array processing for one frame. + * + * @param inst The instance of MAP. + * + * @param in An array of 16-bit signed audio samples from mic. + * + * @param far_end An array of 16-bit signed audio samples sent to the speaker, can be none when AEC is turned off. + * + * @param dsp_out Returns enhanced signal. + * + * @return None + * + */ +void map_process(mic_array_processor_t st, int16_t *in, int16_t *far_end, int16_t *dsp_out); + +/** + * @brief Free the MAP instance + * + * @param inst The instance of MAP. + * + * @return None + * + */ +void map_destory(mic_array_processor_t st); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_mase.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_mase.h new file mode 100644 index 00000000000..3cf403f5646 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_mase.h @@ -0,0 +1,94 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License + +#ifndef _ESP_MASE_H_ +#define _ESP_MASE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define MASE_SAMPLE_RATE 16000 // Supports 16kHz only +#define MASE_FRAME_SIZE 16 // Supports 16ms only +#define MASE_MIC_DISTANCE 65 // According to physical design of mic-array + +/** + * @brief Sets mic-array type, currently 2-mic line array and 3-mic circular array + * are supported. + */ +typedef enum { + TWO_MIC_LINE = 0, + THREE_MIC_CIRCLE = 1 +} mase_mic_array_type_t; + +/** + * @brief Sets operating mode, supporting normal mode and wake-up enhancement mode + */ +typedef enum { + NORMAL_ENHANCEMENT_MODE = 0, + WAKE_UP_ENHANCEMENT_MODE = 1 +} mase_op_mode_t; + +typedef void* mase_handle_t; + +/** + * @brief Creates an instance to the MASE structure. + * + * @param sample_rate The sampling frequency (Hz) must be 16000. + * + * @param frame_size The length of the audio processing must be 16ms. + * + * @param array_type '0' for 2-mic line array and '1' for 3-mic circular array. + * + * @param mic_distance The distance between neiboring microphones in mm. + * + * @param operating_mode '0' for normal mode and '1' for wake-up enhanced mode. + * + * @param filter_strength Strengh of the mic-array speech enhancement, must be 0, 1, 2 or 3. + * + * @return + * - NULL: Create failed + * - Others: An instance of MASE + */ +mase_handle_t mase_create(int fs, int frame_size, int array_type, float mic_distance, int operating_mode, int filter_strength); + +/** + * @brief Performs mic array processing for one frame. + * + * @param inst The instance of MASE. + * + * @param in An array of 16-bit signed audio samples from mic. + * + * @param dsp_out Returns enhanced signal. + * + * @return None + * + */ +void mase_process(mase_handle_t st, int16_t *in, int16_t *dsp_out); + +/** + * @brief Free the MASE instance + * + * @param inst The instance of MASE. + * + * @return None + * + */ +void mase_destory(mase_handle_t st); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_mn_iface.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_mn_iface.h new file mode 100644 index 00000000000..d4e5aa3f86c --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_mn_iface.h @@ -0,0 +1,109 @@ +#pragma once +#include "stdint.h" +// #include "esp_err.h" +#include "dl_lib_coefgetter_if.h" +#include "esp_wn_iface.h" +// //Opaque model data container +// typedef struct model_iface_data_t model_iface_data_t; + +/** + * @brief Initialze a model instance with specified model coefficient. + * + * @param coeff The wakenet model coefficient. + * @param coeff The wakenet model coefficient. + * @parm sample_length Audio length for speech recognition, in ms. + * @returns Handle to the model data. + */ +typedef model_iface_data_t* (*esp_mn_iface_op_create_t)(const model_coeff_getter_t *coeff, int sample_length); + + +/** + * @brief Callback function type to fetch the amount of samples that need to be passed to the detect function + * + * Every speech recognition model processes a certain number of samples at the same time. This function + * can be used to query that amount. Note that the returned amount is in 16-bit samples, not in bytes. + * + * @param model The model object to query + * @return The amount of samples to feed the detect function + */ +typedef int (*esp_mn_iface_op_get_samp_chunksize_t)(model_iface_data_t *model); + +/** + * @brief Callback function type to fetch the number of frames recognized by the command word + * + * @param model The model object to query + * @return The number of the frames recognized by the command word + */ +typedef int (*esp_mn_iface_op_get_samp_chunknum_t)(model_iface_data_t *model); + +/** + * @brief Set the detection threshold to manually abjust the probability + * + * @param model The model object to query + * @param det_treshold The threshold to trigger speech commands, the range of det_threshold is 0.0~0.9999 + */ +typedef int (*esp_mn_iface_op_set_det_threshold_t)(model_iface_data_t *model, float det_threshold); +/** + * @brief Set the detection threshold to manually abjust the probability + * + * @param model The model object to query + * @param phrase_id The ID of speech command phrase + * @param det_treshold The threshold to trigger speech command phrases + */ +typedef void (*esp_mn_iface_op_set_command_det_threshold_t)(model_iface_data_t *model, int phrase_id, float det_threshold); + +/** + * @brief Get the detection threshold by phrase ID + * + * @param model The model object to query + * @param phrase_id The ID of speech command phrase + * + * @return The threshold of speech command phrases + */ +typedef float (*esp_mn_iface_op_get_command_det_threshold_t)(model_iface_data_t *model, int phrase_id); + +/** + * @brief Get the sample rate of the samples to feed to the detect function + * + * @param model The model object to query + * @return The sample rate, in hz + */ +typedef int (*esp_mn_iface_op_get_samp_rate_t)(model_iface_data_t *model); + +/** + * @brief Feed samples of an audio stream to the speech recognition model and detect if there is a speech command found. + * + * @param model The model object to query. + * @param samples An array of 16-bit signed audio samples. The array size used can be queried by the + * get_samp_chunksize function. + * @return The command id, return 0 if no command word is detected, + */ +typedef int (*esp_mn_iface_op_detect_t)(model_iface_data_t *model, int16_t *samples); + + +/** + * @brief Destroy a speech commands recognition model + * + * @param model The Model object to destroy + */ +typedef void (*esp_mn_iface_op_destroy_t)(model_iface_data_t *model); + +/** + * @brief Reset the speech commands recognition model + * + */ +typedef void (*esp_mn_iface_op_reset_t)(model_iface_data_t *model_data, char *command_str, char *err_phrase_id); + + +typedef struct { + esp_mn_iface_op_create_t create; + esp_mn_iface_op_get_samp_rate_t get_samp_rate; + esp_mn_iface_op_get_samp_chunksize_t get_samp_chunksize; + esp_mn_iface_op_get_samp_chunknum_t get_samp_chunknum; + esp_mn_iface_op_set_det_threshold_t set_det_threshold; + esp_mn_iface_op_set_command_det_threshold_t set_command_det_threshold; + esp_mn_iface_op_get_command_det_threshold_t get_command_det_threshold; + esp_mn_iface_op_detect_t detect; + esp_mn_iface_op_destroy_t destroy; + esp_mn_iface_op_reset_t reset; +} esp_mn_iface_t; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_mn_models.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_mn_models.h new file mode 100644 index 00000000000..5b186541f5b --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_mn_models.h @@ -0,0 +1,77 @@ +#pragma once +#include "esp_mn_iface.h" + +//Contains declarations of all available speech recognion models. Pair this up with the right coefficients and you have a model that can recognize +//a specific phrase or word. +extern const esp_mn_iface_t esp_sr_multinet1_single_quantized_en; +extern const esp_mn_iface_t esp_sr_multinet3_single_quantized_en; +extern const esp_mn_iface_t esp_sr_multinet2_single_quantized_cn; +extern const esp_mn_iface_t esp_sr_multinet3_single_quantized_cn; +extern const esp_mn_iface_t esp_sr_multinet4_single_quantized_cn; +extern const esp_mn_iface_t esp_sr_multinet3_continuous_quantized_cn; +extern const esp_mn_iface_t esp_sr_multinet5_quantized; +extern const esp_mn_iface_t esp_sr_multinet5_quantized8; + +/* + Configure wake word to use based on what's selected in menuconfig. +*/ +#if defined CONFIG_USE_MULTINET +#ifdef CONFIG_SR_MN_EN_MULTINET1_SINGLE_RECOGNITION +#include "multinet1_en.h" +#define MULTINET_MODEL esp_sr_multinet1_single_quantized_en +#define MULTINET_COEFF get_coeff_multinet1_en +#elif CONFIG_SR_MN_EN_MULTINET3_SINGLE_RECOGNITION +#include "multinet3_en.h" +#define MULTINET_MODEL esp_sr_multinet3_single_quantized_en +#define MULTINET_COEFF get_coeff_multinet3_en +#elif CONFIG_SR_MN_CN_MULTINET2_SINGLE_RECOGNITION +#include "multinet2_ch.h" +#define MULTINET_MODEL esp_sr_multinet2_single_quantized_cn +#define MULTINET_COEFF get_coeff_multinet2_ch +#elif CONFIG_SR_MN_CN_MULTINET2_CONTINUOUS_RECOGNITION + +#elif CONFIG_SR_MN_CN_MULTINET3_SINGLE_RECOGNITION +#define MULTINET_MODEL esp_sr_multinet3_single_quantized_cn +#define MULTINET_COEFF "mn3cn" +#elif CONFIG_SR_MN_CN_MULTINET4_SINGLE_RECOGNITION +#define MULTINET_MODEL esp_sr_multinet4_single_quantized_cn +#define MULTINET_COEFF "mn4cn" +#elif CONFIG_SR_MN_CN_MULTINET3_CONTINUOUS_RECOGNITION +#define MULTINET_MODEL esp_sr_multinet3_continuous_quantized_cn +#define MULTINET_COEFF "mn3cn" +#elif CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION +#define MULTINET_MODEL esp_sr_multinet5_quantized +#define MULTINET_COEFF "mn5en" +#elif CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION_QUANT8 +#define MULTINET_MODEL esp_sr_multinet5_quantized8 +#define MULTINET_COEFF "mn5q8en" +#else +#error No valid wake word selected. +#endif +#else +#define MULTINET_MODEL "NULL" +#define MULTINET_COEFF "NULL" +#endif +/* example + +static const esp_mn_iface_t *multinet = &MULTINET_MODEL; + +//Initialize MultiNet model data +model_iface_data_t *model_data = multinet->create(&MULTINET_COEFF); +add_speech_commands(multinet, model_data); + +//Set parameters of buffer +int audio_chunksize=model->get_samp_chunksize(model_data); +int frequency = model->get_samp_rate(model_data); +int16_t *buffer=malloc(audio_chunksize*sizeof(int16_t)); + +//Detect +int r=model->detect(model_data, buffer); +if (r>0) { + printf("Detection triggered output %d.\n", r); +} + +//Destroy model +model->destroy(model_data) + +*/ diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_ns.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_ns.h new file mode 100644 index 00000000000..1932600b72f --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_ns.h @@ -0,0 +1,85 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License +#ifndef _ESP_NS_H_ +#define _ESP_NS_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define NS_USE_SPIARM 0 +#define NS_FRAME_LENGTH_MS 10 //Supports 10ms, 20ms, 30ms + +/** +* The Sampling frequency (Hz) must be 16000Hz +*/ + +typedef void* ns_handle_t; + +/** + * @brief Creates an instance to the NS structure. + * + * @param frame_length The length of the audio processing can be 10ms, 20ms, 30ms. + * + * @return + * - NULL: Create failed + * - Others: The instance of NS + */ +ns_handle_t ns_create(int frame_length); + +/** + * @brief Creates an instance of the more powerful noise suppression algorithm. + * + * @warning frame_length only supports be 10 ms. + * + * @param frame_length The length of the audio processing can only be 10ms. + * @param mode 0: Mild, 1: Medium, 2: Aggressive + * + * @return + * - NULL: Create failed + * - Others: The instance of NS + */ +ns_handle_t ns_pro_create(int frame_length, int mode); + +/** + * @brief Feed samples of an audio stream to the NS and get the audio stream after Noise suppression. + * + * @param inst The instance of NS. + * + * @param indata An array of 16-bit signed audio samples. + * + * @param outdata An array of 16-bit signed audio samples after noise suppression. + * + * @return None + * + */ +void ns_process(ns_handle_t inst, int16_t *indata, int16_t *outdata); + +/** + * @brief Free the NS instance + * + * @param inst The instance of NS. + * + * @return None + * + */ +void ns_destroy(ns_handle_t inst); + +#ifdef __cplusplus +} +#endif + +#endif //_ESP_NS_H_ diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_vad.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_vad.h new file mode 100644 index 00000000000..e1a76cf4072 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_vad.h @@ -0,0 +1,104 @@ +// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License +#ifndef _ESP_VAD_H_ +#define _ESP_VAD_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define SAMPLE_RATE_HZ 16000 //Supports 32000, 16000, 8000 +#define VAD_FRAME_LENGTH_MS 30 //Supports 10ms, 20ms, 30ms + +/** + * @brief Sets the VAD operating mode. A more aggressive (higher mode) VAD is more + * restrictive in reporting speech. + */ +typedef enum { + VAD_MODE_0 = 0, + VAD_MODE_1, + VAD_MODE_2, + VAD_MODE_3, + VAD_MODE_4 +} vad_mode_t; + +typedef enum { + VAD_SILENCE = 0, + VAD_SPEECH +} vad_state_t; + +typedef void* vad_handle_t; + +/** + * @brief Creates an instance to the VAD structure. + * + * @param vad_mode Sets the VAD operating mode. + * + * @param sample_rate_hz The Sampling frequency (Hz) can be 32000, 16000, 8000, default: 16000. + * + * @param one_frame_ms The length of the audio processing can be 10ms, 20ms, 30ms, default: 30. + * + * @return + * - NULL: Create failed + * - Others: The instance of VAD + */ +vad_handle_t vad_create(vad_mode_t vad_mode, int sample_rate_hz, int one_frame_ms); + +/** + * @brief Feed samples of an audio stream to the VAD and check if there is someone speaking. + * + * @param inst The instance of VAD. + * + * @param data An array of 16-bit signed audio samples. + * + * @return + * - VAD_SILENCE if no voice + * - VAD_SPEECH if voice is detected + * + */ +vad_state_t vad_process(vad_handle_t inst, int16_t *data); + +/** + * @brief Free the VAD instance + * + * @param inst The instance of VAD. + * + * @return None + * + */ +void vad_destroy(vad_handle_t inst); + +/* +* Programming Guide: +* +* @code{c} +* vad_handle_t vad_inst = vad_create(VAD_MODE_3, SAMPLE_RATE_HZ, VAD_FRAME_LENGTH_MS); // Creates an instance to the VAD structure. +* +* while (1) { +* //Use buffer to receive the audio data from MIC. +* vad_state_t vad_state = vad_process(vad_inst, buffer); // Feed samples to the VAD process and get the result. +* } +* +* vad_destroy(vad_inst); // Free the VAD instance at the end of whole VAD process +* +* @endcode +*/ + +#ifdef __cplusplus +} +#endif + +#endif //_ESP_VAD_H_ diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_wn_iface.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_wn_iface.h new file mode 100644 index 00000000000..6843af19d5d --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_wn_iface.h @@ -0,0 +1,164 @@ +#pragma once +#include "stdint.h" +#include "dl_lib_coefgetter_if.h" + +//Opaque model data container +typedef struct model_iface_data_t model_iface_data_t; + +//Set wake words recognition operating mode +//The probability of being wake words is increased with increasing mode, +//As a consequence also the false alarm rate goes up +typedef enum { + DET_MODE_90 = 0, // Normal + DET_MODE_95 = 1, // Aggressive + DET_MODE_2CH_90 = 2, + DET_MODE_2CH_95 = 3, + DET_MODE_3CH_90 = 4, + DET_MODE_3CH_95 = 5, +} det_mode_t; + +typedef struct { + int wake_word_num; //The number of all wake words + char **wake_word_list; //The name list of wake words +} wake_word_info_t; + +/** + * @brief Easy function type to initialze a model instance with a detection mode and specified wake word coefficient + * + * @param det_mode The wake words detection mode to trigger wake words, DET_MODE_90 or DET_MODE_95 + * @param model_coeff The specified wake word model coefficient + * @returns Handle to the model data + */ +typedef model_iface_data_t* (*esp_wn_iface_op_create_t)(const model_coeff_getter_t *model_coeff, det_mode_t det_mode); + +/** + * @brief Callback function type to fetch the amount of samples that need to be passed to the detect function + * + * Every speech recognition model processes a certain number of samples at the same time. This function + * can be used to query that amount. Note that the returned amount is in 16-bit samples, not in bytes. + * + * @param model The model object to query + * @return The amount of samples to feed the detect function + */ +typedef int (*esp_wn_iface_op_get_samp_chunksize_t)(model_iface_data_t *model); + +/** + * @brief Callback function type to fetch the channel number of samples that need to be passed to the detect function + * + * Every speech recognition model processes a certain number of samples at the same time. This function + * can be used to query that amount. Note that the returned amount is in 16-bit samples, not in bytes. + * + * @param model The model object to query + * @return The amount of samples to feed the detect function + */ +typedef int (*esp_wn_iface_op_get_channel_num_t)(model_iface_data_t *model); + + +/** + * @brief Get the sample rate of the samples to feed to the detect function + * + * @param model The model object to query + * @return The sample rate, in hz + */ +typedef int (*esp_wn_iface_op_get_samp_rate_t)(model_iface_data_t *model); + +/** + * @brief Get the number of wake words + * + * @param model The model object to query + * @returns the number of wake words + */ +typedef int (*esp_wn_iface_op_get_word_num_t)(model_iface_data_t *model); + +/** + * @brief Get the name of wake word by index + * + * @Warning The index of wake word start with 1 + + * @param model The model object to query + * @param word_index The index of wake word + * @returns the detection threshold + */ +typedef char* (*esp_wn_iface_op_get_word_name_t)(model_iface_data_t *model, int word_index); + +/** + * @brief Set the detection threshold to manually abjust the probability + * + * @param model The model object to query + * @param det_treshold The threshold to trigger wake words, the range of det_threshold is 0.5~0.9999 + * @param word_index The index of wake word + * @return 0: setting failed, 1: setting success + */ +typedef int (*esp_wn_iface_op_set_det_threshold_t)(model_iface_data_t *model, float det_threshold, int word_index); + +/** + * @brief Get the wake word detection threshold of different modes + * + * @param model The model object to query + * @param word_index The index of wake word + * @returns the detection threshold + */ +typedef float (*esp_wn_iface_op_get_det_threshold_t)(model_iface_data_t *model, int word_index); + +/** + * @brief Feed samples of an audio stream to the keyword detection model and detect if there is a keyword found. + * + * @Warning The index of wake word start with 1, 0 means no wake words is detected. + * + * @param model The model object to query + * @param samples An array of 16-bit signed audio samples. The array size used can be queried by the + * get_samp_chunksize function. + * @return The index of wake words, return 0 if no wake word is detected, else the index of the wake words. + */ +typedef int (*esp_wn_iface_op_detect_t)(model_iface_data_t *model, int16_t *samples); + +/** + * @brief Get the volume gain + * + * @param model The model object to query + * @param target_db The target dB to calculate volume gain + * @returns the volume gain + */ +typedef float (*esp_wn_iface_op_get_vol_gain_t)(model_iface_data_t *model, float target_db); + +/** + * @brief Get the triggered channel index. Channel index starts from zero + * + * @param model The model object to query + * @return The channel index + */ +typedef int (*esp_wn_iface_op_get_triggered_channel_t)(model_iface_data_t *model); + +/** + * @brief Clean all states of model + * + * @param model The model object to query + */ +typedef void (*esp_wn_iface_op_clean_t)(model_iface_data_t *model); + +/** + * @brief Destroy a speech recognition model + * + * @param model Model object to destroy + */ +typedef void (*esp_wn_iface_op_destroy_t)(model_iface_data_t *model); + + +/** + * This structure contains the functions used to do operations on a wake word detection model. + */ +typedef struct { + esp_wn_iface_op_create_t create; + esp_wn_iface_op_get_samp_chunksize_t get_samp_chunksize; + esp_wn_iface_op_get_channel_num_t get_channel_num; + esp_wn_iface_op_get_samp_rate_t get_samp_rate; + esp_wn_iface_op_get_word_num_t get_word_num; + esp_wn_iface_op_get_word_name_t get_word_name; + esp_wn_iface_op_set_det_threshold_t set_det_threshold; + esp_wn_iface_op_get_det_threshold_t get_det_threshold; + esp_wn_iface_op_get_triggered_channel_t get_triggered_channel; + esp_wn_iface_op_get_vol_gain_t get_vol_gain; + esp_wn_iface_op_detect_t detect; + esp_wn_iface_op_clean_t clean; + esp_wn_iface_op_destroy_t destroy; +} esp_wn_iface_t; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/esp_wn_models.h b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_wn_models.h new file mode 100644 index 00000000000..225456fc728 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/esp_wn_models.h @@ -0,0 +1,127 @@ +#pragma once +#include "esp_wn_iface.h" + +//Contains declarations of all available speech recognion models. Pair this up with the right coefficients and you have a model that can recognize +//a specific phrase or word. + +extern const esp_wn_iface_t esp_sr_wakenet5_quantized; +extern const esp_wn_iface_t esp_sr_wakenet7_quantized; +extern const esp_wn_iface_t esp_sr_wakenet7_quantized8; +extern const esp_wn_iface_t esp_sr_wakenet8_quantized; +extern const esp_wn_iface_t esp_sr_wakenet8_quantized8; +/* + Configure network to use based on what's selected in menuconfig. +*/ +#if defined CONFIG_USE_WAKENET +#if CONFIG_SR_WN_MODEL_WN5_QUANT +#define WAKENET_MODEL esp_sr_wakenet5_quantized +#elif CONFIG_SR_WN_MODEL_WN7_QUANT +#define WAKENET_MODEL esp_sr_wakenet7_quantized +#elif CONFIG_SR_WN_MODEL_WN7_QUANT8 +#define WAKENET_MODEL esp_sr_wakenet7_quantized8 +#elif CONFIG_SR_WN_MODEL_WN8_QUANT +#define WAKENET_MODEL esp_sr_wakenet8_quantized +#elif CONFIG_SR_WN_MODEL_WN8_QUANT8 +#define WAKENET_MODEL esp_sr_wakenet8_quantized8 +#else +#error No valid neural network model selected. +#endif + +/* + Configure wake word to use based on what's selected in menuconfig. +*/ +#if CONFIG_SR_WN_WN5_HILEXIN & CONFIG_SR_WN_MODEL_WN5_QUANT +#include "hilexin_wn5.h" +#define WAKENET_COEFF get_coeff_hilexin_wn5 + +#elif CONFIG_SR_WN_WN5X2_HILEXIN & CONFIG_SR_WN_MODEL_WN5_QUANT +#include "hilexin_wn5X2.h" +#define WAKENET_COEFF get_coeff_hilexin_wn5X2 + +#elif CONFIG_SR_WN_WN5X3_HILEXIN & CONFIG_SR_WN_MODEL_WN5_QUANT +#include "hilexin_wn5X3.h" +#define WAKENET_COEFF get_coeff_hilexin_wn5X3 + +#elif CONFIG_SR_WN_WN5_NIHAOXIAOZHI & CONFIG_SR_WN_MODEL_WN5_QUANT +#include "nihaoxiaozhi_wn5.h" +#define WAKENET_COEFF get_coeff_nihaoxiaozhi_wn5 + +#elif CONFIG_SR_WN_WN5X2_NIHAOXIAOZHI & CONFIG_SR_WN_MODEL_WN5_QUANT +#include "nihaoxiaozhi_wn5X2.h" +#define WAKENET_COEFF get_coeff_nihaoxiaozhi_wn5X2 + +#elif CONFIG_SR_WN_WN5X3_NIHAOXIAOZHI & CONFIG_SR_WN_MODEL_WN5_QUANT +#include "nihaoxiaozhi_wn5X3.h" +#define WAKENET_COEFF get_coeff_nihaoxiaozhi_wn5X3 + +#elif CONFIG_SR_WN_WN5X3_NIHAOXIAOXIN & CONFIG_SR_WN_MODEL_WN5_QUANT +#include "nihaoxiaoxin_wn5X3.h" +#define WAKENET_COEFF get_coeff_nihaoxiaoxin_wn5X3 + +#elif CONFIG_SR_WN_WN5X3_HIJESON & CONFIG_SR_WN_MODEL_WN5_QUANT +#include "hijeson_wn5X3.h" +#define WAKENET_COEFF get_coeff_hijeson_wn5X3 + +#elif CONFIG_SR_WN_WN5_CUSTOMIZED_WORD +#include "customized_word_wn5.h" +#define WAKENET_COEFF get_coeff_customized_word_wn5 + +#elif CONFIG_SR_WN_WN7_CUSTOMIZED_WORD +#define WAKENET_COEFF "custom7" + +#elif CONFIG_SR_WN_WN7_XIAOAITONGXUE & CONFIG_SR_WN_MODEL_WN7_QUANT +#define WAKENET_COEFF "xiaoaitongxue7" + +#elif CONFIG_SR_WN_WN7_XIAOAITONGXUE & CONFIG_SR_WN_MODEL_WN7_QUANT8 +#define WAKENET_COEFF "xiaoaitongxue7q8" + +#elif CONFIG_SR_WN_WN7_HILEXIN & CONFIG_SR_WN_MODEL_WN7_QUANT +#define WAKENET_COEFF "hilexin7" + +#elif CONFIG_SR_WN_WN7_HILEXIN & CONFIG_SR_WN_MODEL_WN7_QUANT8 +#define WAKENET_COEFF "hilexin7q8" + +#elif CONFIG_SR_WN_WN7_ALEXA & CONFIG_SR_WN_MODEL_WN7_QUANT +#define WAKENET_COEFF "alexa7" + +#elif CONFIG_SR_WN_WN8_ALEXA & CONFIG_SR_WN_MODEL_WN8_QUANT +#define WAKENET_COEFF "alexa8" + +#elif CONFIG_SR_WN_WN7_ALEXA & CONFIG_SR_WN_MODEL_WN7_QUANT8 +#define WAKENET_COEFF "alexa7q8" + +#elif CONFIG_SR_WN_WN8_HIESP & CONFIG_SR_WN_MODEL_WN8_QUANT +#define WAKENET_COEFF "hiesp8" + +#elif CONFIG_SR_WN_WN8_HIESP & CONFIG_SR_WN_MODEL_WN8_QUANT8 +#define WAKENET_COEFF "hiesp8q8" + +#else +#error No valid wake word selected. +#endif +#else +#define WAKENET_MODEL "NULL" +#define WAKENET_COEFF "NULL" +#endif +/* example + +static const sr_model_iface_t *model = &WAKENET_MODEL; + +//Initialize wakeNet model data +static model_iface_data_t *model_data=model->create(DET_MODE_90); + +//Set parameters of buffer +int audio_chunksize=model->get_samp_chunksize(model_data); +int frequency = model->get_samp_rate(model_data); +int16_t *buffer=malloc(audio_chunksize*sizeof(int16_t)); + +//Detect +int r=model->detect(model_data, buffer); +if (r>0) { + printf("Detection triggered output %d.\n", r); +} + +//Destroy model +model->destroy(model_data) + +*/ diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/hijeson_wn5X3.h b/tools/sdk/esp32/include/esp-sr/include/esp32/hijeson_wn5X3.h new file mode 100644 index 00000000000..c2e343880ed --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/hijeson_wn5X3.h @@ -0,0 +1,8 @@ +//Generated by mkmodel +#pragma once +#include +#include "dl_lib_coefgetter_if.h" +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" + +extern const model_coeff_getter_t get_coeff_hijeson_wn5X3; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/hilexin_wn5.h b/tools/sdk/esp32/include/esp-sr/include/esp32/hilexin_wn5.h new file mode 100644 index 00000000000..d922a6aaed4 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/hilexin_wn5.h @@ -0,0 +1,8 @@ +//Generated by mkmodel +#pragma once +#include +#include "dl_lib_coefgetter_if.h" +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" + +extern const model_coeff_getter_t get_coeff_hilexin_wn5; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/hilexin_wn5X2.h b/tools/sdk/esp32/include/esp-sr/include/esp32/hilexin_wn5X2.h new file mode 100644 index 00000000000..5ca6bbca5ba --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/hilexin_wn5X2.h @@ -0,0 +1,8 @@ +//Generated by mkmodel +#pragma once +#include +#include "dl_lib_coefgetter_if.h" +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" + +extern const model_coeff_getter_t get_coeff_hilexin_wn5X2; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/hilexin_wn5X3.h b/tools/sdk/esp32/include/esp-sr/include/esp32/hilexin_wn5X3.h new file mode 100644 index 00000000000..c78a64d2b77 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/hilexin_wn5X3.h @@ -0,0 +1,8 @@ +//Generated by mkmodel +#pragma once +#include +#include "dl_lib_coefgetter_if.h" +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" + +extern const model_coeff_getter_t get_coeff_hilexin_wn5X3; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/mn_process_commands.h b/tools/sdk/esp32/include/esp-sr/include/esp32/mn_process_commands.h new file mode 100644 index 00000000000..692137a3b78 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/mn_process_commands.h @@ -0,0 +1,408 @@ +#pragma once +#include "esp_mn_iface.h" +#define SPEECH_COMMANDS_NUM 99 +#if CONFIG_SR_MN_CHINESE +#define MN_SPEECH_COMMAND_ID0 CONFIG_CN_SPEECH_COMMAND_ID0 +#define MN_SPEECH_COMMAND_ID1 CONFIG_CN_SPEECH_COMMAND_ID1 +#define MN_SPEECH_COMMAND_ID2 CONFIG_CN_SPEECH_COMMAND_ID2 +#define MN_SPEECH_COMMAND_ID3 CONFIG_CN_SPEECH_COMMAND_ID3 +#define MN_SPEECH_COMMAND_ID4 CONFIG_CN_SPEECH_COMMAND_ID4 +#define MN_SPEECH_COMMAND_ID5 CONFIG_CN_SPEECH_COMMAND_ID5 +#define MN_SPEECH_COMMAND_ID6 CONFIG_CN_SPEECH_COMMAND_ID6 +#define MN_SPEECH_COMMAND_ID7 CONFIG_CN_SPEECH_COMMAND_ID7 +#define MN_SPEECH_COMMAND_ID8 CONFIG_CN_SPEECH_COMMAND_ID8 +#define MN_SPEECH_COMMAND_ID9 CONFIG_CN_SPEECH_COMMAND_ID9 +#define MN_SPEECH_COMMAND_ID10 CONFIG_CN_SPEECH_COMMAND_ID10 +#define MN_SPEECH_COMMAND_ID11 CONFIG_CN_SPEECH_COMMAND_ID11 +#define MN_SPEECH_COMMAND_ID12 CONFIG_CN_SPEECH_COMMAND_ID12 +#define MN_SPEECH_COMMAND_ID13 CONFIG_CN_SPEECH_COMMAND_ID13 +#define MN_SPEECH_COMMAND_ID14 CONFIG_CN_SPEECH_COMMAND_ID14 +#define MN_SPEECH_COMMAND_ID15 CONFIG_CN_SPEECH_COMMAND_ID15 +#define MN_SPEECH_COMMAND_ID16 CONFIG_CN_SPEECH_COMMAND_ID16 +#define MN_SPEECH_COMMAND_ID17 CONFIG_CN_SPEECH_COMMAND_ID17 +#define MN_SPEECH_COMMAND_ID18 CONFIG_CN_SPEECH_COMMAND_ID18 +#define MN_SPEECH_COMMAND_ID19 CONFIG_CN_SPEECH_COMMAND_ID19 +#define MN_SPEECH_COMMAND_ID20 CONFIG_CN_SPEECH_COMMAND_ID20 +#define MN_SPEECH_COMMAND_ID21 CONFIG_CN_SPEECH_COMMAND_ID21 +#define MN_SPEECH_COMMAND_ID22 CONFIG_CN_SPEECH_COMMAND_ID22 +#define MN_SPEECH_COMMAND_ID23 CONFIG_CN_SPEECH_COMMAND_ID23 +#define MN_SPEECH_COMMAND_ID24 CONFIG_CN_SPEECH_COMMAND_ID24 +#define MN_SPEECH_COMMAND_ID25 CONFIG_CN_SPEECH_COMMAND_ID25 +#define MN_SPEECH_COMMAND_ID26 CONFIG_CN_SPEECH_COMMAND_ID26 +#define MN_SPEECH_COMMAND_ID27 CONFIG_CN_SPEECH_COMMAND_ID27 +#define MN_SPEECH_COMMAND_ID28 CONFIG_CN_SPEECH_COMMAND_ID28 +#define MN_SPEECH_COMMAND_ID29 CONFIG_CN_SPEECH_COMMAND_ID29 +#define MN_SPEECH_COMMAND_ID30 CONFIG_CN_SPEECH_COMMAND_ID30 +#define MN_SPEECH_COMMAND_ID31 CONFIG_CN_SPEECH_COMMAND_ID31 +#define MN_SPEECH_COMMAND_ID32 CONFIG_CN_SPEECH_COMMAND_ID32 +#define MN_SPEECH_COMMAND_ID33 CONFIG_CN_SPEECH_COMMAND_ID33 +#define MN_SPEECH_COMMAND_ID34 CONFIG_CN_SPEECH_COMMAND_ID34 +#define MN_SPEECH_COMMAND_ID35 CONFIG_CN_SPEECH_COMMAND_ID35 +#define MN_SPEECH_COMMAND_ID36 CONFIG_CN_SPEECH_COMMAND_ID36 +#define MN_SPEECH_COMMAND_ID37 CONFIG_CN_SPEECH_COMMAND_ID37 +#define MN_SPEECH_COMMAND_ID38 CONFIG_CN_SPEECH_COMMAND_ID38 +#define MN_SPEECH_COMMAND_ID39 CONFIG_CN_SPEECH_COMMAND_ID39 +#define MN_SPEECH_COMMAND_ID40 CONFIG_CN_SPEECH_COMMAND_ID40 +#define MN_SPEECH_COMMAND_ID41 CONFIG_CN_SPEECH_COMMAND_ID41 +#define MN_SPEECH_COMMAND_ID42 CONFIG_CN_SPEECH_COMMAND_ID42 +#define MN_SPEECH_COMMAND_ID43 CONFIG_CN_SPEECH_COMMAND_ID43 +#define MN_SPEECH_COMMAND_ID44 CONFIG_CN_SPEECH_COMMAND_ID44 +#define MN_SPEECH_COMMAND_ID45 CONFIG_CN_SPEECH_COMMAND_ID45 +#define MN_SPEECH_COMMAND_ID46 CONFIG_CN_SPEECH_COMMAND_ID46 +#define MN_SPEECH_COMMAND_ID47 CONFIG_CN_SPEECH_COMMAND_ID47 +#define MN_SPEECH_COMMAND_ID48 CONFIG_CN_SPEECH_COMMAND_ID48 +#define MN_SPEECH_COMMAND_ID49 CONFIG_CN_SPEECH_COMMAND_ID49 +#define MN_SPEECH_COMMAND_ID50 CONFIG_CN_SPEECH_COMMAND_ID50 +#define MN_SPEECH_COMMAND_ID51 CONFIG_CN_SPEECH_COMMAND_ID51 +#define MN_SPEECH_COMMAND_ID52 CONFIG_CN_SPEECH_COMMAND_ID52 +#define MN_SPEECH_COMMAND_ID53 CONFIG_CN_SPEECH_COMMAND_ID53 +#define MN_SPEECH_COMMAND_ID54 CONFIG_CN_SPEECH_COMMAND_ID54 +#define MN_SPEECH_COMMAND_ID55 CONFIG_CN_SPEECH_COMMAND_ID55 +#define MN_SPEECH_COMMAND_ID56 CONFIG_CN_SPEECH_COMMAND_ID56 +#define MN_SPEECH_COMMAND_ID57 CONFIG_CN_SPEECH_COMMAND_ID57 +#define MN_SPEECH_COMMAND_ID58 CONFIG_CN_SPEECH_COMMAND_ID58 +#define MN_SPEECH_COMMAND_ID59 CONFIG_CN_SPEECH_COMMAND_ID59 +#define MN_SPEECH_COMMAND_ID60 CONFIG_CN_SPEECH_COMMAND_ID60 +#define MN_SPEECH_COMMAND_ID61 CONFIG_CN_SPEECH_COMMAND_ID61 +#define MN_SPEECH_COMMAND_ID62 CONFIG_CN_SPEECH_COMMAND_ID62 +#define MN_SPEECH_COMMAND_ID63 CONFIG_CN_SPEECH_COMMAND_ID63 +#define MN_SPEECH_COMMAND_ID64 CONFIG_CN_SPEECH_COMMAND_ID64 +#define MN_SPEECH_COMMAND_ID65 CONFIG_CN_SPEECH_COMMAND_ID65 +#define MN_SPEECH_COMMAND_ID66 CONFIG_CN_SPEECH_COMMAND_ID66 +#define MN_SPEECH_COMMAND_ID67 CONFIG_CN_SPEECH_COMMAND_ID67 +#define MN_SPEECH_COMMAND_ID68 CONFIG_CN_SPEECH_COMMAND_ID68 +#define MN_SPEECH_COMMAND_ID69 CONFIG_CN_SPEECH_COMMAND_ID69 +#define MN_SPEECH_COMMAND_ID70 CONFIG_CN_SPEECH_COMMAND_ID70 +#define MN_SPEECH_COMMAND_ID71 CONFIG_CN_SPEECH_COMMAND_ID71 +#define MN_SPEECH_COMMAND_ID72 CONFIG_CN_SPEECH_COMMAND_ID72 +#define MN_SPEECH_COMMAND_ID73 CONFIG_CN_SPEECH_COMMAND_ID73 +#define MN_SPEECH_COMMAND_ID74 CONFIG_CN_SPEECH_COMMAND_ID74 +#define MN_SPEECH_COMMAND_ID75 CONFIG_CN_SPEECH_COMMAND_ID75 +#define MN_SPEECH_COMMAND_ID76 CONFIG_CN_SPEECH_COMMAND_ID76 +#define MN_SPEECH_COMMAND_ID77 CONFIG_CN_SPEECH_COMMAND_ID77 +#define MN_SPEECH_COMMAND_ID78 CONFIG_CN_SPEECH_COMMAND_ID78 +#define MN_SPEECH_COMMAND_ID79 CONFIG_CN_SPEECH_COMMAND_ID79 +#define MN_SPEECH_COMMAND_ID80 CONFIG_CN_SPEECH_COMMAND_ID80 +#define MN_SPEECH_COMMAND_ID81 CONFIG_CN_SPEECH_COMMAND_ID81 +#define MN_SPEECH_COMMAND_ID82 CONFIG_CN_SPEECH_COMMAND_ID82 +#define MN_SPEECH_COMMAND_ID83 CONFIG_CN_SPEECH_COMMAND_ID83 +#define MN_SPEECH_COMMAND_ID84 CONFIG_CN_SPEECH_COMMAND_ID84 +#define MN_SPEECH_COMMAND_ID85 CONFIG_CN_SPEECH_COMMAND_ID85 +#define MN_SPEECH_COMMAND_ID86 CONFIG_CN_SPEECH_COMMAND_ID86 +#define MN_SPEECH_COMMAND_ID87 CONFIG_CN_SPEECH_COMMAND_ID87 +#define MN_SPEECH_COMMAND_ID88 CONFIG_CN_SPEECH_COMMAND_ID88 +#define MN_SPEECH_COMMAND_ID89 CONFIG_CN_SPEECH_COMMAND_ID89 +#define MN_SPEECH_COMMAND_ID90 CONFIG_CN_SPEECH_COMMAND_ID90 +#define MN_SPEECH_COMMAND_ID91 CONFIG_CN_SPEECH_COMMAND_ID91 +#define MN_SPEECH_COMMAND_ID92 CONFIG_CN_SPEECH_COMMAND_ID92 +#define MN_SPEECH_COMMAND_ID93 CONFIG_CN_SPEECH_COMMAND_ID93 +#define MN_SPEECH_COMMAND_ID94 CONFIG_CN_SPEECH_COMMAND_ID94 +#define MN_SPEECH_COMMAND_ID95 CONFIG_CN_SPEECH_COMMAND_ID95 +#define MN_SPEECH_COMMAND_ID96 CONFIG_CN_SPEECH_COMMAND_ID96 +#define MN_SPEECH_COMMAND_ID97 CONFIG_CN_SPEECH_COMMAND_ID97 +#define MN_SPEECH_COMMAND_ID98 CONFIG_CN_SPEECH_COMMAND_ID98 +#define MN_SPEECH_COMMAND_ID99 CONFIG_CN_SPEECH_COMMAND_ID99 +#define MN_SPEECH_COMMAND_ID100 CONFIG_CN_SPEECH_COMMAND_ID100 +#define MN_SPEECH_COMMAND_ID101 CONFIG_CN_SPEECH_COMMAND_ID101 +#define MN_SPEECH_COMMAND_ID102 CONFIG_CN_SPEECH_COMMAND_ID102 +#define MN_SPEECH_COMMAND_ID103 CONFIG_CN_SPEECH_COMMAND_ID103 +#define MN_SPEECH_COMMAND_ID104 CONFIG_CN_SPEECH_COMMAND_ID104 +#define MN_SPEECH_COMMAND_ID105 CONFIG_CN_SPEECH_COMMAND_ID105 +#define MN_SPEECH_COMMAND_ID106 CONFIG_CN_SPEECH_COMMAND_ID106 +#define MN_SPEECH_COMMAND_ID107 CONFIG_CN_SPEECH_COMMAND_ID107 +#define MN_SPEECH_COMMAND_ID108 CONFIG_CN_SPEECH_COMMAND_ID108 +#define MN_SPEECH_COMMAND_ID109 CONFIG_CN_SPEECH_COMMAND_ID109 +#define MN_SPEECH_COMMAND_ID110 CONFIG_CN_SPEECH_COMMAND_ID110 +#define MN_SPEECH_COMMAND_ID111 CONFIG_CN_SPEECH_COMMAND_ID111 +#define MN_SPEECH_COMMAND_ID112 CONFIG_CN_SPEECH_COMMAND_ID112 +#define MN_SPEECH_COMMAND_ID113 CONFIG_CN_SPEECH_COMMAND_ID113 +#define MN_SPEECH_COMMAND_ID114 CONFIG_CN_SPEECH_COMMAND_ID114 +#define MN_SPEECH_COMMAND_ID115 CONFIG_CN_SPEECH_COMMAND_ID115 +#define MN_SPEECH_COMMAND_ID116 CONFIG_CN_SPEECH_COMMAND_ID116 +#define MN_SPEECH_COMMAND_ID117 CONFIG_CN_SPEECH_COMMAND_ID117 +#define MN_SPEECH_COMMAND_ID118 CONFIG_CN_SPEECH_COMMAND_ID118 +#define MN_SPEECH_COMMAND_ID119 CONFIG_CN_SPEECH_COMMAND_ID119 +#define MN_SPEECH_COMMAND_ID120 CONFIG_CN_SPEECH_COMMAND_ID120 +#define MN_SPEECH_COMMAND_ID121 CONFIG_CN_SPEECH_COMMAND_ID121 +#define MN_SPEECH_COMMAND_ID122 CONFIG_CN_SPEECH_COMMAND_ID122 +#define MN_SPEECH_COMMAND_ID123 CONFIG_CN_SPEECH_COMMAND_ID123 +#define MN_SPEECH_COMMAND_ID124 CONFIG_CN_SPEECH_COMMAND_ID124 +#define MN_SPEECH_COMMAND_ID125 CONFIG_CN_SPEECH_COMMAND_ID125 +#define MN_SPEECH_COMMAND_ID126 CONFIG_CN_SPEECH_COMMAND_ID126 +#define MN_SPEECH_COMMAND_ID127 CONFIG_CN_SPEECH_COMMAND_ID127 +#define MN_SPEECH_COMMAND_ID128 CONFIG_CN_SPEECH_COMMAND_ID128 +#define MN_SPEECH_COMMAND_ID129 CONFIG_CN_SPEECH_COMMAND_ID129 +#define MN_SPEECH_COMMAND_ID130 CONFIG_CN_SPEECH_COMMAND_ID130 +#define MN_SPEECH_COMMAND_ID131 CONFIG_CN_SPEECH_COMMAND_ID131 +#define MN_SPEECH_COMMAND_ID132 CONFIG_CN_SPEECH_COMMAND_ID132 +#define MN_SPEECH_COMMAND_ID133 CONFIG_CN_SPEECH_COMMAND_ID133 +#define MN_SPEECH_COMMAND_ID134 CONFIG_CN_SPEECH_COMMAND_ID134 +#define MN_SPEECH_COMMAND_ID135 CONFIG_CN_SPEECH_COMMAND_ID135 +#define MN_SPEECH_COMMAND_ID136 CONFIG_CN_SPEECH_COMMAND_ID136 +#define MN_SPEECH_COMMAND_ID137 CONFIG_CN_SPEECH_COMMAND_ID137 +#define MN_SPEECH_COMMAND_ID138 CONFIG_CN_SPEECH_COMMAND_ID138 +#define MN_SPEECH_COMMAND_ID139 CONFIG_CN_SPEECH_COMMAND_ID139 +#define MN_SPEECH_COMMAND_ID140 CONFIG_CN_SPEECH_COMMAND_ID140 +#define MN_SPEECH_COMMAND_ID141 CONFIG_CN_SPEECH_COMMAND_ID141 +#define MN_SPEECH_COMMAND_ID142 CONFIG_CN_SPEECH_COMMAND_ID142 +#define MN_SPEECH_COMMAND_ID143 CONFIG_CN_SPEECH_COMMAND_ID143 +#define MN_SPEECH_COMMAND_ID144 CONFIG_CN_SPEECH_COMMAND_ID144 +#define MN_SPEECH_COMMAND_ID145 CONFIG_CN_SPEECH_COMMAND_ID145 +#define MN_SPEECH_COMMAND_ID146 CONFIG_CN_SPEECH_COMMAND_ID146 +#define MN_SPEECH_COMMAND_ID147 CONFIG_CN_SPEECH_COMMAND_ID147 +#define MN_SPEECH_COMMAND_ID148 CONFIG_CN_SPEECH_COMMAND_ID148 +#define MN_SPEECH_COMMAND_ID149 CONFIG_CN_SPEECH_COMMAND_ID149 +#define MN_SPEECH_COMMAND_ID150 CONFIG_CN_SPEECH_COMMAND_ID150 +#define MN_SPEECH_COMMAND_ID151 CONFIG_CN_SPEECH_COMMAND_ID151 +#define MN_SPEECH_COMMAND_ID152 CONFIG_CN_SPEECH_COMMAND_ID152 +#define MN_SPEECH_COMMAND_ID153 CONFIG_CN_SPEECH_COMMAND_ID153 +#define MN_SPEECH_COMMAND_ID154 CONFIG_CN_SPEECH_COMMAND_ID154 +#define MN_SPEECH_COMMAND_ID155 CONFIG_CN_SPEECH_COMMAND_ID155 +#define MN_SPEECH_COMMAND_ID156 CONFIG_CN_SPEECH_COMMAND_ID156 +#define MN_SPEECH_COMMAND_ID157 CONFIG_CN_SPEECH_COMMAND_ID157 +#define MN_SPEECH_COMMAND_ID158 CONFIG_CN_SPEECH_COMMAND_ID158 +#define MN_SPEECH_COMMAND_ID159 CONFIG_CN_SPEECH_COMMAND_ID159 +#define MN_SPEECH_COMMAND_ID160 CONFIG_CN_SPEECH_COMMAND_ID160 +#define MN_SPEECH_COMMAND_ID161 CONFIG_CN_SPEECH_COMMAND_ID161 +#define MN_SPEECH_COMMAND_ID162 CONFIG_CN_SPEECH_COMMAND_ID162 +#define MN_SPEECH_COMMAND_ID163 CONFIG_CN_SPEECH_COMMAND_ID163 +#define MN_SPEECH_COMMAND_ID164 CONFIG_CN_SPEECH_COMMAND_ID164 +#define MN_SPEECH_COMMAND_ID165 CONFIG_CN_SPEECH_COMMAND_ID165 +#define MN_SPEECH_COMMAND_ID166 CONFIG_CN_SPEECH_COMMAND_ID166 +#define MN_SPEECH_COMMAND_ID167 CONFIG_CN_SPEECH_COMMAND_ID167 +#define MN_SPEECH_COMMAND_ID168 CONFIG_CN_SPEECH_COMMAND_ID168 +#define MN_SPEECH_COMMAND_ID169 CONFIG_CN_SPEECH_COMMAND_ID169 +#define MN_SPEECH_COMMAND_ID170 CONFIG_CN_SPEECH_COMMAND_ID170 +#define MN_SPEECH_COMMAND_ID171 CONFIG_CN_SPEECH_COMMAND_ID171 +#define MN_SPEECH_COMMAND_ID172 CONFIG_CN_SPEECH_COMMAND_ID172 +#define MN_SPEECH_COMMAND_ID173 CONFIG_CN_SPEECH_COMMAND_ID173 +#define MN_SPEECH_COMMAND_ID174 CONFIG_CN_SPEECH_COMMAND_ID174 +#define MN_SPEECH_COMMAND_ID175 CONFIG_CN_SPEECH_COMMAND_ID175 +#define MN_SPEECH_COMMAND_ID176 CONFIG_CN_SPEECH_COMMAND_ID176 +#define MN_SPEECH_COMMAND_ID177 CONFIG_CN_SPEECH_COMMAND_ID177 +#define MN_SPEECH_COMMAND_ID178 CONFIG_CN_SPEECH_COMMAND_ID178 +#define MN_SPEECH_COMMAND_ID179 CONFIG_CN_SPEECH_COMMAND_ID179 +#define MN_SPEECH_COMMAND_ID180 CONFIG_CN_SPEECH_COMMAND_ID180 +#define MN_SPEECH_COMMAND_ID181 CONFIG_CN_SPEECH_COMMAND_ID181 +#define MN_SPEECH_COMMAND_ID182 CONFIG_CN_SPEECH_COMMAND_ID182 +#define MN_SPEECH_COMMAND_ID183 CONFIG_CN_SPEECH_COMMAND_ID183 +#define MN_SPEECH_COMMAND_ID184 CONFIG_CN_SPEECH_COMMAND_ID184 +#define MN_SPEECH_COMMAND_ID185 CONFIG_CN_SPEECH_COMMAND_ID185 +#define MN_SPEECH_COMMAND_ID186 CONFIG_CN_SPEECH_COMMAND_ID186 +#define MN_SPEECH_COMMAND_ID187 CONFIG_CN_SPEECH_COMMAND_ID187 +#define MN_SPEECH_COMMAND_ID188 CONFIG_CN_SPEECH_COMMAND_ID188 +#define MN_SPEECH_COMMAND_ID189 CONFIG_CN_SPEECH_COMMAND_ID189 +#define MN_SPEECH_COMMAND_ID190 CONFIG_CN_SPEECH_COMMAND_ID190 +#define MN_SPEECH_COMMAND_ID191 CONFIG_CN_SPEECH_COMMAND_ID191 +#define MN_SPEECH_COMMAND_ID192 CONFIG_CN_SPEECH_COMMAND_ID192 +#define MN_SPEECH_COMMAND_ID193 CONFIG_CN_SPEECH_COMMAND_ID193 +#define MN_SPEECH_COMMAND_ID194 CONFIG_CN_SPEECH_COMMAND_ID194 +#define MN_SPEECH_COMMAND_ID195 CONFIG_CN_SPEECH_COMMAND_ID195 +#define MN_SPEECH_COMMAND_ID196 CONFIG_CN_SPEECH_COMMAND_ID196 +#define MN_SPEECH_COMMAND_ID197 CONFIG_CN_SPEECH_COMMAND_ID197 +#define MN_SPEECH_COMMAND_ID198 CONFIG_CN_SPEECH_COMMAND_ID198 +#define MN_SPEECH_COMMAND_ID199 CONFIG_CN_SPEECH_COMMAND_ID199 +#elif CONFIG_SR_MN_ENGLISH +#define MN_SPEECH_COMMAND_ID0 CONFIG_EN_SPEECH_COMMAND_ID0 +#define MN_SPEECH_COMMAND_ID1 CONFIG_EN_SPEECH_COMMAND_ID1 +#define MN_SPEECH_COMMAND_ID2 CONFIG_EN_SPEECH_COMMAND_ID2 +#define MN_SPEECH_COMMAND_ID3 CONFIG_EN_SPEECH_COMMAND_ID3 +#define MN_SPEECH_COMMAND_ID4 CONFIG_EN_SPEECH_COMMAND_ID4 +#define MN_SPEECH_COMMAND_ID5 CONFIG_EN_SPEECH_COMMAND_ID5 +#define MN_SPEECH_COMMAND_ID6 CONFIG_EN_SPEECH_COMMAND_ID6 +#define MN_SPEECH_COMMAND_ID7 CONFIG_EN_SPEECH_COMMAND_ID7 +#define MN_SPEECH_COMMAND_ID8 CONFIG_EN_SPEECH_COMMAND_ID8 +#define MN_SPEECH_COMMAND_ID9 CONFIG_EN_SPEECH_COMMAND_ID9 +#define MN_SPEECH_COMMAND_ID10 CONFIG_EN_SPEECH_COMMAND_ID10 +#define MN_SPEECH_COMMAND_ID11 CONFIG_EN_SPEECH_COMMAND_ID11 +#define MN_SPEECH_COMMAND_ID12 CONFIG_EN_SPEECH_COMMAND_ID12 +#define MN_SPEECH_COMMAND_ID13 CONFIG_EN_SPEECH_COMMAND_ID13 +#define MN_SPEECH_COMMAND_ID14 CONFIG_EN_SPEECH_COMMAND_ID14 +#define MN_SPEECH_COMMAND_ID15 CONFIG_EN_SPEECH_COMMAND_ID15 +#define MN_SPEECH_COMMAND_ID16 CONFIG_EN_SPEECH_COMMAND_ID16 +#define MN_SPEECH_COMMAND_ID17 CONFIG_EN_SPEECH_COMMAND_ID17 +#define MN_SPEECH_COMMAND_ID18 CONFIG_EN_SPEECH_COMMAND_ID18 +#define MN_SPEECH_COMMAND_ID19 CONFIG_EN_SPEECH_COMMAND_ID19 +#define MN_SPEECH_COMMAND_ID20 CONFIG_EN_SPEECH_COMMAND_ID20 +#define MN_SPEECH_COMMAND_ID21 CONFIG_EN_SPEECH_COMMAND_ID21 +#define MN_SPEECH_COMMAND_ID22 CONFIG_EN_SPEECH_COMMAND_ID22 +#define MN_SPEECH_COMMAND_ID23 CONFIG_EN_SPEECH_COMMAND_ID23 +#define MN_SPEECH_COMMAND_ID24 CONFIG_EN_SPEECH_COMMAND_ID24 +#define MN_SPEECH_COMMAND_ID25 CONFIG_EN_SPEECH_COMMAND_ID25 +#define MN_SPEECH_COMMAND_ID26 CONFIG_EN_SPEECH_COMMAND_ID26 +#define MN_SPEECH_COMMAND_ID27 CONFIG_EN_SPEECH_COMMAND_ID27 +#define MN_SPEECH_COMMAND_ID28 CONFIG_EN_SPEECH_COMMAND_ID28 +#define MN_SPEECH_COMMAND_ID29 CONFIG_EN_SPEECH_COMMAND_ID29 +#define MN_SPEECH_COMMAND_ID30 CONFIG_EN_SPEECH_COMMAND_ID30 +#define MN_SPEECH_COMMAND_ID31 CONFIG_EN_SPEECH_COMMAND_ID31 +#define MN_SPEECH_COMMAND_ID32 CONFIG_EN_SPEECH_COMMAND_ID32 +#define MN_SPEECH_COMMAND_ID33 CONFIG_EN_SPEECH_COMMAND_ID33 +#define MN_SPEECH_COMMAND_ID34 CONFIG_EN_SPEECH_COMMAND_ID34 +#define MN_SPEECH_COMMAND_ID35 CONFIG_EN_SPEECH_COMMAND_ID35 +#define MN_SPEECH_COMMAND_ID36 CONFIG_EN_SPEECH_COMMAND_ID36 +#define MN_SPEECH_COMMAND_ID37 CONFIG_EN_SPEECH_COMMAND_ID37 +#define MN_SPEECH_COMMAND_ID38 CONFIG_EN_SPEECH_COMMAND_ID38 +#define MN_SPEECH_COMMAND_ID39 CONFIG_EN_SPEECH_COMMAND_ID39 +#define MN_SPEECH_COMMAND_ID40 CONFIG_EN_SPEECH_COMMAND_ID40 +#define MN_SPEECH_COMMAND_ID41 CONFIG_EN_SPEECH_COMMAND_ID41 +#define MN_SPEECH_COMMAND_ID42 CONFIG_EN_SPEECH_COMMAND_ID42 +#define MN_SPEECH_COMMAND_ID43 CONFIG_EN_SPEECH_COMMAND_ID43 +#define MN_SPEECH_COMMAND_ID44 CONFIG_EN_SPEECH_COMMAND_ID44 +#define MN_SPEECH_COMMAND_ID45 CONFIG_EN_SPEECH_COMMAND_ID45 +#define MN_SPEECH_COMMAND_ID46 CONFIG_EN_SPEECH_COMMAND_ID46 +#define MN_SPEECH_COMMAND_ID47 CONFIG_EN_SPEECH_COMMAND_ID47 +#define MN_SPEECH_COMMAND_ID48 CONFIG_EN_SPEECH_COMMAND_ID48 +#define MN_SPEECH_COMMAND_ID49 CONFIG_EN_SPEECH_COMMAND_ID49 +#define MN_SPEECH_COMMAND_ID50 CONFIG_EN_SPEECH_COMMAND_ID50 +#define MN_SPEECH_COMMAND_ID51 CONFIG_EN_SPEECH_COMMAND_ID51 +#define MN_SPEECH_COMMAND_ID52 CONFIG_EN_SPEECH_COMMAND_ID52 +#define MN_SPEECH_COMMAND_ID53 CONFIG_EN_SPEECH_COMMAND_ID53 +#define MN_SPEECH_COMMAND_ID54 CONFIG_EN_SPEECH_COMMAND_ID54 +#define MN_SPEECH_COMMAND_ID55 CONFIG_EN_SPEECH_COMMAND_ID55 +#define MN_SPEECH_COMMAND_ID56 CONFIG_EN_SPEECH_COMMAND_ID56 +#define MN_SPEECH_COMMAND_ID57 CONFIG_EN_SPEECH_COMMAND_ID57 +#define MN_SPEECH_COMMAND_ID58 CONFIG_EN_SPEECH_COMMAND_ID58 +#define MN_SPEECH_COMMAND_ID59 CONFIG_EN_SPEECH_COMMAND_ID59 +#define MN_SPEECH_COMMAND_ID60 CONFIG_EN_SPEECH_COMMAND_ID60 +#define MN_SPEECH_COMMAND_ID61 CONFIG_EN_SPEECH_COMMAND_ID61 +#define MN_SPEECH_COMMAND_ID62 CONFIG_EN_SPEECH_COMMAND_ID62 +#define MN_SPEECH_COMMAND_ID63 CONFIG_EN_SPEECH_COMMAND_ID63 +#define MN_SPEECH_COMMAND_ID64 CONFIG_EN_SPEECH_COMMAND_ID64 +#define MN_SPEECH_COMMAND_ID65 CONFIG_EN_SPEECH_COMMAND_ID65 +#define MN_SPEECH_COMMAND_ID66 CONFIG_EN_SPEECH_COMMAND_ID66 +#define MN_SPEECH_COMMAND_ID67 CONFIG_EN_SPEECH_COMMAND_ID67 +#define MN_SPEECH_COMMAND_ID68 CONFIG_EN_SPEECH_COMMAND_ID68 +#define MN_SPEECH_COMMAND_ID69 CONFIG_EN_SPEECH_COMMAND_ID69 +#define MN_SPEECH_COMMAND_ID70 CONFIG_EN_SPEECH_COMMAND_ID70 +#define MN_SPEECH_COMMAND_ID71 CONFIG_EN_SPEECH_COMMAND_ID71 +#define MN_SPEECH_COMMAND_ID72 CONFIG_EN_SPEECH_COMMAND_ID72 +#define MN_SPEECH_COMMAND_ID73 CONFIG_EN_SPEECH_COMMAND_ID73 +#define MN_SPEECH_COMMAND_ID74 CONFIG_EN_SPEECH_COMMAND_ID74 +#define MN_SPEECH_COMMAND_ID75 CONFIG_EN_SPEECH_COMMAND_ID75 +#define MN_SPEECH_COMMAND_ID76 CONFIG_EN_SPEECH_COMMAND_ID76 +#define MN_SPEECH_COMMAND_ID77 CONFIG_EN_SPEECH_COMMAND_ID77 +#define MN_SPEECH_COMMAND_ID78 CONFIG_EN_SPEECH_COMMAND_ID78 +#define MN_SPEECH_COMMAND_ID79 CONFIG_EN_SPEECH_COMMAND_ID79 +#define MN_SPEECH_COMMAND_ID80 CONFIG_EN_SPEECH_COMMAND_ID80 +#define MN_SPEECH_COMMAND_ID81 CONFIG_EN_SPEECH_COMMAND_ID81 +#define MN_SPEECH_COMMAND_ID82 CONFIG_EN_SPEECH_COMMAND_ID82 +#define MN_SPEECH_COMMAND_ID83 CONFIG_EN_SPEECH_COMMAND_ID83 +#define MN_SPEECH_COMMAND_ID84 CONFIG_EN_SPEECH_COMMAND_ID84 +#define MN_SPEECH_COMMAND_ID85 CONFIG_EN_SPEECH_COMMAND_ID85 +#define MN_SPEECH_COMMAND_ID86 CONFIG_EN_SPEECH_COMMAND_ID86 +#define MN_SPEECH_COMMAND_ID87 CONFIG_EN_SPEECH_COMMAND_ID87 +#define MN_SPEECH_COMMAND_ID88 CONFIG_EN_SPEECH_COMMAND_ID88 +#define MN_SPEECH_COMMAND_ID89 CONFIG_EN_SPEECH_COMMAND_ID89 +#define MN_SPEECH_COMMAND_ID90 CONFIG_EN_SPEECH_COMMAND_ID90 +#define MN_SPEECH_COMMAND_ID91 CONFIG_EN_SPEECH_COMMAND_ID91 +#define MN_SPEECH_COMMAND_ID92 CONFIG_EN_SPEECH_COMMAND_ID92 +#define MN_SPEECH_COMMAND_ID93 CONFIG_EN_SPEECH_COMMAND_ID93 +#define MN_SPEECH_COMMAND_ID94 CONFIG_EN_SPEECH_COMMAND_ID94 +#define MN_SPEECH_COMMAND_ID95 CONFIG_EN_SPEECH_COMMAND_ID95 +#define MN_SPEECH_COMMAND_ID96 CONFIG_EN_SPEECH_COMMAND_ID96 +#define MN_SPEECH_COMMAND_ID97 CONFIG_EN_SPEECH_COMMAND_ID97 +#define MN_SPEECH_COMMAND_ID98 CONFIG_EN_SPEECH_COMMAND_ID98 +#define MN_SPEECH_COMMAND_ID99 CONFIG_EN_SPEECH_COMMAND_ID99 +#define MN_SPEECH_COMMAND_ID100 CONFIG_EN_SPEECH_COMMAND_ID100 +#define MN_SPEECH_COMMAND_ID101 CONFIG_EN_SPEECH_COMMAND_ID101 +#define MN_SPEECH_COMMAND_ID102 CONFIG_EN_SPEECH_COMMAND_ID102 +#define MN_SPEECH_COMMAND_ID103 CONFIG_EN_SPEECH_COMMAND_ID103 +#define MN_SPEECH_COMMAND_ID104 CONFIG_EN_SPEECH_COMMAND_ID104 +#define MN_SPEECH_COMMAND_ID105 CONFIG_EN_SPEECH_COMMAND_ID105 +#define MN_SPEECH_COMMAND_ID106 CONFIG_EN_SPEECH_COMMAND_ID106 +#define MN_SPEECH_COMMAND_ID107 CONFIG_EN_SPEECH_COMMAND_ID107 +#define MN_SPEECH_COMMAND_ID108 CONFIG_EN_SPEECH_COMMAND_ID108 +#define MN_SPEECH_COMMAND_ID109 CONFIG_EN_SPEECH_COMMAND_ID109 +#define MN_SPEECH_COMMAND_ID110 CONFIG_EN_SPEECH_COMMAND_ID110 +#define MN_SPEECH_COMMAND_ID111 CONFIG_EN_SPEECH_COMMAND_ID111 +#define MN_SPEECH_COMMAND_ID112 CONFIG_EN_SPEECH_COMMAND_ID112 +#define MN_SPEECH_COMMAND_ID113 CONFIG_EN_SPEECH_COMMAND_ID113 +#define MN_SPEECH_COMMAND_ID114 CONFIG_EN_SPEECH_COMMAND_ID114 +#define MN_SPEECH_COMMAND_ID115 CONFIG_EN_SPEECH_COMMAND_ID115 +#define MN_SPEECH_COMMAND_ID116 CONFIG_EN_SPEECH_COMMAND_ID116 +#define MN_SPEECH_COMMAND_ID117 CONFIG_EN_SPEECH_COMMAND_ID117 +#define MN_SPEECH_COMMAND_ID118 CONFIG_EN_SPEECH_COMMAND_ID118 +#define MN_SPEECH_COMMAND_ID119 CONFIG_EN_SPEECH_COMMAND_ID119 +#define MN_SPEECH_COMMAND_ID120 CONFIG_EN_SPEECH_COMMAND_ID120 +#define MN_SPEECH_COMMAND_ID121 CONFIG_EN_SPEECH_COMMAND_ID121 +#define MN_SPEECH_COMMAND_ID122 CONFIG_EN_SPEECH_COMMAND_ID122 +#define MN_SPEECH_COMMAND_ID123 CONFIG_EN_SPEECH_COMMAND_ID123 +#define MN_SPEECH_COMMAND_ID124 CONFIG_EN_SPEECH_COMMAND_ID124 +#define MN_SPEECH_COMMAND_ID125 CONFIG_EN_SPEECH_COMMAND_ID125 +#define MN_SPEECH_COMMAND_ID126 CONFIG_EN_SPEECH_COMMAND_ID126 +#define MN_SPEECH_COMMAND_ID127 CONFIG_EN_SPEECH_COMMAND_ID127 +#define MN_SPEECH_COMMAND_ID128 CONFIG_EN_SPEECH_COMMAND_ID128 +#define MN_SPEECH_COMMAND_ID129 CONFIG_EN_SPEECH_COMMAND_ID129 +#define MN_SPEECH_COMMAND_ID130 CONFIG_EN_SPEECH_COMMAND_ID130 +#define MN_SPEECH_COMMAND_ID131 CONFIG_EN_SPEECH_COMMAND_ID131 +#define MN_SPEECH_COMMAND_ID132 CONFIG_EN_SPEECH_COMMAND_ID132 +#define MN_SPEECH_COMMAND_ID133 CONFIG_EN_SPEECH_COMMAND_ID133 +#define MN_SPEECH_COMMAND_ID134 CONFIG_EN_SPEECH_COMMAND_ID134 +#define MN_SPEECH_COMMAND_ID135 CONFIG_EN_SPEECH_COMMAND_ID135 +#define MN_SPEECH_COMMAND_ID136 CONFIG_EN_SPEECH_COMMAND_ID136 +#define MN_SPEECH_COMMAND_ID137 CONFIG_EN_SPEECH_COMMAND_ID137 +#define MN_SPEECH_COMMAND_ID138 CONFIG_EN_SPEECH_COMMAND_ID138 +#define MN_SPEECH_COMMAND_ID139 CONFIG_EN_SPEECH_COMMAND_ID139 +#define MN_SPEECH_COMMAND_ID140 CONFIG_EN_SPEECH_COMMAND_ID140 +#define MN_SPEECH_COMMAND_ID141 CONFIG_EN_SPEECH_COMMAND_ID141 +#define MN_SPEECH_COMMAND_ID142 CONFIG_EN_SPEECH_COMMAND_ID142 +#define MN_SPEECH_COMMAND_ID143 CONFIG_EN_SPEECH_COMMAND_ID143 +#define MN_SPEECH_COMMAND_ID144 CONFIG_EN_SPEECH_COMMAND_ID144 +#define MN_SPEECH_COMMAND_ID145 CONFIG_EN_SPEECH_COMMAND_ID145 +#define MN_SPEECH_COMMAND_ID146 CONFIG_EN_SPEECH_COMMAND_ID146 +#define MN_SPEECH_COMMAND_ID147 CONFIG_EN_SPEECH_COMMAND_ID147 +#define MN_SPEECH_COMMAND_ID148 CONFIG_EN_SPEECH_COMMAND_ID148 +#define MN_SPEECH_COMMAND_ID149 CONFIG_EN_SPEECH_COMMAND_ID149 +#define MN_SPEECH_COMMAND_ID150 CONFIG_EN_SPEECH_COMMAND_ID150 +#define MN_SPEECH_COMMAND_ID151 CONFIG_EN_SPEECH_COMMAND_ID151 +#define MN_SPEECH_COMMAND_ID152 CONFIG_EN_SPEECH_COMMAND_ID152 +#define MN_SPEECH_COMMAND_ID153 CONFIG_EN_SPEECH_COMMAND_ID153 +#define MN_SPEECH_COMMAND_ID154 CONFIG_EN_SPEECH_COMMAND_ID154 +#define MN_SPEECH_COMMAND_ID155 CONFIG_EN_SPEECH_COMMAND_ID155 +#define MN_SPEECH_COMMAND_ID156 CONFIG_EN_SPEECH_COMMAND_ID156 +#define MN_SPEECH_COMMAND_ID157 CONFIG_EN_SPEECH_COMMAND_ID157 +#define MN_SPEECH_COMMAND_ID158 CONFIG_EN_SPEECH_COMMAND_ID158 +#define MN_SPEECH_COMMAND_ID159 CONFIG_EN_SPEECH_COMMAND_ID159 +#define MN_SPEECH_COMMAND_ID160 CONFIG_EN_SPEECH_COMMAND_ID160 +#define MN_SPEECH_COMMAND_ID161 CONFIG_EN_SPEECH_COMMAND_ID161 +#define MN_SPEECH_COMMAND_ID162 CONFIG_EN_SPEECH_COMMAND_ID162 +#define MN_SPEECH_COMMAND_ID163 CONFIG_EN_SPEECH_COMMAND_ID163 +#define MN_SPEECH_COMMAND_ID164 CONFIG_EN_SPEECH_COMMAND_ID164 +#define MN_SPEECH_COMMAND_ID165 CONFIG_EN_SPEECH_COMMAND_ID165 +#define MN_SPEECH_COMMAND_ID166 CONFIG_EN_SPEECH_COMMAND_ID166 +#define MN_SPEECH_COMMAND_ID167 CONFIG_EN_SPEECH_COMMAND_ID167 +#define MN_SPEECH_COMMAND_ID168 CONFIG_EN_SPEECH_COMMAND_ID168 +#define MN_SPEECH_COMMAND_ID169 CONFIG_EN_SPEECH_COMMAND_ID169 +#define MN_SPEECH_COMMAND_ID170 CONFIG_EN_SPEECH_COMMAND_ID170 +#define MN_SPEECH_COMMAND_ID171 CONFIG_EN_SPEECH_COMMAND_ID171 +#define MN_SPEECH_COMMAND_ID172 CONFIG_EN_SPEECH_COMMAND_ID172 +#define MN_SPEECH_COMMAND_ID173 CONFIG_EN_SPEECH_COMMAND_ID173 +#define MN_SPEECH_COMMAND_ID174 CONFIG_EN_SPEECH_COMMAND_ID174 +#define MN_SPEECH_COMMAND_ID175 CONFIG_EN_SPEECH_COMMAND_ID175 +#define MN_SPEECH_COMMAND_ID176 CONFIG_EN_SPEECH_COMMAND_ID176 +#define MN_SPEECH_COMMAND_ID177 CONFIG_EN_SPEECH_COMMAND_ID177 +#define MN_SPEECH_COMMAND_ID178 CONFIG_EN_SPEECH_COMMAND_ID178 +#define MN_SPEECH_COMMAND_ID179 CONFIG_EN_SPEECH_COMMAND_ID179 +#define MN_SPEECH_COMMAND_ID180 CONFIG_EN_SPEECH_COMMAND_ID180 +#define MN_SPEECH_COMMAND_ID181 CONFIG_EN_SPEECH_COMMAND_ID181 +#define MN_SPEECH_COMMAND_ID182 CONFIG_EN_SPEECH_COMMAND_ID182 +#define MN_SPEECH_COMMAND_ID183 CONFIG_EN_SPEECH_COMMAND_ID183 +#define MN_SPEECH_COMMAND_ID184 CONFIG_EN_SPEECH_COMMAND_ID184 +#define MN_SPEECH_COMMAND_ID185 CONFIG_EN_SPEECH_COMMAND_ID185 +#define MN_SPEECH_COMMAND_ID186 CONFIG_EN_SPEECH_COMMAND_ID186 +#define MN_SPEECH_COMMAND_ID187 CONFIG_EN_SPEECH_COMMAND_ID187 +#define MN_SPEECH_COMMAND_ID188 CONFIG_EN_SPEECH_COMMAND_ID188 +#define MN_SPEECH_COMMAND_ID189 CONFIG_EN_SPEECH_COMMAND_ID189 +#define MN_SPEECH_COMMAND_ID190 CONFIG_EN_SPEECH_COMMAND_ID190 +#define MN_SPEECH_COMMAND_ID191 CONFIG_EN_SPEECH_COMMAND_ID191 +#define MN_SPEECH_COMMAND_ID192 CONFIG_EN_SPEECH_COMMAND_ID192 +#define MN_SPEECH_COMMAND_ID193 CONFIG_EN_SPEECH_COMMAND_ID193 +#define MN_SPEECH_COMMAND_ID194 CONFIG_EN_SPEECH_COMMAND_ID194 +#define MN_SPEECH_COMMAND_ID195 CONFIG_EN_SPEECH_COMMAND_ID195 +#define MN_SPEECH_COMMAND_ID196 CONFIG_EN_SPEECH_COMMAND_ID196 +#define MN_SPEECH_COMMAND_ID197 CONFIG_EN_SPEECH_COMMAND_ID197 +#define MN_SPEECH_COMMAND_ID198 CONFIG_EN_SPEECH_COMMAND_ID198 +#define MN_SPEECH_COMMAND_ID199 CONFIG_EN_SPEECH_COMMAND_ID199 +#endif +char *get_id_name(int i); +void reset_speech_commands(model_iface_data_t *model_data, char* command_str, char *err_phrase_id); \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/model_path.h b/tools/sdk/esp32/include/esp-sr/include/esp32/model_path.h new file mode 100644 index 00000000000..b9cdc302ad8 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/model_path.h @@ -0,0 +1,3 @@ +#pragma once +char *get_model_base_path(void); +void srmodel_spiffs_init(void); \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/multinet2_ch.h b/tools/sdk/esp32/include/esp-sr/include/esp32/multinet2_ch.h new file mode 100644 index 00000000000..2cee215dca7 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/multinet2_ch.h @@ -0,0 +1,9 @@ +//Generated by mkmodel_py +#pragma once +#include +#include "dl_lib_coefgetter_if.h" +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" +#include "dl_lib_matrixq8.h" + +extern const model_coeff_getter_t get_coeff_multinet2_ch; \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaoxin_wn5X3.h b/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaoxin_wn5X3.h new file mode 100644 index 00000000000..b767bfc435d --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaoxin_wn5X3.h @@ -0,0 +1,8 @@ +//Generated by mkmodel +#pragma once +#include +#include "dl_lib_coefgetter_if.h" +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" + +extern const model_coeff_getter_t get_coeff_nihaoxiaoxin_wn5X3; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaoxin_wn6.h b/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaoxin_wn6.h new file mode 100644 index 00000000000..c365e6d97df --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaoxin_wn6.h @@ -0,0 +1,8 @@ +//Generated by mkmodel +#pragma once +#include +#include "dl_lib_coefgetter_if.h" +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" + +extern const model_coeff_getter_t get_coeff_nihaoxiaoxin_wn6; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaozhi_wn5.h b/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaozhi_wn5.h new file mode 100644 index 00000000000..04fa268d1f9 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaozhi_wn5.h @@ -0,0 +1,8 @@ +//Generated by mkmodel +#pragma once +#include +#include "dl_lib_coefgetter_if.h" +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" + +extern const model_coeff_getter_t get_coeff_nihaoxiaozhi_wn5; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X2.h b/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X2.h new file mode 100644 index 00000000000..6c5f2b39e8d --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X2.h @@ -0,0 +1,8 @@ +//Generated by mkmodel +#pragma once +#include +#include "dl_lib_coefgetter_if.h" +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" + +extern const model_coeff_getter_t get_coeff_nihaoxiaozhi_wn5X2; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X3.h b/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X3.h new file mode 100644 index 00000000000..190556e1bab --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X3.h @@ -0,0 +1,8 @@ +//Generated by mkmodel +#pragma once +#include +#include "dl_lib_coefgetter_if.h" +#include "dl_lib_matrix.h" +#include "dl_lib_matrixq.h" + +extern const model_coeff_getter_t get_coeff_nihaoxiaozhi_wn5X3; diff --git a/tools/sdk/esp32/include/esp-sr/include/esp32/sr_flash.h b/tools/sdk/esp32/include/esp-sr/include/esp32/sr_flash.h new file mode 100644 index 00000000000..6c97e51e574 --- /dev/null +++ b/tools/sdk/esp32/include/esp-sr/include/esp32/sr_flash.h @@ -0,0 +1,12 @@ +#pragma once + +#define SR_FLASH_TYPE 32 +#define SR_FLASH_SUBTYPE 32 +#define SR_FLASH_PARTITION_NAME "fr" +#define SR_FLASH_INFO_FLAG 12138 + +int8_t speech_command_flash_init(void); +int8_t enroll_speech_command_to_flash_with_id(char *phrase, int mn_command_id); +int get_use_flag_from_flash(); +int get_enroll_num_from_flash(); +char *read_speech_command_from_flash(int i); \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp_common/include/esp_attr.h b/tools/sdk/esp32/include/esp_common/include/esp_attr.h index 7b73af76634..106a686b5e4 100644 --- a/tools/sdk/esp32/include/esp_common/include/esp_attr.h +++ b/tools/sdk/esp32/include/esp_common/include/esp_attr.h @@ -1,17 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #ifndef __ESP_ATTR_H__ #define __ESP_ATTR_H__ @@ -33,17 +25,24 @@ extern "C" { // Forces data into DRAM instead of flash #define DRAM_ATTR _SECTION_ATTR_IMPL(".dram1", __COUNTER__) -#ifdef CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY +// IRAM can only be accessed as an 8-bit memory on ESP32, when CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY is set +#define IRAM_8BIT_ACCESSIBLE (CONFIG_IDF_TARGET_ESP32 && CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY) + +// Make sure that IRAM is accessible as an 8-bit memory on ESP32. +// If that's not the case, coredump cannot dump data from IRAM. +#if IRAM_8BIT_ACCESSIBLE // Forces data into IRAM instead of DRAM #define IRAM_DATA_ATTR __attribute__((section(".iram.data"))) // Forces data into IRAM instead of DRAM and map it to coredump -#define COREDUMP_IRAM_DATA_ATTR _SECTION_ATTR_IMPL(".iram.data.coredump", __COUNTER__) +#define COREDUMP_IRAM_DATA_ATTR _SECTION_ATTR_IMPL(".iram2.coredump", __COUNTER__) // Forces bss into IRAM instead of DRAM #define IRAM_BSS_ATTR __attribute__((section(".iram.bss"))) #else -#define COREDUMP_IRAM_DATA_ATTR + +// IRAM is not accessible as an 8-bit memory, put IRAM coredump variables in DRAM +#define COREDUMP_IRAM_DATA_ATTR COREDUMP_DRAM_ATTR #define IRAM_DATA_ATTR #define IRAM_BSS_ATTR @@ -103,7 +102,9 @@ extern "C" { #define RTC_NOINIT_ATTR _SECTION_ATTR_IMPL(".rtc_noinit", __COUNTER__) // Forces code into DRAM instead of flash and map it to coredump -#define COREDUMP_DRAM_ATTR _SECTION_ATTR_IMPL(".dram1.coredump", __COUNTER__) +// Use dram2 instead of dram1 to make sure this section will not be included +// by dram1 section in the linker script +#define COREDUMP_DRAM_ATTR _SECTION_ATTR_IMPL(".dram2.coredump", __COUNTER__) // Forces data into RTC memory and map it to coredump #define COREDUMP_RTC_DATA_ATTR _SECTION_ATTR_IMPL(".rtc.coredump", __COUNTER__) diff --git a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_core.h b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_core.h index 86625f0beb3..6ddb0fbe912 100644 --- a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_core.h +++ b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_core.h @@ -24,10 +24,13 @@ extern "C" #define ESP_RMAKER_CONFIG_VERSION "2020-03-20" -#define MAX_VERSION_STRING_LEN 16 +/* Maximum length of the alert message that can be passed to esp_rmaker_raise_alert() */ +#define ESP_RMAKER_MAX_ALERT_LEN 100 +/** @cond **/ /** ESP RainMaker Event Base */ ESP_EVENT_DECLARE_BASE(RMAKER_EVENT); +/** @endcond **/ /** ESP RainMaker Events */ typedef enum { @@ -39,14 +42,13 @@ typedef enum { RMAKER_EVENT_CLAIM_SUCCESSFUL, /** Self Claiming Failed */ RMAKER_EVENT_CLAIM_FAILED, - /** Node reboot has been triggered. The associated event data is the time in seconds - * (type: uint8_t) after which the node will reboot. Note that this time may not be - * accurate as the events are received asynchronously.*/ - RMAKER_EVENT_REBOOT, - /** Wi-Fi credentials reset. Triggered after calling esp_rmaker_wifi_reset() */ - RMAKER_EVENT_WIFI_RESET, - /** Node reset to factory defaults. Triggered after calling esp_rmaker_factory_reset() */ - RMAKER_EVENT_FACTORY_RESET + /** Node side communication for User-Node mapping done. + * Actual mapping state will be managed by the ESP RainMaker cloud based on the user side communication. + * Associated data is the NULL terminated user id. + */ + RMAKER_EVENT_USER_NODE_MAPPING_DONE, + /** Local control started. Associated data is the NULL terminated Service Name */ + RMAKER_EVENT_LOCAL_CTRL_STARTED, } esp_rmaker_event_t; /** ESP RainMaker Node information */ @@ -116,6 +118,18 @@ typedef enum { PROP_FLAG_PERSIST = (1 << 3) } esp_param_property_flags_t; +/** System Service Reboot Flag */ +#define SYSTEM_SERV_FLAG_REBOOT (1 << 0) + +/** System Service Factory Reset Flag */ +#define SYSTEM_SERV_FLAG_FACTORY_RESET (1 << 1) + +/** System Service Wi-Fi Reset Flag */ +#define SYSTEM_SERV_FLAG_WIFI_RESET (1 << 2) + +/** System Service All Flags */ +#define SYSTEM_SERV_FLAGS_ALL (SYSTEM_SERV_FLAG_REBOOT | SYSTEM_SERV_FLAG_FACTORY_RESET | SYSTEM_SERV_FLAG_WIFI_RESET) + /** Generic ESP RainMaker handle */ typedef size_t esp_rmaker_handle_t; @@ -138,6 +152,12 @@ typedef enum { ESP_RMAKER_REQ_SRC_CLOUD, /** Request received when a schedule has triggered */ ESP_RMAKER_REQ_SRC_SCHEDULE, + /** Request received from a local controller */ + ESP_RMAKER_REQ_SRC_LOCAL, + /** This will always be the last value. Any value equal to or + * greater than this should be considered invalid. + */ + ESP_RMAKER_REQ_SRC_MAX, } esp_rmaker_req_src_t; /** Write request Context */ @@ -152,6 +172,32 @@ typedef struct { esp_rmaker_req_src_t src; } esp_rmaker_read_ctx_t; +/** System service configuration */ +typedef struct { + /** Logical OR of system service flags (SYSTEM_SERV_FLAG_REBOOT, + * SYSTEM_SERV_FLAG_FACTORY_RESET, SYSTEM_SERV_FLAG_WIFI_RESET) as required + * or SYSTEM_SERV_FLAGS_ALL. + */ + uint16_t flags; + /** Time in seconds after which the device should reboot. + * Value of zero would trigger an immediate reboot if a write is received for + * the Reboot parameter. + * Recommended value: 2 + */ + int8_t reboot_seconds; + /** Time in seconds after which the device should reset (Wi-Fi or factory). + * Value of zero would trigger an immediate action if a write is received for + * the Wi-Fi reset or Factory reset parameter. + * Recommended value: 2 + */ + int8_t reset_seconds; + /** Time in seconds after which the device should reboot after it has been reset. + * Value of zero would mean that there won't be any reboot after the reset. + * Recommended value: 2 + */ + int8_t reset_reboot_seconds; +} esp_rmaker_system_serv_config_t; + /** Callback for parameter value write requests. * * The callback should call the esp_rmaker_param_update_and_report() API if the new value is to be set @@ -188,6 +234,28 @@ typedef esp_err_t (*esp_rmaker_device_write_cb_t)(const esp_rmaker_device_t *dev typedef esp_err_t (*esp_rmaker_device_read_cb_t)(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param, void *priv_data, esp_rmaker_read_ctx_t *ctx); +/** Convert device callback source to string + * + * Device read/write callback can be via different sources. This is a helper API + * to give the source in string format for printing. + * + * Example Usage: + * @code{c} + * static esp_err_t write_cb(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param, + * const esp_rmaker_param_val_t val, void *priv_data, esp_rmaker_write_ctx_t *ctx) +{ + if (ctx) { + ESP_LOGI(TAG, "Received write request via : %s", esp_rmaker_device_cb_src_to_str(ctx->src)); + } + * @endcode + * + * @param[in] src The src field as received in the callback context. + * + * @return NULL terminated source string on success + * @return NULL on failure + */ +const char *esp_rmaker_device_cb_src_to_str(esp_rmaker_req_src_t src); + /** * Initialise a Boolean value * @@ -311,7 +379,7 @@ esp_err_t esp_rmaker_node_deinit(const esp_rmaker_node_t *node); const esp_rmaker_node_t *esp_rmaker_get_node(void); /** Get Node Id - * + * * Returns pointer to the NULL terminated Node ID string. * * @return Pointer to a NULL terminated Node ID string. @@ -458,12 +526,24 @@ esp_err_t esp_rmaker_node_add_device(const esp_rmaker_node_t *node, const esp_rm */ esp_err_t esp_rmaker_node_remove_device(const esp_rmaker_node_t *node, const esp_rmaker_device_t *device); +/** Get device by name + * + * Get handle for a device based on the name. + * + * @param[in] node Node handle. + * @param[in] device_name Device name to search. + * + * @return Device handle on success. + * @return NULL in case of failure. + */ +esp_rmaker_device_t *esp_rmaker_node_get_device_by_name(const esp_rmaker_node_t *node, const char *device_name); + /** Add a Device attribute * * @note Device attributes are reported only once after a boot-up as part of the node * configuration. * Eg. Serial Number - * + * * @param[in] device Device handle. * @param[in] attr_name Name of the attribute. * @param[in] val Value of the attribute. @@ -473,6 +553,19 @@ esp_err_t esp_rmaker_node_remove_device(const esp_rmaker_node_t *node, const esp */ esp_err_t esp_rmaker_device_add_attribute(const esp_rmaker_device_t *device, const char *attr_name, const char *val); +/** Add a Device subtype + * + * This can be something like esp.subtype.rgb-light for a device of type esp.device.lightbulb. + * This would primarily be used by the phone apps to render different icons for the same device type. + * + * @param[in] device Device handle. + * @param[in] subtype String describing the sub type. + * + * @return ESP_OK if the subtype was added successfully. + * @return error in case of failure. + */ +esp_err_t esp_rmaker_device_add_subtype(const esp_rmaker_device_t *device, const char *subtype); + /** Get device name from handle * * @param[in] device Device handle. @@ -489,7 +582,7 @@ char *esp_rmaker_device_get_name(const esp_rmaker_device_t *device); * @return NULL terminated device type string on success. * @return NULL in case of failure, or if the type wasn't provided while creating the device. */ -char *esp_rmaker_device_get_name(const esp_rmaker_device_t *device); +char *esp_rmaker_device_get_type(const esp_rmaker_device_t *device); /** * Add a parameter to a device/service @@ -638,6 +731,30 @@ esp_err_t esp_rmaker_param_add_valid_str_list(const esp_rmaker_param_t *param, c */ esp_err_t esp_rmaker_param_add_array_max_count(const esp_rmaker_param_t *param, int count); + +/* Update a parameter + * + * This will just update the value of a parameter with esp rainmaker core, without actually reporting + * it. This can be used when multiple parameters need to be reported together. + * Eg. If x parameters are to be reported, this API can be used for the first x -1 parameters + * and the last one can be updated using esp_rmaker_param_update_and_report(). + * This will report all parameters which were updated prior to this call. + * + * Sample: + * + * esp_rmaker_param_update(param1, esp_rmaker_float(10.2)); + * esp_rmaker_param_update(param2, esp_rmaker_int(55)); + * esp_rmaker_param_update(param3, esp_rmaker_int(95)); + * esp_rmaker_param_update_and_report(param1, esp_rmaker_bool(true)); + * + * @param[in] param Parameter handle. + * @param[in] val New value of the parameter. + * + * @return ESP_OK if the parameter was updated successfully. + * @return error in case of failure. + */ +esp_err_t esp_rmaker_param_update(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); + /** Update and report a parameter * * Calling this API will update the parameter and report it to ESP RainMaker cloud. @@ -651,6 +768,46 @@ esp_err_t esp_rmaker_param_add_array_max_count(const esp_rmaker_param_t *param, */ esp_err_t esp_rmaker_param_update_and_report(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); +/** Update and notify a parameter + * + * Calling this API will update the parameter and report it to ESP RainMaker cloud similar to + * esp_rmaker_param_update_and_report(). However, additionally, it will also trigger a notification + * on the phone apps (if enabled). + * + * @note This should be used only when some local change requires explicit notification even when the + * phone app is in background, not otherwise. + * Eg. Alarm got triggered, temperature exceeded some threshold, etc. + * + * Alternatively, the esp_rmaker_raise_alert() API can also be used to trigger notification + * on the phone apps with pre-formatted text. + * + * @param[in] param Parameter handle. + * @param[in] val New value of the parameter. + * + * @return ESP_OK if the parameter was updated successfully. + * @return error in case of failure. + */ +esp_err_t esp_rmaker_param_update_and_notify(const esp_rmaker_param_t *param, esp_rmaker_param_val_t val); + +/** Trigger an alert on the phone app + * + * This API will trigger a notification alert on the phone apps (if enabled) using the formatted text + * provided. Note that this does not send a notification directly to the phone, but reports the alert + * to the ESP RainMaker cloud which then uses the Notification framework to send notifications to the + * phone apps. The value does not get stored anywhere, nor is it linked to any node parameters. + * + * @note This should be used only if some event requires explicitly alerting the user even when the + * phone app is in background, not otherwise. + * Eg. "Motion Detected", "Fire alarm triggered" + * + * @param[in] alert_str NULL terminated pre-formatted alert string. + * Maximum length can be ESP_RMAKER_MAX_ALERT_LEN, excluding NULL character. + * + * @return ESP_OK on success. + * @return error in case of failure. + */ +esp_err_t esp_rmaker_raise_alert(const char *alert_str); + /** Get parameter name from handle * * @param[in] param Parameter handle. @@ -669,11 +826,18 @@ char *esp_rmaker_param_get_name(const esp_rmaker_param_t *param); */ char *esp_rmaker_param_get_type(const esp_rmaker_param_t *param); -/** Prototype for ESP RainMaker Work Queue Function +/** Get parameter value * - * @param[in] priv_data The private data associated with the work function. + * This gives the parameter value that is stored in the RainMaker core. + * + * @note This does not call any explicit functions to read value from hardware/driver. + * + * @param[in] param Parameter handle + * + * @return Pointer to parameter value on success. + * @return NULL in case of failure. */ -typedef void (*esp_rmaker_work_fn_t)(void *priv_data); +esp_rmaker_param_val_t *esp_rmaker_param_get_val(esp_rmaker_param_t *param); /** Report the node details to the cloud * @@ -689,17 +853,38 @@ typedef void (*esp_rmaker_work_fn_t)(void *priv_data); */ esp_err_t esp_rmaker_report_node_details(void); -/** Queue execution of a function in ESP RainMaker's context +/** Enable Timezone Service + * + * This enables the ESP RainMaker standard timezone service which can be used to set + * timezone, either in POSIX or location string format. Please refer the specifications + * for additional details. + * + * @return ESP_OK on success + * @return error on failure + */ +esp_err_t esp_rmaker_timezone_service_enable(void); + +/** Enable System Service * - * This API queues a work function for execution in the ESP RainMaker Task's context. + * This enables the ESP RainMaker standard system service which can be + * used for operations like reboot, factory reset and Wi-Fi reset. * - * @param[in] work_fn The Work function to be queued. - * @param[in] priv_data Private data to be passed to the work function. + * Please refer the specifications for additional details. * - * @return ESP_OK on success. - * @return error in case of failure. + * @param[in] config Configuration for the system service. + * + * @return ESP_OK on success + * @return error on failure + */ +esp_err_t esp_rmaker_system_service_enable(esp_rmaker_system_serv_config_t *config); + +/** + * Check if local_ctrl service has started + * + * @return true if service has started + * @return false if the service has not started */ -esp_err_t esp_rmaker_queue_work(esp_rmaker_work_fn_t work_fn, void *priv_data); +bool esp_rmaker_local_ctrl_service_started(void); #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_mqtt.h b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_mqtt.h index cb724829dae..1cc6cd5156e 100644 --- a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_mqtt.h +++ b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_mqtt.h @@ -14,34 +14,14 @@ #pragma once #include #include +#include #ifdef __cplusplus extern "C" { #endif -/** ESP RainMaker MQTT Configuration */ -typedef struct { - /** MQTT Host */ - char *mqtt_host; - /** Client ID */ - char *client_id; - /** Client Certificate in NULL terminate PEM format */ - char *client_cert; - /** Client Key in NULL terminate PEM format */ - char *client_key; - /** Server Certificate in NULL terminate PEM format */ - char *server_cert; -} esp_rmaker_mqtt_config_t; - -/** ESP RainMaker MQTT Subscribe callback prototype - * - * @param[in] topic Topic on which the message was received - * @param[in] payload Data received in the message - * @param[in] payload_len Length of the data - * @param[in] priv_data The private data passed during subscription - */ -typedef void (*esp_rmaker_mqtt_subscribe_cb_t) (const char *topic, void *payload, size_t payload_len, void *priv_data); +esp_rmaker_mqtt_conn_params_t *esp_rmaker_mqtt_get_conn_params(void); /** Initialize ESP RainMaker MQTT * @@ -50,7 +30,7 @@ typedef void (*esp_rmaker_mqtt_subscribe_cb_t) (const char *topic, void *payload * @return ESP_OK on success. * @return error in case of any error. */ -esp_err_t esp_rmaker_mqtt_init(esp_rmaker_mqtt_config_t *config); +esp_err_t esp_rmaker_mqtt_init(esp_rmaker_mqtt_conn_params_t *conn_params); /** MQTT Connect * @@ -77,22 +57,24 @@ esp_err_t esp_rmaker_mqtt_disconnect(void); * @param[in] topic The MQTT topic on which the message should be published. * @param[in] data Data to be published * @param[in] data_len Length of the data + * @param[in] qos Quality of Service for the Publish. Can be 0, 1 or 2. Also depends on what the MQTT broker supports. * * @return ESP_OK on success. * @return error in case of any error. */ -esp_err_t esp_rmaker_mqtt_publish(const char *topic, void *data, size_t data_len); +esp_err_t esp_rmaker_mqtt_publish(const char *topic, void *data, size_t data_len, uint8_t qos, int *msg_id); /** Subscribe to MQTT topic * * @param[in] topic The topic to be subscribed to. * @param[in] cb The callback to be invoked when a message is received on the given topic. * @param[in] priv_data Optional private data to be passed to the callback + * @param[in] qos Quality of Service for the Subscription. Can be 0, 1 or 2. Also depends on what the MQTT broker supports. * * @return ESP_OK on success. * @return error in case of any error. */ -esp_err_t esp_rmaker_mqtt_subscribe(const char *topic, esp_rmaker_mqtt_subscribe_cb_t cb, void *priv_data); +esp_err_t esp_rmaker_mqtt_subscribe(const char *topic, esp_rmaker_mqtt_subscribe_cb_t cb, uint8_t qos, void *priv_data); /** Unsubscribe from MQTT topic * @@ -102,7 +84,7 @@ esp_err_t esp_rmaker_mqtt_subscribe(const char *topic, esp_rmaker_mqtt_subscribe * @return error in case of any error. */ esp_err_t esp_rmaker_mqtt_unsubscribe(const char *topic); - +esp_err_t esp_rmaker_mqtt_setup(esp_rmaker_mqtt_config_t mqtt_config); #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_ota.h b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_ota.h index 2def84ebc5d..e66b95705bc 100644 --- a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_ota.h +++ b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_ota.h @@ -104,7 +104,7 @@ typedef struct { * The certificate to be passed to the OTA callback for server authentication. * This is mandatory, unless you have disabled it in ESP HTTPS OTA config option. * If you are using the ESP RainMaker OTA Service, you can just set this to - * `ESP_RMAKER_DEFAULT_OTA_SERVER_CERT`. + * `ESP_RMAKER_OTA_DEFAULT_SERVER_CERT`. */ const char *server_cert; /** Private Data. diff --git a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_schedule.h b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_schedule.h index 6d63a5b78da..383c0949188 100644 --- a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_schedule.h +++ b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_schedule.h @@ -26,6 +26,8 @@ extern "C" * * It is recommended to set the timezone while using schedules. Check [here](https://rainmaker.espressif.com/docs/time-service.html#time-zone) for more information on timezones * + * @note This API should be called after esp_rmaker_node_init() but before esp_rmaker_start(). + * * @return ESP_OK on success. * @return error in case of failure. */ diff --git a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_params.h b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_params.h index 5a5ad856b80..6cde69a2935 100644 --- a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_params.h +++ b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_params.h @@ -45,6 +45,11 @@ extern "C" #define ESP_RMAKER_DEF_TIMEZONE_NAME "TZ" #define ESP_RMAKER_DEF_TIMEZONE_POSIX_NAME "TZ-POSIX" #define ESP_RMAKER_DEF_SCHEDULE_NAME "Schedules" +#define ESP_RMAKER_DEF_REBOOT_NAME "Reboot" +#define ESP_RMAKER_DEF_FACTORY_RESET_NAME "Factory-Reset" +#define ESP_RMAKER_DEF_WIFI_RESET_NAME "Wi-Fi-Reset" +#define ESP_RMAKER_DEF_LOCAL_CONTROL_POP "POP" +#define ESP_RMAKER_DEF_LOCAL_CONTROL_TYPE "Type" /** * Create standard name param @@ -247,7 +252,7 @@ esp_rmaker_param_t *esp_rmaker_timezone_param_create(const char *param_name, con esp_rmaker_param_t *esp_rmaker_timezone_posix_param_create(const char *param_name, const char *val); /** - * Create standard schedules param + * Create standard Schedules param * * This will create the standard schedules parameter. Default value * is set internally. @@ -260,6 +265,71 @@ esp_rmaker_param_t *esp_rmaker_timezone_posix_param_create(const char *param_nam */ esp_rmaker_param_t *esp_rmaker_schedules_param_create(const char *param_name, int max_schedules); +/** + * Create standard Reboot param + * + * This will create the standard reboot parameter. + * Set value to true (via write param) for the action to trigger. + * + * @param[in] param_name Name of the parameter + * + * @return Parameter handle on success. + * @return NULL in case of failures. + */ +esp_rmaker_param_t *esp_rmaker_reboot_param_create(const char *param_name); + +/** + * Create standard Factory Reset param + * + * This will create the standard factory reset parameter. + * Set value to true (via write param) for the action to trigger. + * + * @param[in] param_name Name of the parameter + * + * @return Parameter handle on success. + * @return NULL in case of failures. + */ +esp_rmaker_param_t *esp_rmaker_factory_reset_param_create(const char *param_name); + +/** + * Create standard Wi-Fi Reset param + * + * This will create the standard Wi-Fi Reset parameter. + * Set value to true (via write param) for the action to trigger. + * + * @param[in] param_name Name of the parameter + * + * @return Parameter handle on success. + * @return NULL in case of failures. + */ +esp_rmaker_param_t *esp_rmaker_wifi_reset_param_create(const char *param_name); + +/** + * Create standard Local Control POP param + * + * This will create the standard Local Control POP parameter. + * + * @param[in] param_name Name of the parameter + * @param[in] val Default Value of the parameter (Eg. "abcd1234"). Can be kept NULL. + * + * @return Parameter handle on success. + * @return NULL in case of failures. + */ +esp_rmaker_param_t *esp_rmaker_local_control_pop_param_create(const char *param_name, const char *val); + +/** + * Create standard Local Control Type param + * + * This will create the standard Local Control security type parameter. + * + * @param[in] param_name Name of the parameter + * @param[in] val Default Value of the parameter + * + * @return Parameter handle on success. + * @return NULL in case of failures. + */ +esp_rmaker_param_t *esp_rmaker_local_control_type_param_create(const char *param_name, int val); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_services.h b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_services.h index 348505c1486..7dc6dfbad80 100644 --- a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_services.h +++ b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_services.h @@ -71,6 +71,36 @@ esp_rmaker_device_t *esp_rmaker_time_service_create(const char *serv_name, const */ esp_rmaker_device_t *esp_rmaker_create_schedule_service(const char *serv_name, esp_rmaker_device_write_cb_t write_cb, esp_rmaker_device_read_cb_t read_cb, int max_schedules, void *priv_data); +/** Create a standard System service + * + * This creates an empty System service. Appropriate parameters should be added by the caller. + * + * @param[in] serv_name The unique service name + * @param[in] priv_data (Optional) Private data associated with the service. This should stay + * allocated throughout the lifetime of the service. + * + * @return service_handle on success. + * @return NULL in case of any error. + */ + +esp_rmaker_device_t *esp_rmaker_create_system_service(const char *serv_name, void *priv_data); + +/** Create a standard Local Control service + * + * This creates a Local Control service with the mandatory parameters. The default parameter names will be used. + * Refer \ref esp_rmaker_standard_params.h for default names. + * + * @param[in] serv_name The unique service name + * @param[in] pop Proof of possession + * @param[in] sec_type Security type + * @param[in] priv_data (Optional) Private data associated with the service. This should stay + * allocated throughout the lifetime of the service. + * + * @return service_handle on success. + * @return NULL in case of any error. + */ +esp_rmaker_device_t *esp_rmaker_create_local_control_service(const char *serv_name, const char *pop, int sec_type, void *priv_data); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_types.h b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_types.h index 73cbec85b89..11eecebcb1c 100644 --- a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_types.h +++ b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_standard_types.h @@ -24,7 +24,7 @@ extern "C" #define ESP_RMAKER_UI_SLIDER "esp.ui.slider" #define ESP_RMAKER_UI_DROPDOWN "esp.ui.dropdown" #define ESP_RMAKER_UI_TEXT "esp.ui.text" - +#define ESP_RMAKER_UI_HUE_SLIDER "esp.ui.hue-slider" /********** STANDARD PARAM TYPES **********/ @@ -44,6 +44,11 @@ extern "C" #define ESP_RMAKER_PARAM_TIMEZONE "esp.param.tz" #define ESP_RMAKER_PARAM_TIMEZONE_POSIX "esp.param.tz_posix" #define ESP_RMAKER_PARAM_SCHEDULES "esp.param.schedules" +#define ESP_RMAKER_PARAM_REBOOT "esp.param.reboot" +#define ESP_RMAKER_PARAM_FACTORY_RESET "esp.param.factory-reset" +#define ESP_RMAKER_PARAM_WIFI_RESET "esp.param.wifi-reset" +#define ESP_RMAKER_PARAM_LOCAL_CONTROL_POP "esp.param.local_control_pop" +#define ESP_RMAKER_PARAM_LOCAL_CONTROL_TYPE "esp.param.local_control_type" /********** STANDARD DEVICE TYPES **********/ @@ -58,6 +63,8 @@ extern "C" #define ESP_RMAKER_SERVICE_OTA "esp.service.ota" #define ESP_RMAKER_SERVICE_TIME "esp.service.time" #define ESP_RMAKER_SERVICE_SCHEDULE "esp.service.schedule" +#define ESP_RMAKER_SERVICE_SYSTEM "esp.service.system" +#define ESP_RMAKER_SERVICE_LOCAL_CONTROL "esp.service.local_control" #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/esp_schedule/include/esp_schedule.h b/tools/sdk/esp32/include/esp_schedule/include/esp_schedule.h index d4bc7478363..4b611830a7d 100644 --- a/tools/sdk/esp32/include/esp_schedule/include/esp_schedule.h +++ b/tools/sdk/esp32/include/esp_schedule/include/esp_schedule.h @@ -51,6 +51,7 @@ typedef enum esp_schedule_type { ESP_SCHEDULE_TYPE_INVALID = 0, ESP_SCHEDULE_TYPE_DAYS_OF_WEEK, ESP_SCHEDULE_TYPE_DATE, + ESP_SCHEDULE_TYPE_RELATIVE, } esp_schedule_type_t; /** Schedule days. Used for ESP_SCHEDULE_TYPE_DAYS_OF_WEEK. */ @@ -108,6 +109,11 @@ typedef struct esp_schedule_trigger { /** If the schedule is to be repeated every year. */ bool repeat_every_year; } date; + /** For type ESP_SCHEDULE_TYPE_SECONDS */ + int relative_seconds; + /** Used for passing the next schedule timestamp for + * ESP_SCHEDULE_TYPE_RELATIVE */ + time_t next_scheduled_time_utc; } esp_schedule_trigger_t; /** Schedule config */ diff --git a/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_types.h b/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_types.h index ae574416b9c..47f5c79281b 100644 --- a/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_types.h +++ b/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_types.h @@ -215,7 +215,7 @@ typedef enum { /** Configuration structure for Protected Management Frame */ typedef struct { - bool capable; /**< Advertizes support for Protected Management Frame. Device will prefer to connect in PMF mode if other device also advertizes PMF capability. */ + bool capable; /**< Deprecated variable. Device will always connect in PMF mode if other device also advertizes PMF capability. */ bool required; /**< Advertizes that Protected Management Frame is required. Device will not associate to non-PMF capable devices. */ } wifi_pmf_config_t; diff --git a/tools/sdk/esp32/include/hal/include/hal/i2s_types.h b/tools/sdk/esp32/include/hal/include/hal/i2s_types.h index c59220c89cd..dcf0ab4d0b8 100644 --- a/tools/sdk/esp32/include/hal/include/hal/i2s_types.h +++ b/tools/sdk/esp32/include/hal/include/hal/i2s_types.h @@ -44,31 +44,31 @@ typedef enum { * */ typedef enum { - I2S_CHANNEL_MONO = (0x01 << 31) | 0x03, /*!< I2S channel (mono), two channel enabled. In this mode, you only need to send one channel data but the fifo will copy same data for another channel automatically, then both channels will transmit same data. The highest bit is for differentiating I2S_CHANNEL_STEREO since they both use two channels */ - I2S_CHANNEL_STEREO = 0x03, /*!< I2S channel (stereo), two channel enabled. In this mode, two channels will transmit different data. */ + I2S_CHANNEL_MONO = 1, /*!< I2S channel (mono), one channel activated. In this mode, you only need to send one channel data but the fifo will copy same data for the other unactivated channels automatically, then both channels will transmit same data. */ + I2S_CHANNEL_STEREO = 2, /*!< I2S channel (stereo), two (or more) channels activated. In this mode, these channels will transmit different data. */ #if SOC_I2S_SUPPORTS_TDM - // Bit map of active chan. + // Bit map of activated chan. // There are 16 channels in TDM mode. - // For TX module, only the active channel send the audio data, the inactive channel send a constant(configurable) or will be skiped if 'skip_msk' is set. - // For RX module, only receive the audio data in active channels, the data in inactive channels will be ignored. - // the bit map of active channel can not exceed (0x1< #include #include "soc/usbh_struct.h" -#include "soc/usb_wrap_struct.h" #include "hal/usbh_ll.h" #include "hal/usb_types_private.h" #include "hal/assert.h" @@ -152,7 +151,6 @@ typedef struct { typedef struct { //Context usbh_dev_t *dev; /**< Pointer to base address of DWC_OTG registers */ - usb_wrap_dev_t *wrap_dev; /**< Pointer to base address of USB Wrapper registers */ //Host Port related uint32_t *periodic_frame_list; /**< Pointer to scheduling frame list */ usb_hal_frame_list_len_t frame_list_len; /**< Length of the periodic scheduling frame list */ @@ -181,6 +179,7 @@ typedef struct { * * Entry: * - The peripheral must have been reset and clock un-gated + * - The USB PHY (internal or external) and associated GPIOs must already be configured * - GPIO pins configured * - Interrupt allocated but DISABLED (in case of an unknown interupt state) * Exit: @@ -495,7 +494,7 @@ static inline void usbh_hal_disable_debounce_lock(usbh_hal_context_t *hal) hal->flags.dbnc_lock_enabled = 0; //Clear Conenction and disconenction interrupt in case it triggered again usb_ll_intr_clear(hal->dev, USB_LL_INTR_CORE_DISCONNINT); - usbh_ll_hprt_intr_clear(hal->dev, USBH_LL_INTR_HPRT_PRTENCHNG); + usbh_ll_hprt_intr_clear(hal->dev, USBH_LL_INTR_HPRT_PRTCONNDET); //Reenable the hprt (connection) and disconnection interrupts usb_ll_en_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_DISCONNINT); } diff --git a/tools/sdk/esp32/include/hal/include/hal/usbh_ll.h b/tools/sdk/esp32/include/hal/include/hal/usbh_ll.h index 63f7b8219d1..4320ead0a3b 100644 --- a/tools/sdk/esp32/include/hal/include/hal/usbh_ll.h +++ b/tools/sdk/esp32/include/hal/include/hal/usbh_ll.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -13,7 +13,6 @@ extern "C" { #include #include #include "soc/usbh_struct.h" -#include "soc/usb_wrap_struct.h" #include "hal/usb_types_private.h" #include "hal/misc.h" @@ -153,25 +152,6 @@ typedef struct { uint8_t *buffer; } usbh_ll_dma_qtd_t; -/* ----------------------------------------------------------------------------- ------------------------------- USB Wrap Registers ------------------------------ ------------------------------------------------------------------------------ */ - -/** - * @brief Configures the internal PHY to operate as HOST - * - * @param hw Start address of the USB Wrap registers - */ -static inline void usbh_ll_internal_phy_conf(usb_wrap_dev_t *hw) -{ - //Enable internal PHY - hw->otg_conf.pad_enable = 1; - hw->otg_conf.phy_sel = 0; - //Set pulldowns on D+ and D- - hw->otg_conf.pad_pull_override = 1; - hw->otg_conf.dp_pulldown = 1; - hw->otg_conf.dm_pulldown = 1; -} /* ----------------------------------------------------------------------------- ------------------------------- Global Registers ------------------------------- @@ -431,7 +411,7 @@ static inline void usbh_ll_hcfg_set_fsls_pclk_sel(usbh_dev_t *hw) /** * @brief Sets some default values to HCFG to operate in Host mode with scatter/gather DMA * - * @param hw Start address of the USB Wrap registers + * @param hw Start address of the DWC_OTG registers * @param speed Speed to initialize the host port at */ static inline void usbh_ll_hcfg_set_defaults(usbh_dev_t *hw, usb_priv_speed_t speed) diff --git a/tools/sdk/esp32/include/json_generator/json_generator.h b/tools/sdk/esp32/include/json_generator/upstream/json_generator.h old mode 100755 new mode 100644 similarity index 90% rename from tools/sdk/esp32/include/json_generator/json_generator.h rename to tools/sdk/esp32/include/json_generator/upstream/json_generator.h index 2dc527d0e95..e3aa92eeecf --- a/tools/sdk/esp32/include/json_generator/json_generator.h +++ b/tools/sdk/esp32/include/json_generator/upstream/json_generator.h @@ -1,11 +1,26 @@ -/** \file json_gen_generator.h - * \brief JSON String Generator +/* + * Copyright 2020 Piyush Shah + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * JSON String Generator * * This module can be used to create JSON strings with a facility * to flush out data if the destination buffer is full. All commas * and colons as required are automatically added by the APIs * - * Code taken from: https://github.com/shahpiyushv/json_gen_generator */ #ifndef _JSON_GENERATOR_H #define _JSON_GENERATOR_H @@ -18,7 +33,10 @@ extern "C" { #endif +/** Float precision i.e. number of digits after decimal point */ +#ifndef JSON_FLOAT_PRECISION #define JSON_FLOAT_PRECISION 5 +#endif /** JSON string flush callback prototype * @@ -38,12 +56,20 @@ typedef void (*json_gen_flush_cb_t) (char *buf, void *priv); * Just define this structure and pass a pointer to it in the APIs below */ typedef struct { + /** Pointer to the JSON buffer provided by the calling function */ char *buf; + /** Size of the above buffer */ int buf_size; + /** (Optional) callback function to invoke when the buffer gets full */ json_gen_flush_cb_t flush_cb; + /** (Optional) Private data to pass to the callback function */ void *priv; + /** (For Internal use only) */ bool comma_req; + /** (For Internal use only) */ char *free_ptr; + /** Total length */ + int total_len; } json_gen_str_t; /** Start a JSON String @@ -58,11 +84,11 @@ typedef struct { * \param[out] buf Pointer to an allocated buffer into which the JSON * string will be written * \param[in] buf_size Size of the buffer - * \param[in] Pointer to the flushing function of type \ref json_gen_flush_cb_t + * \param[in] flush_cb Pointer to the flushing function of type \ref json_gen_flush_cb_t * which will be invoked either when the buffer is full or when json_gen_str_end() * is invoked. Can be left NULL. * \param[in] priv Private data to be passed to the flushing function callback. - * Can be something like a session identifier (Eg. socket). Can be left NULL + * Can be something like a session identifier (Eg. socket). Can be left NULL. */ void json_gen_str_start(json_gen_str_t *jstr, char *buf, int buf_size, json_gen_flush_cb_t flush_cb, void *priv); @@ -72,16 +98,18 @@ void json_gen_str_start(json_gen_str_t *jstr, char *buf, int buf_size, * This should be the last function to be called after the entire JSON string * has been generated. * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() + * + * \return Total length of the JSON created, including the NULL termination byte. */ -void json_gen_str_end(json_gen_str_t *jstr); +int json_gen_str_end(json_gen_str_t *jstr); /** Start a JSON object * * This starts a JSON object by adding a '{' * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * * \return 0 on Success @@ -95,7 +123,7 @@ int json_gen_start_object(json_gen_str_t *jstr); * * This ends a JSON object by adding a '}' * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * * \return 0 on Success @@ -109,7 +137,7 @@ int json_gen_end_object(json_gen_str_t *jstr); * * This starts a JSON object by adding a '[' * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * * \return 0 on Success @@ -123,7 +151,7 @@ int json_gen_start_array(json_gen_str_t *jstr); * * This ends a JSON object by adding a ']' * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * * \return 0 on Success @@ -137,7 +165,7 @@ int json_gen_end_array(json_gen_str_t *jstr); * * This adds a JSON object like "name":{ * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] name Name of the object * @@ -153,7 +181,7 @@ int json_gen_push_object(json_gen_str_t *jstr, char *name); * This ends a JSON object by adding a '}'. This is basically same as * json_gen_end_object() but included so as to complement json_gen_push_object() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * * \return 0 on Success @@ -170,7 +198,7 @@ int json_gen_pop_object(json_gen_str_t *jstr); * Eg. json_gen_push_object_str(jstr, "pre-formatted", "{\"a\":1,\"b\":2}"); * This will add "pre-formatted":{"a":1,"b":2} * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] name Name of the JSON object string * \param[in] object_str The pre-formatted JSON object string @@ -186,7 +214,7 @@ int json_gen_push_object_str(json_gen_str_t *jstr, char *name, char *object_str) * * This adds a JSON array like "name":[ * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] name Name of the array * @@ -202,7 +230,7 @@ int json_gen_push_array(json_gen_str_t *jstr, char *name); * This ends a JSON array by adding a ']'. This is basically same as * json_gen_end_array() but included so as to complement json_gen_push_array() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * * \return 0 on Success @@ -219,7 +247,7 @@ int json_gen_pop_array(json_gen_str_t *jstr); * Eg. json_gen_push_object_str(jstr, "pre-formatted", "[1,2,3]"); * This will add "pre-formatted":[1,2,3] * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] name Name of the JSON array string * \param[in] array_str The pre-formatted JSON array string @@ -238,7 +266,7 @@ int json_gen_push_array_str(json_gen_str_t *jstr, char *name, char *array_str); * \note This must be called between json_gen_start_object()/json_gen_push_object() * and json_gen_end_object()/json_gen_pop_object() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] name Name of the element * \param[in] val Boolean value of the element @@ -257,7 +285,7 @@ int json_gen_obj_set_bool(json_gen_str_t *jstr, char *name, bool val); * \note This must be called between json_gen_start_object()/json_gen_push_object() * and json_gen_end_object()/json_gen_pop_object() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] name Name of the element * \param[in] val Integer value of the element @@ -276,7 +304,7 @@ int json_gen_obj_set_int(json_gen_str_t *jstr, char *name, int val); * \note This must be called between json_gen_start_object()/json_gen_push_object() * and json_gen_end_object()/json_gen_pop_object() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] name Name of the element * \param[in] val Float value of the element @@ -295,7 +323,7 @@ int json_gen_obj_set_float(json_gen_str_t *jstr, char *name, float val); * \note This must be called between json_gen_start_object()/json_gen_push_object() * and json_gen_end_object()/json_gen_pop_object() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] name Name of the element * \param[in] val Null terminated string value of the element @@ -314,7 +342,7 @@ int json_gen_obj_set_string(json_gen_str_t *jstr, char *name, char *val); * \note This must be called between json_gen_start_object()/json_gen_push_object() * and json_gen_end_object()/json_gen_pop_object() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] name Name of the element * @@ -330,7 +358,7 @@ int json_gen_obj_set_null(json_gen_str_t *jstr, char *name); * \note This must be called between json_gen_start_array()/json_gen_push_array() * and json_gen_end_array()/json_gen_pop_array() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] val Boolean value of the element * @@ -346,7 +374,7 @@ int json_gen_arr_set_bool(json_gen_str_t *jstr, bool val); * \note This must be called between json_gen_start_array()/json_gen_push_array() * and json_gen_end_array()/json_gen_pop_array() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] val Integer value of the element * @@ -362,7 +390,7 @@ int json_gen_arr_set_int(json_gen_str_t *jstr, int val); * \note This must be called between json_gen_start_array()/json_gen_push_array() * and json_gen_end_array()/json_gen_pop_array() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] val Float value of the element * @@ -378,7 +406,7 @@ int json_gen_arr_set_float(json_gen_str_t *jstr, float val); * \note This must be called between json_gen_start_array()/json_gen_push_array() * and json_gen_end_array()/json_gen_pop_array() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] val Null terminated string value of the element * @@ -394,7 +422,7 @@ int json_gen_arr_set_string(json_gen_str_t *jstr, char *val); * \note This must be called between json_gen_start_array()/json_gen_push_array() * and json_gen_end_array()/json_gen_pop_array() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * * \return 0 on Success @@ -414,7 +442,7 @@ int json_gen_arr_set_null(json_gen_str_t *jstr); * \note This must be called between json_gen_start_object()/json_gen_push_object() * and json_gen_end_object()/json_gen_pop_object() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] name Name of the element * \param[in] val Null terminated initial part of the string value. It can also be NULL @@ -436,7 +464,7 @@ int json_gen_obj_start_long_string(json_gen_str_t *jstr, char *name, char *val); * \note This must be called between json_gen_start_array()/json_gen_push_array() * and json_gen_end_array()/json_gen_pop_array() * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by * json_gen_str_start() * \param[in] val Null terminated initial part of the string value. It can also be NULL * @@ -453,7 +481,7 @@ int json_gen_arr_start_long_string(json_gen_str_t *jstr, char *val); * json_gen_arr_start_long_string(). After the entire string is created, it should be terminated * with json_gen_end_long_string(). * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by json_gen_str_start() + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by json_gen_str_start() * \param[in] val Null terminated extending part of the string value. * * \return 0 on Success @@ -468,7 +496,7 @@ int json_gen_add_to_long_string(json_gen_str_t *jstr, char *val); * This ends the string initialised by json_gen_obj_start_long_string() or * json_gen_arr_start_long_string() by adding the ending quotes. * - * \param[in] jstr Pointer to the \ref json_gen_str_t structure initilised by json_gen_str_start() + * \param[in] jstr Pointer to the \ref json_gen_str_t structure initialised by json_gen_str_start() * * * \return 0 on Success @@ -477,9 +505,7 @@ int json_gen_add_to_long_string(json_gen_str_t *jstr, char *val); * added after that */ int json_gen_end_long_string(json_gen_str_t *jstr); - #ifdef __cplusplus } #endif - #endif diff --git a/tools/sdk/esp32/include/json_parser/jsmn/include/jsmn-changed.h b/tools/sdk/esp32/include/json_parser/jsmn/include/jsmn-changed.h deleted file mode 100644 index be2bf3fe9de..00000000000 --- a/tools/sdk/esp32/include/json_parser/jsmn/include/jsmn-changed.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2010 Serge A. Zaitsev - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * @file jsmn.h - * @brief Definition of the JSMN (Jasmine) JSON parser. - * - * For more information on JSMN: - * @see http://zserge.com/jsmn.html - */ - -#ifndef __JSMN_CHANGED_H_ -#define __JSMN_CHANGED_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -#define JSMN_PARENT_LINKS -#define JSMN_STRICT - -/** - * JSON type identifier. Basic types are: - * o Object - * o Array - * o String - * o Other primitive: number, boolean (true/false) or null - */ -typedef enum { - JSMN_UNDEFINED = 0, - JSMN_OBJECT = 1, - JSMN_ARRAY = 2, - JSMN_STRING = 3, - JSMN_PRIMITIVE = 4 -} _jsmntype_t; - -enum jsmnerr { - /* Not enough tokens were provided */ - JSMN_ERROR_NOMEM = -1, - /* Invalid character inside JSON string */ - JSMN_ERROR_INVAL = -2, - /* The string is not a full JSON packet, more bytes expected */ - JSMN_ERROR_PART = -3 -}; - -/** - * JSON token description. - * @param type type (object, array, string etc.) - * @param start start position in JSON data string - * @param end end position in JSON data string - */ -typedef struct { - _jsmntype_t type; - int start; - int end; - int size; -#ifdef JSMN_PARENT_LINKS - int parent; -#endif -} _jsmntok_t; - -/** - * JSON parser. Contains an array of token blocks available. Also stores - * the string being parsed now and current position in that string - */ -typedef struct { - unsigned int pos; /* offset in the JSON string */ - unsigned int toknext; /* next token to allocate */ - int toksuper; /* superior token node, e.g parent object or array */ -} _jsmn_parser; - -/** - * Create JSON parser over an array of tokens - */ -void __jsmn_init(_jsmn_parser *parser); - -/** - * Run JSON parser. It parses a JSON data string into and array of tokens, each describing - * a single JSON object. - */ -int __jsmn_parse(_jsmn_parser *parser, const char *js, size_t len, - _jsmntok_t *tokens, unsigned int num_tokens); - -#ifdef __cplusplus -} -#endif - -#endif /* __JSMN_CHANGED_H_ */ diff --git a/tools/sdk/esp32/include/json_parser/json_parser.h b/tools/sdk/esp32/include/json_parser/upstream/include/json_parser.h old mode 100755 new mode 100644 similarity index 73% rename from tools/sdk/esp32/include/json_parser/json_parser.h rename to tools/sdk/esp32/include/json_parser/upstream/include/json_parser.h index 7233caa3f3e..3e982fe14eb --- a/tools/sdk/esp32/include/json_parser/json_parser.h +++ b/tools/sdk/esp32/include/json_parser/upstream/include/json_parser.h @@ -1,8 +1,23 @@ -/* Code taken from: https://github.com/shahpiyushv/json_parser */ +/* + * Copyright 2020 Piyush Shah + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #ifndef _JSON_PARSER_H_ #define _JSON_PARSER_H_ -#include +#define JSMN_HEADER +#include #include #include @@ -14,8 +29,8 @@ extern "C" #define OS_SUCCESS 0 #define OS_FAIL -1 -typedef _jsmn_parser json_parser_t; -typedef _jsmntok_t json_tok_t; +typedef jsmn_parser json_parser_t; +typedef jsmntok_t json_tok_t; typedef struct { json_parser_t parser; diff --git a/tools/sdk/esp32/include/json_parser/upstream/jsmn/jsmn.h b/tools/sdk/esp32/include/json_parser/upstream/jsmn/jsmn.h new file mode 100644 index 00000000000..3178dcc977f --- /dev/null +++ b/tools/sdk/esp32/include/json_parser/upstream/jsmn/jsmn.h @@ -0,0 +1,471 @@ +/* + * MIT License + * + * Copyright (c) 2010 Serge Zaitsev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#ifndef JSMN_H +#define JSMN_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef JSMN_STATIC +#define JSMN_API static +#else +#define JSMN_API extern +#endif + +/** + * JSON type identifier. Basic types are: + * o Object + * o Array + * o String + * o Other primitive: number, boolean (true/false) or null + */ +typedef enum { + JSMN_UNDEFINED = 0, + JSMN_OBJECT = 1, + JSMN_ARRAY = 2, + JSMN_STRING = 3, + JSMN_PRIMITIVE = 4 +} jsmntype_t; + +enum jsmnerr { + /* Not enough tokens were provided */ + JSMN_ERROR_NOMEM = -1, + /* Invalid character inside JSON string */ + JSMN_ERROR_INVAL = -2, + /* The string is not a full JSON packet, more bytes expected */ + JSMN_ERROR_PART = -3 +}; + +/** + * JSON token description. + * type type (object, array, string etc.) + * start start position in JSON data string + * end end position in JSON data string + */ +typedef struct jsmntok { + jsmntype_t type; + int start; + int end; + int size; +#ifdef JSMN_PARENT_LINKS + int parent; +#endif +} jsmntok_t; + +/** + * JSON parser. Contains an array of token blocks available. Also stores + * the string being parsed now and current position in that string. + */ +typedef struct jsmn_parser { + unsigned int pos; /* offset in the JSON string */ + unsigned int toknext; /* next token to allocate */ + int toksuper; /* superior token node, e.g. parent object or array */ +} jsmn_parser; + +/** + * Create JSON parser over an array of tokens + */ +JSMN_API void jsmn_init(jsmn_parser *parser); + +/** + * Run JSON parser. It parses a JSON data string into and array of tokens, each + * describing + * a single JSON object. + */ +JSMN_API int jsmn_parse(jsmn_parser *parser, const char *js, const size_t len, + jsmntok_t *tokens, const unsigned int num_tokens); + +#ifndef JSMN_HEADER +/** + * Allocates a fresh unused token from the token pool. + */ +static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser, jsmntok_t *tokens, + const size_t num_tokens) { + jsmntok_t *tok; + if (parser->toknext >= num_tokens) { + return NULL; + } + tok = &tokens[parser->toknext++]; + tok->start = tok->end = -1; + tok->size = 0; +#ifdef JSMN_PARENT_LINKS + tok->parent = -1; +#endif + return tok; +} + +/** + * Fills token type and boundaries. + */ +static void jsmn_fill_token(jsmntok_t *token, const jsmntype_t type, + const int start, const int end) { + token->type = type; + token->start = start; + token->end = end; + token->size = 0; +} + +/** + * Fills next available token with JSON primitive. + */ +static int jsmn_parse_primitive(jsmn_parser *parser, const char *js, + const size_t len, jsmntok_t *tokens, + const size_t num_tokens) { + jsmntok_t *token; + int start; + + start = parser->pos; + + for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { + switch (js[parser->pos]) { +#ifndef JSMN_STRICT + /* In strict mode primitive must be followed by "," or "}" or "]" */ + case ':': +#endif + case '\t': + case '\r': + case '\n': + case ' ': + case ',': + case ']': + case '}': + goto found; + default: + /* to quiet a warning from gcc*/ + break; + } + if (js[parser->pos] < 32 || js[parser->pos] >= 127) { + parser->pos = start; + return JSMN_ERROR_INVAL; + } + } +#ifdef JSMN_STRICT + /* In strict mode primitive must be followed by a comma/object/array */ + parser->pos = start; + return JSMN_ERROR_PART; +#endif + +found: + if (tokens == NULL) { + parser->pos--; + return 0; + } + token = jsmn_alloc_token(parser, tokens, num_tokens); + if (token == NULL) { + parser->pos = start; + return JSMN_ERROR_NOMEM; + } + jsmn_fill_token(token, JSMN_PRIMITIVE, start, parser->pos); +#ifdef JSMN_PARENT_LINKS + token->parent = parser->toksuper; +#endif + parser->pos--; + return 0; +} + +/** + * Fills next token with JSON string. + */ +static int jsmn_parse_string(jsmn_parser *parser, const char *js, + const size_t len, jsmntok_t *tokens, + const size_t num_tokens) { + jsmntok_t *token; + + int start = parser->pos; + + parser->pos++; + + /* Skip starting quote */ + for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { + char c = js[parser->pos]; + + /* Quote: end of string */ + if (c == '\"') { + if (tokens == NULL) { + return 0; + } + token = jsmn_alloc_token(parser, tokens, num_tokens); + if (token == NULL) { + parser->pos = start; + return JSMN_ERROR_NOMEM; + } + jsmn_fill_token(token, JSMN_STRING, start + 1, parser->pos); +#ifdef JSMN_PARENT_LINKS + token->parent = parser->toksuper; +#endif + return 0; + } + + /* Backslash: Quoted symbol expected */ + if (c == '\\' && parser->pos + 1 < len) { + int i; + parser->pos++; + switch (js[parser->pos]) { + /* Allowed escaped symbols */ + case '\"': + case '/': + case '\\': + case 'b': + case 'f': + case 'r': + case 'n': + case 't': + break; + /* Allows escaped symbol \uXXXX */ + case 'u': + parser->pos++; + for (i = 0; i < 4 && parser->pos < len && js[parser->pos] != '\0'; + i++) { + /* If it isn't a hex character we have an error */ + if (!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */ + (js[parser->pos] >= 65 && js[parser->pos] <= 70) || /* A-F */ + (js[parser->pos] >= 97 && js[parser->pos] <= 102))) { /* a-f */ + parser->pos = start; + return JSMN_ERROR_INVAL; + } + parser->pos++; + } + parser->pos--; + break; + /* Unexpected symbol */ + default: + parser->pos = start; + return JSMN_ERROR_INVAL; + } + } + } + parser->pos = start; + return JSMN_ERROR_PART; +} + +/** + * Parse JSON string and fill tokens. + */ +JSMN_API int jsmn_parse(jsmn_parser *parser, const char *js, const size_t len, + jsmntok_t *tokens, const unsigned int num_tokens) { + int r; + int i; + jsmntok_t *token; + int count = parser->toknext; + + for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { + char c; + jsmntype_t type; + + c = js[parser->pos]; + switch (c) { + case '{': + case '[': + count++; + if (tokens == NULL) { + break; + } + token = jsmn_alloc_token(parser, tokens, num_tokens); + if (token == NULL) { + return JSMN_ERROR_NOMEM; + } + if (parser->toksuper != -1) { + jsmntok_t *t = &tokens[parser->toksuper]; +#ifdef JSMN_STRICT + /* In strict mode an object or array can't become a key */ + if (t->type == JSMN_OBJECT) { + return JSMN_ERROR_INVAL; + } +#endif + t->size++; +#ifdef JSMN_PARENT_LINKS + token->parent = parser->toksuper; +#endif + } + token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY); + token->start = parser->pos; + parser->toksuper = parser->toknext - 1; + break; + case '}': + case ']': + if (tokens == NULL) { + break; + } + type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY); +#ifdef JSMN_PARENT_LINKS + if (parser->toknext < 1) { + return JSMN_ERROR_INVAL; + } + token = &tokens[parser->toknext - 1]; + for (;;) { + if (token->start != -1 && token->end == -1) { + if (token->type != type) { + return JSMN_ERROR_INVAL; + } + token->end = parser->pos + 1; + parser->toksuper = token->parent; + break; + } + if (token->parent == -1) { + if (token->type != type || parser->toksuper == -1) { + return JSMN_ERROR_INVAL; + } + break; + } + token = &tokens[token->parent]; + } +#else + for (i = parser->toknext - 1; i >= 0; i--) { + token = &tokens[i]; + if (token->start != -1 && token->end == -1) { + if (token->type != type) { + return JSMN_ERROR_INVAL; + } + parser->toksuper = -1; + token->end = parser->pos + 1; + break; + } + } + /* Error if unmatched closing bracket */ + if (i == -1) { + return JSMN_ERROR_INVAL; + } + for (; i >= 0; i--) { + token = &tokens[i]; + if (token->start != -1 && token->end == -1) { + parser->toksuper = i; + break; + } + } +#endif + break; + case '\"': + r = jsmn_parse_string(parser, js, len, tokens, num_tokens); + if (r < 0) { + return r; + } + count++; + if (parser->toksuper != -1 && tokens != NULL) { + tokens[parser->toksuper].size++; + } + break; + case '\t': + case '\r': + case '\n': + case ' ': + break; + case ':': + parser->toksuper = parser->toknext - 1; + break; + case ',': + if (tokens != NULL && parser->toksuper != -1 && + tokens[parser->toksuper].type != JSMN_ARRAY && + tokens[parser->toksuper].type != JSMN_OBJECT) { +#ifdef JSMN_PARENT_LINKS + parser->toksuper = tokens[parser->toksuper].parent; +#else + for (i = parser->toknext - 1; i >= 0; i--) { + if (tokens[i].type == JSMN_ARRAY || tokens[i].type == JSMN_OBJECT) { + if (tokens[i].start != -1 && tokens[i].end == -1) { + parser->toksuper = i; + break; + } + } + } +#endif + } + break; +#ifdef JSMN_STRICT + /* In strict mode primitives are: numbers and booleans */ + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case 't': + case 'f': + case 'n': + /* And they must not be keys of the object */ + if (tokens != NULL && parser->toksuper != -1) { + const jsmntok_t *t = &tokens[parser->toksuper]; + if (t->type == JSMN_OBJECT || + (t->type == JSMN_STRING && t->size != 0)) { + return JSMN_ERROR_INVAL; + } + } +#else + /* In non-strict mode every unquoted value is a primitive */ + default: +#endif + r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens); + if (r < 0) { + return r; + } + count++; + if (parser->toksuper != -1 && tokens != NULL) { + tokens[parser->toksuper].size++; + } + break; + +#ifdef JSMN_STRICT + /* Unexpected char in strict mode */ + default: + return JSMN_ERROR_INVAL; +#endif + } + } + + if (tokens != NULL) { + for (i = parser->toknext - 1; i >= 0; i--) { + /* Unmatched opened object or array */ + if (tokens[i].start != -1 && tokens[i].end == -1) { + return JSMN_ERROR_PART; + } + } + } + + return count; +} + +/** + * Creates a new parser based over a given buffer with an array of tokens + * available. + */ +JSMN_API void jsmn_init(jsmn_parser *parser) { + parser->pos = 0; + parser->toknext = 0; + parser->toksuper = -1; +} + +#endif /* JSMN_HEADER */ + +#ifdef __cplusplus +} +#endif + +#endif /* JSMN_H */ diff --git a/tools/sdk/esp32/include/json_parser/upstream/jsmn/test/test.h b/tools/sdk/esp32/include/json_parser/upstream/jsmn/test/test.h new file mode 100644 index 00000000000..a1c0957a74a --- /dev/null +++ b/tools/sdk/esp32/include/json_parser/upstream/jsmn/test/test.h @@ -0,0 +1,31 @@ +#ifndef __TEST_H__ +#define __TEST_H__ + +static int test_passed = 0; +static int test_failed = 0; + +/* Terminate current test with error */ +#define fail() return __LINE__ + +/* Successful end of the test case */ +#define done() return 0 + +/* Check single condition */ +#define check(cond) \ + do { \ + if (!(cond)) \ + fail(); \ + } while (0) + +/* Test runner */ +static void test(int (*func)(void), const char *name) { + int r = func(); + if (r == 0) { + test_passed++; + } else { + test_failed++; + printf("FAILED: %s (at line %d)\n", name, r); + } +} + +#endif /* __TEST_H__ */ diff --git a/tools/sdk/esp32/include/json_parser/upstream/jsmn/test/testutil.h b/tools/sdk/esp32/include/json_parser/upstream/jsmn/test/testutil.h new file mode 100644 index 00000000000..bdee13934b1 --- /dev/null +++ b/tools/sdk/esp32/include/json_parser/upstream/jsmn/test/testutil.h @@ -0,0 +1,96 @@ +#ifndef __TEST_UTIL_H__ +#define __TEST_UTIL_H__ + +#include "../jsmn.h" + +static int vtokeq(const char *s, jsmntok_t *t, unsigned long numtok, + va_list ap) { + if (numtok > 0) { + unsigned long i; + int start, end, size; + jsmntype_t type; + char *value; + + size = -1; + value = NULL; + for (i = 0; i < numtok; i++) { + type = va_arg(ap, jsmntype_t); + if (type == JSMN_STRING) { + value = va_arg(ap, char *); + size = va_arg(ap, int); + start = end = -1; + } else if (type == JSMN_PRIMITIVE) { + value = va_arg(ap, char *); + start = end = size = -1; + } else { + start = va_arg(ap, int); + end = va_arg(ap, int); + size = va_arg(ap, int); + value = NULL; + } + if (t[i].type != type) { + printf("token %lu type is %d, not %d\n", i, t[i].type, type); + return 0; + } + if (start != -1 && end != -1) { + if (t[i].start != start) { + printf("token %lu start is %d, not %d\n", i, t[i].start, start); + return 0; + } + if (t[i].end != end) { + printf("token %lu end is %d, not %d\n", i, t[i].end, end); + return 0; + } + } + if (size != -1 && t[i].size != size) { + printf("token %lu size is %d, not %d\n", i, t[i].size, size); + return 0; + } + + if (s != NULL && value != NULL) { + const char *p = s + t[i].start; + if (strlen(value) != (unsigned long)(t[i].end - t[i].start) || + strncmp(p, value, t[i].end - t[i].start) != 0) { + printf("token %lu value is %.*s, not %s\n", i, t[i].end - t[i].start, + s + t[i].start, value); + return 0; + } + } + } + } + return 1; +} + +static int tokeq(const char *s, jsmntok_t *tokens, unsigned long numtok, ...) { + int ok; + va_list args; + va_start(args, numtok); + ok = vtokeq(s, tokens, numtok, args); + va_end(args); + return ok; +} + +static int parse(const char *s, int status, unsigned long numtok, ...) { + int r; + int ok = 1; + va_list args; + jsmn_parser p; + jsmntok_t *t = malloc(numtok * sizeof(jsmntok_t)); + + jsmn_init(&p); + r = jsmn_parse(&p, s, strlen(s), t, numtok); + if (r != status) { + printf("status is %d, not %d\n", r, status); + return 0; + } + + if (status >= 0) { + va_start(args, numtok); + ok = vtokeq(s, t, numtok, args); + va_end(args); + } + free(t); + return ok; +} + +#endif /* __TEST_UTIL_H__ */ diff --git a/tools/sdk/esp32/include/qrcode/include/qrcode.h b/tools/sdk/esp32/include/qrcode/include/qrcode.h index 94076ac51b6..27de85f5baa 100644 --- a/tools/sdk/esp32/include/qrcode/include/qrcode.h +++ b/tools/sdk/esp32/include/qrcode/include/qrcode.h @@ -26,6 +26,8 @@ extern "C" { * @attention 1. Can successfully encode a UTF-8 string of up to 2953 bytes or an alphanumeric * string of up to 4296 characters or any digit string of up to 7089 characters * + * @note This API is kept for backward compatibility + * * @param text string to encode into a QR Code. * * @return @@ -35,6 +37,86 @@ extern "C" { */ esp_err_t qrcode_display(const char *text); +/** + * @brief QR Code handle used by the display function + */ +typedef const uint8_t * esp_qrcode_handle_t; + +/** + * @brief QR Code configuration options + */ +typedef struct { + void (*display_func)(esp_qrcode_handle_t qrcode); /**< Function called for displaying the QR Code after encoding is complete */ + int max_qrcode_version; /**< Max QR Code Version to be used. Range: 2 - 40 */ + int qrcode_ecc_level; /**< Error Correction Level for QR Code */ +} esp_qrcode_config_t; + +/** + * @brief Error Correction Level in a QR Code Symbol + */ +enum { + ESP_QRCODE_ECC_LOW, /**< QR Code Error Tolerance of 7% */ + ESP_QRCODE_ECC_MED, /**< QR Code Error Tolerance of 15% */ + ESP_QRCODE_ECC_QUART, /**< QR Code Error Tolerance of 25% */ + ESP_QRCODE_ECC_HIGH /**< QR Code Error Tolerance of 30% */ +}; + +/** + * @brief Encodes the given string into a QR Code and calls the display function + * + * @attention 1. Can successfully encode a UTF-8 string of up to 2953 bytes or an alphanumeric + * string of up to 4296 characters or any digit string of up to 7089 characters + * + * @param cfg Configuration used for QR Code encoding. + * @param text String to encode into a QR Code. + * + * @return + * - ESP_OK: succeed + * - ESP_FAIL: Failed to encode string into a QR Code + * - ESP_ERR_NO_MEM: Failed to allocate buffer for given max_qrcode_version + */ +esp_err_t esp_qrcode_generate(esp_qrcode_config_t *cfg, const char *text); + +/** + * @brief Displays QR Code on the console + * + * @param qrcode QR Code handle used by the display function. + */ +void esp_qrcode_print_console(esp_qrcode_handle_t qrcode); + +/** + * @brief Returns the side length of the given QR Code + * + * @param qrcode QR Code handle used by the display function. + * + * @return + * - val[21, 177]: Side length of QR Code + */ +int esp_qrcode_get_size(esp_qrcode_handle_t qrcode); + +/** + * @brief Returns the Pixel value for the given coordinates + * False indicates White and True indicates Black + * + * @attention 1. Coordinates for top left corner are (x=0, y=0) + * @attention 2. For out of bound coordinates false (White) is returned + * + * @param qrcode QR Code handle used by the display function. + * @param x X-Coordinate of QR Code module + * @param y Y-Coordinate of QR Code module + * + * @return + * - true: (x, y) Pixel is Black + * - false: (x, y) Pixel is White + */ +bool esp_qrcode_get_module(esp_qrcode_handle_t qrcode, int x, int y); + +#define ESP_QRCODE_CONFIG_DEFAULT() (esp_qrcode_config_t) { \ + .display_func = esp_qrcode_print_console, \ + .max_qrcode_version = 10, \ + .qrcode_ecc_level = ESP_QRCODE_ECC_LOW, \ +} + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_common_events.h b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_common_events.h new file mode 100644 index 00000000000..62c4b208759 --- /dev/null +++ b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_common_events.h @@ -0,0 +1,43 @@ +// Copyright 2021 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#pragma once +#include +#include +#ifdef __cplusplus +extern "C" +{ +#endif + +/** ESP RainMaker Common Event Base */ +ESP_EVENT_DECLARE_BASE(RMAKER_COMMON_EVENT); + +typedef enum { + /** Node reboot has been triggered. The associated event data is the time in seconds + * (type: uint8_t) after which the node will reboot. Note that this time may not be + * accurate as the events are received asynchronously.*/ + RMAKER_EVENT_REBOOT, + /** Wi-Fi credentials reset. Triggered after calling esp_rmaker_wifi_reset() */ + RMAKER_EVENT_WIFI_RESET, + /** Node reset to factory defaults. Triggered after calling esp_rmaker_factory_reset() */ + RMAKER_EVENT_FACTORY_RESET, + /** Connected to MQTT Broker */ + RMAKER_MQTT_EVENT_CONNECTED, + /** Disconnected from MQTT Broker */ + RMAKER_MQTT_EVENT_DISCONNECTED, + /** MQTT message published successfully */ + RMAKER_MQTT_EVENT_PUBLISHED, +} esp_rmaker_mqtt_event_t; +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_factory.h b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_factory.h new file mode 100644 index 00000000000..9ef781b798b --- /dev/null +++ b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_factory.h @@ -0,0 +1,61 @@ +// Copyright 2021 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#pragma once +#include +#include +#include +#ifdef __cplusplus +extern "C" +{ +#endif + +/** Initialize Factory NVS + * + * This initializes the Factory NVS partition which will store data + * that should not be cleared even after a reset to factory. + * + * @return ESP_OK on success. + * @return error on failure. + */ +esp_err_t esp_rmaker_factory_init(void); + +/** Get value from factory NVS + * + * This will search for the specified key in the Factory NVS partition, + * allocate the required memory to hold it, copy the value and return + * the pointer to it. It is responsibility of the caller to free the + * memory when the value is no more required. + * + * @param[in] key The key of the value to be read from factory NVS. + * + * @return pointer to the value on success. + * @return NULL on failure. + */ +void *esp_rmaker_factory_get(const char *key); + +/** Set a value in factory NVS + * + * This will write the value for the specified key into factory NVS. + * + * @param[in] key The key for the value to be set in factory NVS. + * @param[in] data Pointer to the value. + * @param[in] len Length of the value. + * + * @return ESP_OK on success. + * @return error on failure. + */ +esp_err_t esp_rmaker_factory_set(const char *key, void *value, size_t len); +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_mqtt_glue.h b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_mqtt_glue.h new file mode 100644 index 00000000000..8a9e1ae649d --- /dev/null +++ b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_mqtt_glue.h @@ -0,0 +1,152 @@ +// Copyright 2021 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#pragma once +#include +#include +#include +#ifdef __cplusplus +extern "C" +{ +#endif + +#define RMAKER_MQTT_QOS0 0 +#define RMAKER_MQTT_QOS1 1 + +/** MQTT Connection parameters */ +typedef struct { + /** MQTT Host */ + char *mqtt_host; + /** Client ID */ + char *client_id; + /** Client Certificate in NULL terminated PEM format */ + char *client_cert; + /** Client Key in NULL terminated PEM format */ + char *client_key; + /** Server Certificate in NULL terminated PEM format */ + char *server_cert; +} esp_rmaker_mqtt_conn_params_t; + +/** MQTT Get Connection Parameters function prototype + * + * @return Pointer to \ref esp_rmaker_mqtt_conn_params_t on success. + * @return NULL on failure. + */ +typedef esp_rmaker_mqtt_conn_params_t *(*esp_rmaker_mqtt_get_conn_params_t)(void); + +/** MQTT Subscribe callback prototype + * + * @param[in] topic Topic on which the message was received + * @param[in] payload Data received in the message + * @param[in] payload_len Length of the data + * @param[in] priv_data The private data passed during subscription + */ +typedef void (*esp_rmaker_mqtt_subscribe_cb_t)(const char *topic, void *payload, size_t payload_len, void *priv_data); + +/** MQTT Init function prototype + * + * @param[in] conn_params The MQTT connection parameters. If NULL is passed, it should internally use the + * \ref esp_rmaker_mqtt_get_conn_params call if registered. + * + * @return ESP_OK on success. + * @return error in case of any error. + */ +typedef esp_err_t (*esp_rmaker_mqtt_init_t)(esp_rmaker_mqtt_conn_params_t *conn_params); + +/** MQTT Connect function prototype + * + * Starts the connection attempts to the MQTT broker. + * This should ideally be called after successful network connection. + * + * @return ESP_OK on success. + * @return error in case of any error. + */ +typedef esp_err_t (*esp_rmaker_mqtt_connect_t)(void); + +/** MQTT Disconnect function prototype + * + * Disconnects from the MQTT broker. + * + * @return ESP_OK on success. + * @return error in case of any error. + */ +typedef esp_err_t (*esp_rmaker_mqtt_disconnect_t)(void); + +/** MQTT Publish Message function prototype + * + * @param[in] topic The MQTT topic on which the message should be published. + * @param[in] data Data to be published. + * @param[in] data_len Length of the data. + * @param[in] qos Quality of service for the message. + * @param[out] msg_id If a non NULL pointer is passed, the id of the published message will be returned in this. + * + * @return ESP_OK on success. + * @return error in case of any error. + */ +typedef esp_err_t (*esp_rmaker_mqtt_publish_t)(const char *topic, void *data, size_t data_len, uint8_t qos, int *msg_id); + +/** MQTT Subscribe function prototype + * + * @param[in] topic The topic to be subscribed to. + * @param[in] cb The callback to be invoked when a message is received on the given topic. + * @param[in] qos Quality of service for the subscription. + * @param[in] priv_data Optional private data to be passed to the callback. + * + * @return ESP_OK on success. + * @return error in case of any error. + */ +typedef esp_err_t (*esp_rmaker_mqtt_subscribe_t)(const char *topic, esp_rmaker_mqtt_subscribe_cb_t cb, uint8_t qos, void *priv_data); + +/** MQTT Unsubscribe function prototype + * + * @param[in] topic Topic from which to unsubscribe. + * + * @return ESP_OK on success. + * @return error in case of any error. + */ +typedef esp_err_t (*esp_rmaker_mqtt_unsubscribe_t)(const char *topic); + +/** MQTT configuration */ +typedef struct { + /** Flag to indicate if the MQTT config setup is done */ + bool setup_done; + /** Pointer to the Get MQTT params function. */ + esp_rmaker_mqtt_get_conn_params_t get_conn_params; + /** Pointer to MQTT Init function. */ + esp_rmaker_mqtt_init_t init; + /** Pointer to MQTT Connect function. */ + esp_rmaker_mqtt_connect_t connect; + /** Pointer to MQTQ Disconnect function */ + esp_rmaker_mqtt_disconnect_t disconnect; + /** Pointer to MQTT Publish function */ + esp_rmaker_mqtt_publish_t publish; + /** Pointer to MQTT Subscribe function */ + esp_rmaker_mqtt_subscribe_t subscribe; + /** Pointer to MQTT Unsubscribe function */ + esp_rmaker_mqtt_unsubscribe_t unsubscribe; +} esp_rmaker_mqtt_config_t; + +/** Setup MQTT Glue + * + * This function initializes MQTT glue layer with all the default functions. + * + * @param[out] mqtt_config Pointer to an allocated MQTT configuration structure. + * + * @return ESP_OK on success. + * @return error in case of any error. + */ +esp_err_t esp_rmaker_mqtt_glue_setup(esp_rmaker_mqtt_config_t *mqtt_config); + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_utils.h b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_utils.h similarity index 65% rename from tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_utils.h rename to tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_utils.h index f506bf7cf6a..9a5ba16f0aa 100644 --- a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_utils.h +++ b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_utils.h @@ -1,4 +1,4 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD +// Copyright 2021 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ typedef struct esp_rmaker_time_config { sntp_sync_time_cb_t sync_time_cb; } esp_rmaker_time_config_t; -/** Reboot the chip after a delay +/** Reboot the device after a delay * * This API just starts a reboot timer and returns immediately. * The actual reboot is trigerred asynchronously in the timer callback. @@ -40,44 +40,54 @@ typedef struct esp_rmaker_time_config { * their operations (Eg. MQTT publish to indicate OTA success). The \ref RMAKER_EVENT_REBOOT * event is triggered when the reboot timer is started. * - * @param[in] seconds Time in seconds after which the chip should reboot. + * @param[in] seconds Time in seconds after which the device should reboot. * * @return ESP_OK on success. * @return error on failure. */ -esp_err_t esp_rmaker_reboot(uint8_t seconds); +esp_err_t esp_rmaker_reboot(int8_t seconds); -/** Reset Wi-Fi credentials and reboot +/** Reset Wi-Fi credentials and (optionally) reboot * - * This will reset just the Wi-Fi credentials and trigger a reboot. + * This will reset just the Wi-Fi credentials and (optionally) trigger a reboot. * This is useful when you want to keep all the entries in NVS memory * intact, but just change the Wi-Fi credentials. The \ref RMAKER_EVENT_WIFI_RESET - * event is triggered after the reset. + * event is triggered when this API is called. The actual reset will happen after a + * delay if reset_seconds is not zero. * - * @note This function internally calls esp_rmaker_reboot() and returns - * immediately. The reboot happens asynchronously. + * @note This reset and reboot operations will happen asynchronously depending + * on the values passed to the API. * - * @param[in] seconds Time in seconds after which the chip should reboot. + * @param[in] reset_seconds Time in seconds after which the reset should get triggered. + * This will help other modules take some actions before the device actually resets. + * If set to zero, the operation would be performed immediately. + * @param[in] reboot_seconds Time in seconds after which the device should reboot. If set + * to negative value, the device will not reboot at all. * * @return ESP_OK on success. * @return error on failure. */ -esp_err_t esp_rmaker_wifi_reset(uint8_t seconds); +esp_err_t esp_rmaker_wifi_reset(int8_t reset_seconds, int8_t reboot_seconds); /** Reset to factory defaults and reboot * - * This will clear entire NVS partition and trigger a reboot. - * The \ref RMAKER_EVENT_FACTORY_RESET event is triggered after the reset. + * This will clear entire NVS partition and (optionally) trigger a reboot. + * The \ref RMAKER_EVENT_FACTORY_RESET event is triggered when this API is called. + * The actual reset will happen after a delay if reset_seconds is not zero. * - * @note This function internally calls esp_rmaker_reboot() and returns. - * The reboot happens asynchronously. + * @note This reset and reboot operations will happen asynchronously depending + * on the values passed to the API. * - * @param[in] seconds Time in seconds after which the chip should reboot. + * @param[in] reset_seconds Time in seconds after which the reset should get triggered. + * This will help other modules take some actions before the device actually resets. + * If set to zero, the operation would be performed immediately. + * @param[in] reboot_seconds Time in seconds after which the device should reboot. If set + * to negative value, the device will not reboot at all. * * @return ESP_OK on success. * @return error on failure. */ -esp_err_t esp_rmaker_factory_reset(uint8_t seconds); +esp_err_t esp_rmaker_factory_reset(int8_t reset_seconds, int8_t reboot_seconds); /** Initialize time synchronization * @@ -142,16 +152,25 @@ esp_err_t esp_rmaker_time_set_timezone_posix(const char *tz_posix); */ esp_err_t esp_rmaker_time_set_timezone(const char *tz); -/** Enable Timezone Service +/** Get the current POSIX timezone * - * This enables the ESP RainMaker standard timezone service which can be used to set - * timezone, either in POSIX or location string format. Please refer the specifications - * for additional details. + * This fetches the current timezone in POSIX format, read from NVS. * - * @return ESP_OK on success - * @return error on failure + * @return Pointer to a NULL terminated POSIX timezone string on success. + * Freeing this is the responsibility of the caller. + * @return NULL on failure. + */ +char *esp_rmaker_time_get_timezone_posix(void); + +/** Get the current timezone + * + * This fetches the current timezone in POSIX format, read from NVS. + * + * @return Pointer to a NULL terminated timezone string on success. + * Freeing this is the responsibility of the caller. + * @return NULL on failure. */ -esp_err_t esp_rmaker_timezone_service_enable(void); +char *esp_rmaker_time_get_timezone(void); /** Get printable local time string * diff --git a/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_work_queue.h b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_work_queue.h new file mode 100644 index 00000000000..0e696d46848 --- /dev/null +++ b/tools/sdk/esp32/include/rmaker_common/include/esp_rmaker_work_queue.h @@ -0,0 +1,82 @@ +// Copyright 2021 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#pragma once +#include +#include +#include +#ifdef __cplusplus +extern "C" +{ +#endif +/** Prototype for ESP RainMaker Work Queue Function + * + * @param[in] priv_data The private data associated with the work function. + */ +typedef void (*esp_rmaker_work_fn_t)(void *priv_data); + +/** Initializes the Work Queue + * + * This initializes the work queue, which is basically a mechanism to run + * tasks in the context of a dedicated thread. You can start queueing tasks + * after this, but they will get executed only after calling + * esp_rmaker_work_queue_start(). + * + * @return ESP_OK on success. + * @return error in case of failure. + */ +esp_err_t esp_rmaker_work_queue_init(void); + +/** De-initialize the Work Queue + * + * This de-initializes the work queue. Note that the work queue needs to + * be stopped using esp_rmaker_work_queue_stop() before calling this. + * + * @return ESP_OK on success. + * @return error in case of failure. + */ +esp_err_t esp_rmaker_work_queue_deinit(void); + +/** Start the Work Queue + * + * This starts the Work Queue thread which then starts executing the tasks queued. + * + * @return ESP_OK on success. + * @return error in case of failure. + */ +esp_err_t esp_rmaker_work_queue_start(void); + +/** Stop the Work Queue + * + * This stops a running Work Queue. + * + * @return ESP_OK on success. + * @return error in case of failure. + */ +esp_err_t esp_rmaker_work_queue_stop(void); + +/** Queue execution of a function in the Work Queue's context + * + * This API queues a work function for execution in the Work Queue Task's context. + * + * @param[in] work_fn The Work function to be queued. + * @param[in] priv_data Private data to be passed to the work function. + * + * @return ESP_OK on success. + * @return error in case of failure. + */ +esp_err_t esp_rmaker_work_queue_add_task(esp_rmaker_work_fn_t work_fn, void *priv_data); + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32/include/soc/esp32/include/soc/uart_channel.h b/tools/sdk/esp32/include/soc/esp32/include/soc/uart_channel.h index 5b8dc56d5ae..89c6a8956cc 100644 --- a/tools/sdk/esp32/include/soc/esp32/include/soc/uart_channel.h +++ b/tools/sdk/esp32/include/soc/esp32/include/soc/uart_channel.h @@ -1,16 +1,10 @@ -// Copyright 2010-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +// This file defines GPIO lookup macros for available UART IO_MUX pins on ESP32. #ifndef _SOC_UART_CHANNEL_H #define _SOC_UART_CHANNEL_H diff --git a/tools/sdk/esp32/ld/esp32.rom.newlib-funcs.ld b/tools/sdk/esp32/ld/esp32.rom.newlib-funcs.ld index d38e4452749..79d5c5be0d8 100644 --- a/tools/sdk/esp32/ld/esp32.rom.newlib-funcs.ld +++ b/tools/sdk/esp32/ld/esp32.rom.newlib-funcs.ld @@ -43,7 +43,6 @@ _getenv_r = 0x40001fbc; isalnum = 0x40000f04; isalpha = 0x40000f18; isascii = 0x4000c20c; -_isatty_r = 0x40000ea0; isblank = 0x40000f2c; iscntrl = 0x40000f50; isdigit = 0x40000f64; @@ -77,14 +76,11 @@ __sfmoreglue = 0x40001dc8; __sfp = 0x40001e90; __sfp_lock_acquire = 0x40001e08; __sfp_lock_release = 0x40001e14; -__sfvwrite_r = 0x4005893c; __sinit = 0x40001e38; __sinit_lock_acquire = 0x40001e20; __sinit_lock_release = 0x40001e2c; -__smakebuf_r = 0x40059108; srand = 0x40001004; __sread = 0x40001118; -__srefill_r = 0x400593d4; __sseek = 0x40001184; strcasecmp = 0x400011cc; strcasestr = 0x40001210; @@ -122,7 +118,6 @@ __submore = 0x40058f3c; __swbuf = 0x40058cb4; __swbuf_r = 0x40058bec; __swrite = 0x40001150; -__swsetup_r = 0x40058cc8; toascii = 0x4000c720; tolower = 0x40001868; toupper = 0x40001884; diff --git a/tools/sdk/esp32/ld/esp32.rom.newlib-time.ld b/tools/sdk/esp32/ld/esp32.rom.newlib-time.ld index f6b222eb10c..50ec64882d7 100644 --- a/tools/sdk/esp32/ld/esp32.rom.newlib-time.ld +++ b/tools/sdk/esp32/ld/esp32.rom.newlib-time.ld @@ -27,3 +27,12 @@ _timezone = 0x3ffae0a0; _tzname = 0x3ffae030; _daylight = 0x3ffae0a4; __month_lengths = 0x3ff9609c; + +/* These functions don't use time_t, but use other structures which include time_t. + * For example, 'struct stat' contains time_t. + */ +_isatty_r = 0x40000ea0; +__sfvwrite_r = 0x4005893c; +__smakebuf_r = 0x40059108; +__srefill_r = 0x400593d4; +__swsetup_r = 0x40058cc8; diff --git a/tools/sdk/esp32/ld/libbtdm_app.a b/tools/sdk/esp32/ld/libbtdm_app.a index 1d2a2c14192..a6fb5cf8efa 100644 Binary files a/tools/sdk/esp32/ld/libbtdm_app.a and b/tools/sdk/esp32/ld/libbtdm_app.a differ diff --git a/tools/sdk/esp32/ld/libc_speech_features.a b/tools/sdk/esp32/ld/libc_speech_features.a new file mode 100644 index 00000000000..0baefdea487 Binary files /dev/null and b/tools/sdk/esp32/ld/libc_speech_features.a differ diff --git a/tools/sdk/esp32/ld/libcustomized_word_wn5.a b/tools/sdk/esp32/ld/libcustomized_word_wn5.a new file mode 100644 index 00000000000..7b85a4ff5c2 Binary files /dev/null and b/tools/sdk/esp32/ld/libcustomized_word_wn5.a differ diff --git a/tools/sdk/esp32/ld/libdl_lib.a b/tools/sdk/esp32/ld/libdl_lib.a new file mode 100644 index 00000000000..8da69ad24f8 Binary files /dev/null and b/tools/sdk/esp32/ld/libdl_lib.a differ diff --git a/tools/sdk/esp32/ld/libesp_tts_chinese.a b/tools/sdk/esp32/ld/libesp_tts_chinese.a new file mode 100644 index 00000000000..25dbed6cddf Binary files /dev/null and b/tools/sdk/esp32/ld/libesp_tts_chinese.a differ diff --git a/tools/sdk/esp32/ld/libhilexin_wn5.a b/tools/sdk/esp32/ld/libhilexin_wn5.a new file mode 100644 index 00000000000..1690cdf9f15 Binary files /dev/null and b/tools/sdk/esp32/ld/libhilexin_wn5.a differ diff --git a/tools/sdk/esp32/ld/libhilexin_wn5X2.a b/tools/sdk/esp32/ld/libhilexin_wn5X2.a new file mode 100644 index 00000000000..b2cb3c19045 Binary files /dev/null and b/tools/sdk/esp32/ld/libhilexin_wn5X2.a differ diff --git a/tools/sdk/esp32/ld/libhilexin_wn5X3.a b/tools/sdk/esp32/ld/libhilexin_wn5X3.a new file mode 100644 index 00000000000..fa1f5e7ac45 Binary files /dev/null and b/tools/sdk/esp32/ld/libhilexin_wn5X3.a differ diff --git a/tools/sdk/esp32/ld/libmultinet2_ch.a b/tools/sdk/esp32/ld/libmultinet2_ch.a new file mode 100644 index 00000000000..70664fca4b2 Binary files /dev/null and b/tools/sdk/esp32/ld/libmultinet2_ch.a differ diff --git a/tools/sdk/esp32/ld/libnihaoxiaoxin_wn5X3.a b/tools/sdk/esp32/ld/libnihaoxiaoxin_wn5X3.a new file mode 100644 index 00000000000..1ab173b7027 Binary files /dev/null and b/tools/sdk/esp32/ld/libnihaoxiaoxin_wn5X3.a differ diff --git a/tools/sdk/esp32/ld/libnihaoxiaozhi_wn5.a b/tools/sdk/esp32/ld/libnihaoxiaozhi_wn5.a new file mode 100644 index 00000000000..0e207efcbed Binary files /dev/null and b/tools/sdk/esp32/ld/libnihaoxiaozhi_wn5.a differ diff --git a/tools/sdk/esp32/ld/libnihaoxiaozhi_wn5X2.a b/tools/sdk/esp32/ld/libnihaoxiaozhi_wn5X2.a new file mode 100644 index 00000000000..e6edeb86d45 Binary files /dev/null and b/tools/sdk/esp32/ld/libnihaoxiaozhi_wn5X2.a differ diff --git a/tools/sdk/esp32/ld/libnihaoxiaozhi_wn5X3.a b/tools/sdk/esp32/ld/libnihaoxiaozhi_wn5X3.a new file mode 100644 index 00000000000..fe28e3ef0f7 Binary files /dev/null and b/tools/sdk/esp32/ld/libnihaoxiaozhi_wn5X3.a differ diff --git a/tools/sdk/esp32/ld/libvoice_set_xiaole.a b/tools/sdk/esp32/ld/libvoice_set_xiaole.a new file mode 100644 index 00000000000..f0b6820f301 Binary files /dev/null and b/tools/sdk/esp32/ld/libvoice_set_xiaole.a differ diff --git a/tools/sdk/esp32/lib/libapp_trace.a b/tools/sdk/esp32/lib/libapp_trace.a index eed6e08fbe9..8cf628938e2 100644 Binary files a/tools/sdk/esp32/lib/libapp_trace.a and b/tools/sdk/esp32/lib/libapp_trace.a differ diff --git a/tools/sdk/esp32/lib/libapp_update.a b/tools/sdk/esp32/lib/libapp_update.a index 13de44c8372..23ac4fe8093 100644 Binary files a/tools/sdk/esp32/lib/libapp_update.a and b/tools/sdk/esp32/lib/libapp_update.a differ diff --git a/tools/sdk/esp32/lib/libasio.a b/tools/sdk/esp32/lib/libasio.a index a5aad32a4ab..c4526279284 100644 Binary files a/tools/sdk/esp32/lib/libasio.a and b/tools/sdk/esp32/lib/libasio.a differ diff --git a/tools/sdk/esp32/lib/libbt.a b/tools/sdk/esp32/lib/libbt.a index f7a00acc30c..87ccb4239a7 100644 Binary files a/tools/sdk/esp32/lib/libbt.a and b/tools/sdk/esp32/lib/libbt.a differ diff --git a/tools/sdk/esp32/lib/libbutton.a b/tools/sdk/esp32/lib/libbutton.a index be633cea952..c39c2a162a0 100644 Binary files a/tools/sdk/esp32/lib/libbutton.a and b/tools/sdk/esp32/lib/libbutton.a differ diff --git a/tools/sdk/esp32/lib/libcbor.a b/tools/sdk/esp32/lib/libcbor.a index 35de0552d72..b7bb70f9c5d 100644 Binary files a/tools/sdk/esp32/lib/libcbor.a and b/tools/sdk/esp32/lib/libcbor.a differ diff --git a/tools/sdk/esp32/lib/libcmock.a b/tools/sdk/esp32/lib/libcmock.a index d6340e6abab..e4d9a234cc8 100644 Binary files a/tools/sdk/esp32/lib/libcmock.a and b/tools/sdk/esp32/lib/libcmock.a differ diff --git a/tools/sdk/esp32/lib/libcoap.a b/tools/sdk/esp32/lib/libcoap.a index be5464f4ffb..1fbf8163abc 100644 Binary files a/tools/sdk/esp32/lib/libcoap.a and b/tools/sdk/esp32/lib/libcoap.a differ diff --git a/tools/sdk/esp32/lib/libcoexist.a b/tools/sdk/esp32/lib/libcoexist.a index 93bbfb351b1..3e3e029cbc8 100644 Binary files a/tools/sdk/esp32/lib/libcoexist.a and b/tools/sdk/esp32/lib/libcoexist.a differ diff --git a/tools/sdk/esp32/lib/libconsole.a b/tools/sdk/esp32/lib/libconsole.a index d5cbc1b3196..c6737934ea9 100644 Binary files a/tools/sdk/esp32/lib/libconsole.a and b/tools/sdk/esp32/lib/libconsole.a differ diff --git a/tools/sdk/esp32/lib/libcore.a b/tools/sdk/esp32/lib/libcore.a index 5e8bf3dea2a..038e087266a 100644 Binary files a/tools/sdk/esp32/lib/libcore.a and b/tools/sdk/esp32/lib/libcore.a differ diff --git a/tools/sdk/esp32/lib/libcxx.a b/tools/sdk/esp32/lib/libcxx.a index b2adef4862e..16b09948e39 100644 Binary files a/tools/sdk/esp32/lib/libcxx.a and b/tools/sdk/esp32/lib/libcxx.a differ diff --git a/tools/sdk/esp32/lib/libdriver.a b/tools/sdk/esp32/lib/libdriver.a index 11c33ee39fd..186cd096317 100644 Binary files a/tools/sdk/esp32/lib/libdriver.a and b/tools/sdk/esp32/lib/libdriver.a differ diff --git a/tools/sdk/esp32/lib/libefuse.a b/tools/sdk/esp32/lib/libefuse.a index 984566c6d90..3a65e3bd314 100644 Binary files a/tools/sdk/esp32/lib/libefuse.a and b/tools/sdk/esp32/lib/libefuse.a differ diff --git a/tools/sdk/esp32/lib/libesp-dsp.a b/tools/sdk/esp32/lib/libesp-dsp.a index fd7edfa4142..7f32401aac7 100644 Binary files a/tools/sdk/esp32/lib/libesp-dsp.a and b/tools/sdk/esp32/lib/libesp-dsp.a differ diff --git a/tools/sdk/esp32/lib/libesp-sr.a b/tools/sdk/esp32/lib/libesp-sr.a new file mode 100644 index 00000000000..bc3931e24b4 Binary files /dev/null and b/tools/sdk/esp32/lib/libesp-sr.a differ diff --git a/tools/sdk/esp32/lib/libesp-tls.a b/tools/sdk/esp32/lib/libesp-tls.a index 307fe94847d..170540c41f9 100644 Binary files a/tools/sdk/esp32/lib/libesp-tls.a and b/tools/sdk/esp32/lib/libesp-tls.a differ diff --git a/tools/sdk/esp32/lib/libesp32-camera.a b/tools/sdk/esp32/lib/libesp32-camera.a index 627125559e5..e2922e326ca 100644 Binary files a/tools/sdk/esp32/lib/libesp32-camera.a and b/tools/sdk/esp32/lib/libesp32-camera.a differ diff --git a/tools/sdk/esp32/lib/libesp_adc_cal.a b/tools/sdk/esp32/lib/libesp_adc_cal.a index a1bc84f9926..0f0e6fd759e 100644 Binary files a/tools/sdk/esp32/lib/libesp_adc_cal.a and b/tools/sdk/esp32/lib/libesp_adc_cal.a differ diff --git a/tools/sdk/esp32/lib/libesp_audio_front_end.a b/tools/sdk/esp32/lib/libesp_audio_front_end.a new file mode 100644 index 00000000000..8e68bed696b Binary files /dev/null and b/tools/sdk/esp32/lib/libesp_audio_front_end.a differ diff --git a/tools/sdk/esp32/lib/libesp_audio_processor.a b/tools/sdk/esp32/lib/libesp_audio_processor.a new file mode 100644 index 00000000000..df49110effe Binary files /dev/null and b/tools/sdk/esp32/lib/libesp_audio_processor.a differ diff --git a/tools/sdk/esp32/lib/libesp_common.a b/tools/sdk/esp32/lib/libesp_common.a index e900d116e81..954f48ea4fd 100644 Binary files a/tools/sdk/esp32/lib/libesp_common.a and b/tools/sdk/esp32/lib/libesp_common.a differ diff --git a/tools/sdk/esp32/lib/libesp_eth.a b/tools/sdk/esp32/lib/libesp_eth.a index 8d6a9308066..4fbfc3ad1f1 100644 Binary files a/tools/sdk/esp32/lib/libesp_eth.a and b/tools/sdk/esp32/lib/libesp_eth.a differ diff --git a/tools/sdk/esp32/lib/libesp_event.a b/tools/sdk/esp32/lib/libesp_event.a index 612be14c17e..b06fd805946 100644 Binary files a/tools/sdk/esp32/lib/libesp_event.a and b/tools/sdk/esp32/lib/libesp_event.a differ diff --git a/tools/sdk/esp32/lib/libesp_gdbstub.a b/tools/sdk/esp32/lib/libesp_gdbstub.a index 13700c98808..401e06ef32a 100644 Binary files a/tools/sdk/esp32/lib/libesp_gdbstub.a and b/tools/sdk/esp32/lib/libesp_gdbstub.a differ diff --git a/tools/sdk/esp32/lib/libesp_hid.a b/tools/sdk/esp32/lib/libesp_hid.a index 811f2a798bc..08d3f4baefc 100644 Binary files a/tools/sdk/esp32/lib/libesp_hid.a and b/tools/sdk/esp32/lib/libesp_hid.a differ diff --git a/tools/sdk/esp32/lib/libesp_http_client.a b/tools/sdk/esp32/lib/libesp_http_client.a index 6b9776b9613..46dcdb139a9 100644 Binary files a/tools/sdk/esp32/lib/libesp_http_client.a and b/tools/sdk/esp32/lib/libesp_http_client.a differ diff --git a/tools/sdk/esp32/lib/libesp_http_server.a b/tools/sdk/esp32/lib/libesp_http_server.a index 500a7da0cd1..5eb1a006b73 100644 Binary files a/tools/sdk/esp32/lib/libesp_http_server.a and b/tools/sdk/esp32/lib/libesp_http_server.a differ diff --git a/tools/sdk/esp32/lib/libesp_https_ota.a b/tools/sdk/esp32/lib/libesp_https_ota.a index 42549539473..97243532dbe 100644 Binary files a/tools/sdk/esp32/lib/libesp_https_ota.a and b/tools/sdk/esp32/lib/libesp_https_ota.a differ diff --git a/tools/sdk/esp32/lib/libesp_ipc.a b/tools/sdk/esp32/lib/libesp_ipc.a index 7d57a6af71a..7196bc05990 100644 Binary files a/tools/sdk/esp32/lib/libesp_ipc.a and b/tools/sdk/esp32/lib/libesp_ipc.a differ diff --git a/tools/sdk/esp32/lib/libesp_lcd.a b/tools/sdk/esp32/lib/libesp_lcd.a index aeb6e212ca7..9bfd4135dbe 100644 Binary files a/tools/sdk/esp32/lib/libesp_lcd.a and b/tools/sdk/esp32/lib/libesp_lcd.a differ diff --git a/tools/sdk/esp32/lib/libesp_littlefs.a b/tools/sdk/esp32/lib/libesp_littlefs.a index 6e24a92b8df..812adc70bc3 100644 Binary files a/tools/sdk/esp32/lib/libesp_littlefs.a and b/tools/sdk/esp32/lib/libesp_littlefs.a differ diff --git a/tools/sdk/esp32/lib/libesp_local_ctrl.a b/tools/sdk/esp32/lib/libesp_local_ctrl.a index 83f12b00bde..705625c0f52 100644 Binary files a/tools/sdk/esp32/lib/libesp_local_ctrl.a and b/tools/sdk/esp32/lib/libesp_local_ctrl.a differ diff --git a/tools/sdk/esp32/lib/libesp_netif.a b/tools/sdk/esp32/lib/libesp_netif.a index 5db0785c0d3..3f748f67455 100644 Binary files a/tools/sdk/esp32/lib/libesp_netif.a and b/tools/sdk/esp32/lib/libesp_netif.a differ diff --git a/tools/sdk/esp32/lib/libesp_phy.a b/tools/sdk/esp32/lib/libesp_phy.a index af5c608e4b0..769a680dc3f 100644 Binary files a/tools/sdk/esp32/lib/libesp_phy.a and b/tools/sdk/esp32/lib/libesp_phy.a differ diff --git a/tools/sdk/esp32/lib/libesp_pm.a b/tools/sdk/esp32/lib/libesp_pm.a index 1805d07af7d..19d6b95dc44 100644 Binary files a/tools/sdk/esp32/lib/libesp_pm.a and b/tools/sdk/esp32/lib/libesp_pm.a differ diff --git a/tools/sdk/esp32/lib/libesp_rainmaker.a b/tools/sdk/esp32/lib/libesp_rainmaker.a index f03404d8e23..922a157141d 100644 Binary files a/tools/sdk/esp32/lib/libesp_rainmaker.a and b/tools/sdk/esp32/lib/libesp_rainmaker.a differ diff --git a/tools/sdk/esp32/lib/libesp_ringbuf.a b/tools/sdk/esp32/lib/libesp_ringbuf.a index db76ee62524..3ce1f4c4a75 100644 Binary files a/tools/sdk/esp32/lib/libesp_ringbuf.a and b/tools/sdk/esp32/lib/libesp_ringbuf.a differ diff --git a/tools/sdk/esp32/lib/libesp_rom.a b/tools/sdk/esp32/lib/libesp_rom.a index 9e41fca2559..e090d78cff5 100644 Binary files a/tools/sdk/esp32/lib/libesp_rom.a and b/tools/sdk/esp32/lib/libesp_rom.a differ diff --git a/tools/sdk/esp32/lib/libesp_schedule.a b/tools/sdk/esp32/lib/libesp_schedule.a index ba702da53d3..b581c2c9168 100644 Binary files a/tools/sdk/esp32/lib/libesp_schedule.a and b/tools/sdk/esp32/lib/libesp_schedule.a differ diff --git a/tools/sdk/esp32/lib/libesp_serial_slave_link.a b/tools/sdk/esp32/lib/libesp_serial_slave_link.a index 8d35ca62334..ad0f1f928c4 100644 Binary files a/tools/sdk/esp32/lib/libesp_serial_slave_link.a and b/tools/sdk/esp32/lib/libesp_serial_slave_link.a differ diff --git a/tools/sdk/esp32/lib/libesp_timer.a b/tools/sdk/esp32/lib/libesp_timer.a index 2211d6902a7..7c574db477c 100644 Binary files a/tools/sdk/esp32/lib/libesp_timer.a and b/tools/sdk/esp32/lib/libesp_timer.a differ diff --git a/tools/sdk/esp32/lib/libesp_websocket_client.a b/tools/sdk/esp32/lib/libesp_websocket_client.a index 8148c0a562e..f22dcbf423a 100644 Binary files a/tools/sdk/esp32/lib/libesp_websocket_client.a and b/tools/sdk/esp32/lib/libesp_websocket_client.a differ diff --git a/tools/sdk/esp32/lib/libesp_wifi.a b/tools/sdk/esp32/lib/libesp_wifi.a index dad9269f0ce..211fd6b5f3a 100644 Binary files a/tools/sdk/esp32/lib/libesp_wifi.a and b/tools/sdk/esp32/lib/libesp_wifi.a differ diff --git a/tools/sdk/esp32/lib/libespcoredump.a b/tools/sdk/esp32/lib/libespcoredump.a index 34a6359a59a..c07576d06f9 100644 Binary files a/tools/sdk/esp32/lib/libespcoredump.a and b/tools/sdk/esp32/lib/libespcoredump.a differ diff --git a/tools/sdk/esp32/lib/libespnow.a b/tools/sdk/esp32/lib/libespnow.a index ce45cbe50bc..a2dae078755 100644 Binary files a/tools/sdk/esp32/lib/libespnow.a and b/tools/sdk/esp32/lib/libespnow.a differ diff --git a/tools/sdk/esp32/lib/libexpat.a b/tools/sdk/esp32/lib/libexpat.a index 12d9b6f043f..f77367f3cb1 100644 Binary files a/tools/sdk/esp32/lib/libexpat.a and b/tools/sdk/esp32/lib/libexpat.a differ diff --git a/tools/sdk/esp32/lib/libfatfs.a b/tools/sdk/esp32/lib/libfatfs.a index 2c8d66dcb43..737d6a5e967 100644 Binary files a/tools/sdk/esp32/lib/libfatfs.a and b/tools/sdk/esp32/lib/libfatfs.a differ diff --git a/tools/sdk/esp32/lib/libfb_gfx.a b/tools/sdk/esp32/lib/libfb_gfx.a index 43ff2d15377..32f8a452d87 100644 Binary files a/tools/sdk/esp32/lib/libfb_gfx.a and b/tools/sdk/esp32/lib/libfb_gfx.a differ diff --git a/tools/sdk/esp32/lib/libfreemodbus.a b/tools/sdk/esp32/lib/libfreemodbus.a index 76de6eb9062..a0e1946e5cd 100644 Binary files a/tools/sdk/esp32/lib/libfreemodbus.a and b/tools/sdk/esp32/lib/libfreemodbus.a differ diff --git a/tools/sdk/esp32/lib/libhal.a b/tools/sdk/esp32/lib/libhal.a index ce9dd078f88..c977c9a1080 100644 Binary files a/tools/sdk/esp32/lib/libhal.a and b/tools/sdk/esp32/lib/libhal.a differ diff --git a/tools/sdk/esp32/lib/libheap.a b/tools/sdk/esp32/lib/libheap.a index d1cd98af59a..24e621a3ec5 100644 Binary files a/tools/sdk/esp32/lib/libheap.a and b/tools/sdk/esp32/lib/libheap.a differ diff --git a/tools/sdk/esp32/lib/libjsmn.a b/tools/sdk/esp32/lib/libjsmn.a index f5dc3b0dc10..3b6973e1c1a 100644 Binary files a/tools/sdk/esp32/lib/libjsmn.a and b/tools/sdk/esp32/lib/libjsmn.a differ diff --git a/tools/sdk/esp32/lib/libjson.a b/tools/sdk/esp32/lib/libjson.a index f44f0158612..173f7c0b77f 100644 Binary files a/tools/sdk/esp32/lib/libjson.a and b/tools/sdk/esp32/lib/libjson.a differ diff --git a/tools/sdk/esp32/lib/libjson_generator.a b/tools/sdk/esp32/lib/libjson_generator.a index 49d03cb8b9e..6ac666e93a9 100644 Binary files a/tools/sdk/esp32/lib/libjson_generator.a and b/tools/sdk/esp32/lib/libjson_generator.a differ diff --git a/tools/sdk/esp32/lib/libjson_parser.a b/tools/sdk/esp32/lib/libjson_parser.a index 7e4712b0111..a60153c6107 100644 Binary files a/tools/sdk/esp32/lib/libjson_parser.a and b/tools/sdk/esp32/lib/libjson_parser.a differ diff --git a/tools/sdk/esp32/lib/liblibsodium.a b/tools/sdk/esp32/lib/liblibsodium.a index a59132c9210..df7ec00a4d6 100644 Binary files a/tools/sdk/esp32/lib/liblibsodium.a and b/tools/sdk/esp32/lib/liblibsodium.a differ diff --git a/tools/sdk/esp32/lib/liblog.a b/tools/sdk/esp32/lib/liblog.a index 06d626d3e7d..7d031f2451b 100644 Binary files a/tools/sdk/esp32/lib/liblog.a and b/tools/sdk/esp32/lib/liblog.a differ diff --git a/tools/sdk/esp32/lib/liblwip.a b/tools/sdk/esp32/lib/liblwip.a index 4480b060345..d3b75a29e00 100644 Binary files a/tools/sdk/esp32/lib/liblwip.a and b/tools/sdk/esp32/lib/liblwip.a differ diff --git a/tools/sdk/esp32/lib/libmbedcrypto.a b/tools/sdk/esp32/lib/libmbedcrypto.a index 7694758df60..3ceed1e5423 100644 Binary files a/tools/sdk/esp32/lib/libmbedcrypto.a and b/tools/sdk/esp32/lib/libmbedcrypto.a differ diff --git a/tools/sdk/esp32/lib/libmbedtls.a b/tools/sdk/esp32/lib/libmbedtls.a index 09002109ceb..e7aeff5576d 100644 Binary files a/tools/sdk/esp32/lib/libmbedtls.a and b/tools/sdk/esp32/lib/libmbedtls.a differ diff --git a/tools/sdk/esp32/lib/libmbedx509.a b/tools/sdk/esp32/lib/libmbedx509.a index 3956852d446..1df3448c5d3 100644 Binary files a/tools/sdk/esp32/lib/libmbedx509.a and b/tools/sdk/esp32/lib/libmbedx509.a differ diff --git a/tools/sdk/esp32/lib/libmdns.a b/tools/sdk/esp32/lib/libmdns.a index 9e990c7c552..4da820b0e6b 100644 Binary files a/tools/sdk/esp32/lib/libmdns.a and b/tools/sdk/esp32/lib/libmdns.a differ diff --git a/tools/sdk/esp32/lib/libmesh.a b/tools/sdk/esp32/lib/libmesh.a index 7fd100a6ced..60b26264993 100644 Binary files a/tools/sdk/esp32/lib/libmesh.a and b/tools/sdk/esp32/lib/libmesh.a differ diff --git a/tools/sdk/esp32/lib/libmqtt.a b/tools/sdk/esp32/lib/libmqtt.a index b4ff2b6696b..2656bde3c65 100644 Binary files a/tools/sdk/esp32/lib/libmqtt.a and b/tools/sdk/esp32/lib/libmqtt.a differ diff --git a/tools/sdk/esp32/lib/libmultinet.a b/tools/sdk/esp32/lib/libmultinet.a new file mode 100644 index 00000000000..b67af4dcaaf Binary files /dev/null and b/tools/sdk/esp32/lib/libmultinet.a differ diff --git a/tools/sdk/esp32/lib/libnet80211.a b/tools/sdk/esp32/lib/libnet80211.a index 27dc68a2fd5..1836c1c1cf2 100644 Binary files a/tools/sdk/esp32/lib/libnet80211.a and b/tools/sdk/esp32/lib/libnet80211.a differ diff --git a/tools/sdk/esp32/lib/libnewlib.a b/tools/sdk/esp32/lib/libnewlib.a index 03f38140c3b..53b5196bd01 100644 Binary files a/tools/sdk/esp32/lib/libnewlib.a and b/tools/sdk/esp32/lib/libnewlib.a differ diff --git a/tools/sdk/esp32/lib/libnghttp.a b/tools/sdk/esp32/lib/libnghttp.a index ec5f5fbe18e..be83b83ee22 100644 Binary files a/tools/sdk/esp32/lib/libnghttp.a and b/tools/sdk/esp32/lib/libnghttp.a differ diff --git a/tools/sdk/esp32/lib/libnvs_flash.a b/tools/sdk/esp32/lib/libnvs_flash.a index ccee9d490db..7d1f1e44728 100644 Binary files a/tools/sdk/esp32/lib/libnvs_flash.a and b/tools/sdk/esp32/lib/libnvs_flash.a differ diff --git a/tools/sdk/esp32/lib/libopenssl.a b/tools/sdk/esp32/lib/libopenssl.a index 112c3eaef53..2e8ee4973bf 100644 Binary files a/tools/sdk/esp32/lib/libopenssl.a and b/tools/sdk/esp32/lib/libopenssl.a differ diff --git a/tools/sdk/esp32/lib/libperfmon.a b/tools/sdk/esp32/lib/libperfmon.a index 288bdc1f126..88ec9ccf8d5 100644 Binary files a/tools/sdk/esp32/lib/libperfmon.a and b/tools/sdk/esp32/lib/libperfmon.a differ diff --git a/tools/sdk/esp32/lib/libpp.a b/tools/sdk/esp32/lib/libpp.a index 0c99edfb4d9..104d285c59b 100644 Binary files a/tools/sdk/esp32/lib/libpp.a and b/tools/sdk/esp32/lib/libpp.a differ diff --git a/tools/sdk/esp32/lib/libprotobuf-c.a b/tools/sdk/esp32/lib/libprotobuf-c.a index a24f8939cb4..8ab5421a518 100644 Binary files a/tools/sdk/esp32/lib/libprotobuf-c.a and b/tools/sdk/esp32/lib/libprotobuf-c.a differ diff --git a/tools/sdk/esp32/lib/libprotocomm.a b/tools/sdk/esp32/lib/libprotocomm.a index 7a43b14c261..79380351c34 100644 Binary files a/tools/sdk/esp32/lib/libprotocomm.a and b/tools/sdk/esp32/lib/libprotocomm.a differ diff --git a/tools/sdk/esp32/lib/libpthread.a b/tools/sdk/esp32/lib/libpthread.a index 2499ce72706..f56086aba3e 100644 Binary files a/tools/sdk/esp32/lib/libpthread.a and b/tools/sdk/esp32/lib/libpthread.a differ diff --git a/tools/sdk/esp32/lib/libqrcode.a b/tools/sdk/esp32/lib/libqrcode.a index 34898d72be1..46f4f91b7b1 100644 Binary files a/tools/sdk/esp32/lib/libqrcode.a and b/tools/sdk/esp32/lib/libqrcode.a differ diff --git a/tools/sdk/esp32/lib/librmaker_common.a b/tools/sdk/esp32/lib/librmaker_common.a new file mode 100644 index 00000000000..29ac8b00306 Binary files /dev/null and b/tools/sdk/esp32/lib/librmaker_common.a differ diff --git a/tools/sdk/esp32/lib/libsdmmc.a b/tools/sdk/esp32/lib/libsdmmc.a index 919d7551cc8..06396472bc5 100644 Binary files a/tools/sdk/esp32/lib/libsdmmc.a and b/tools/sdk/esp32/lib/libsdmmc.a differ diff --git a/tools/sdk/esp32/lib/libsmartconfig.a b/tools/sdk/esp32/lib/libsmartconfig.a index 63a3c36c9d4..5af51c0d9e4 100644 Binary files a/tools/sdk/esp32/lib/libsmartconfig.a and b/tools/sdk/esp32/lib/libsmartconfig.a differ diff --git a/tools/sdk/esp32/lib/libsoc.a b/tools/sdk/esp32/lib/libsoc.a index aede55d13ee..38c920ac0dc 100644 Binary files a/tools/sdk/esp32/lib/libsoc.a and b/tools/sdk/esp32/lib/libsoc.a differ diff --git a/tools/sdk/esp32/lib/libspiffs.a b/tools/sdk/esp32/lib/libspiffs.a index f3836c1f4e4..30be7465e6d 100644 Binary files a/tools/sdk/esp32/lib/libspiffs.a and b/tools/sdk/esp32/lib/libspiffs.a differ diff --git a/tools/sdk/esp32/lib/libtcp_transport.a b/tools/sdk/esp32/lib/libtcp_transport.a index ae5f4417d49..39bd05bb700 100644 Binary files a/tools/sdk/esp32/lib/libtcp_transport.a and b/tools/sdk/esp32/lib/libtcp_transport.a differ diff --git a/tools/sdk/esp32/lib/libtcpip_adapter.a b/tools/sdk/esp32/lib/libtcpip_adapter.a index 0bbc6082bfc..24ac9917458 100644 Binary files a/tools/sdk/esp32/lib/libtcpip_adapter.a and b/tools/sdk/esp32/lib/libtcpip_adapter.a differ diff --git a/tools/sdk/esp32/lib/libulp.a b/tools/sdk/esp32/lib/libulp.a index 490c1fc532e..4f622ea1ece 100644 Binary files a/tools/sdk/esp32/lib/libulp.a and b/tools/sdk/esp32/lib/libulp.a differ diff --git a/tools/sdk/esp32/lib/libunity.a b/tools/sdk/esp32/lib/libunity.a index 6c88762b9b0..a46a998c2f3 100644 Binary files a/tools/sdk/esp32/lib/libunity.a and b/tools/sdk/esp32/lib/libunity.a differ diff --git a/tools/sdk/esp32/lib/libvfs.a b/tools/sdk/esp32/lib/libvfs.a index 710576f8cff..a43d26a323d 100644 Binary files a/tools/sdk/esp32/lib/libvfs.a and b/tools/sdk/esp32/lib/libvfs.a differ diff --git a/tools/sdk/esp32/lib/libwakenet.a b/tools/sdk/esp32/lib/libwakenet.a new file mode 100644 index 00000000000..674fe6f9ef2 Binary files /dev/null and b/tools/sdk/esp32/lib/libwakenet.a differ diff --git a/tools/sdk/esp32/lib/libwapi.a b/tools/sdk/esp32/lib/libwapi.a index 6dfc8a715c1..874379e03d6 100644 Binary files a/tools/sdk/esp32/lib/libwapi.a and b/tools/sdk/esp32/lib/libwapi.a differ diff --git a/tools/sdk/esp32/lib/libwear_levelling.a b/tools/sdk/esp32/lib/libwear_levelling.a index 2285a699f27..3154c82249e 100644 Binary files a/tools/sdk/esp32/lib/libwear_levelling.a and b/tools/sdk/esp32/lib/libwear_levelling.a differ diff --git a/tools/sdk/esp32/lib/libwifi_provisioning.a b/tools/sdk/esp32/lib/libwifi_provisioning.a index cb727c595c3..8dacd649836 100644 Binary files a/tools/sdk/esp32/lib/libwifi_provisioning.a and b/tools/sdk/esp32/lib/libwifi_provisioning.a differ diff --git a/tools/sdk/esp32/lib/libwpa_supplicant.a b/tools/sdk/esp32/lib/libwpa_supplicant.a index 515a19bdf5a..01c4db485c4 100644 Binary files a/tools/sdk/esp32/lib/libwpa_supplicant.a and b/tools/sdk/esp32/lib/libwpa_supplicant.a differ diff --git a/tools/sdk/esp32/lib/libws2812_led.a b/tools/sdk/esp32/lib/libws2812_led.a index f6937c8a18f..06736639a1d 100644 Binary files a/tools/sdk/esp32/lib/libws2812_led.a and b/tools/sdk/esp32/lib/libws2812_led.a differ diff --git a/tools/sdk/esp32/lib/libxtensa.a b/tools/sdk/esp32/lib/libxtensa.a index bfc9b903c85..dc73f1c9a31 100644 Binary files a/tools/sdk/esp32/lib/libxtensa.a and b/tools/sdk/esp32/lib/libxtensa.a differ diff --git a/tools/sdk/esp32/include/config/sdkconfig.h b/tools/sdk/esp32/qspi_qspi/include/sdkconfig.h similarity index 98% rename from tools/sdk/esp32/include/config/sdkconfig.h rename to tools/sdk/esp32/qspi_qspi/include/sdkconfig.h index 20682a98194..68f0593603b 100644 --- a/tools/sdk/esp32/include/config/sdkconfig.h +++ b/tools/sdk/esp32/qspi_qspi/include/sdkconfig.h @@ -49,20 +49,13 @@ #define CONFIG_LIB_BUILDER_FLASHFREQ "40m" #define CONFIG_ESP_RMAKER_ASSISTED_CLAIM 1 #define CONFIG_ESP_RMAKER_MQTT_HOST "a1p72mufdu6064-ats.iot.us-east-1.amazonaws.com" -#define CONFIG_ESP_RMAKER_TASK_STACK 4096 -#define CONFIG_ESP_RMAKER_TASK_PRIORITY 5 -#define CONFIG_ESP_RMAKER_MAX_NODE_CONFIG_SIZE 2048 #define CONFIG_ESP_RMAKER_MAX_PARAM_DATA_SIZE 1024 -#define CONFIG_ESP_RMAKER_FACTORY_PARTITION_NAME "fctry" -#define CONFIG_ESP_RMAKER_MQTT_PORT_443 1 -#define CONFIG_ESP_RMAKER_MQTT_PORT 1 -#define CONFIG_ESP_RMAKER_DEF_TIMEZONE "" -#define CONFIG_ESP_RMAKER_SNTP_SERVER_NAME "pool.ntp.org" #define CONFIG_ESP_RMAKER_CONSOLE_UART_NUM_0 1 #define CONFIG_ESP_RMAKER_CONSOLE_UART_NUM 0 #define CONFIG_ESP_RMAKER_OTA_AUTOFETCH 1 #define CONFIG_ESP_RMAKER_OTA_AUTOFETCH_PERIOD 0 -#define CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES 5 +#define CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE 1024 +#define CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES 10 #define CONFIG_ENABLE_ARDUINO_DEPENDS 1 #define CONFIG_AUTOSTART_ARDUINO 1 #define CONFIG_ARDUINO_RUN_CORE1 1 @@ -540,6 +533,18 @@ #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 +#define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 +#define CONFIG_ESP_RMAKER_MQTT_GLUE_LIB 1 +#define CONFIG_ESP_RMAKER_MQTT_PORT_443 1 +#define CONFIG_ESP_RMAKER_MQTT_PORT 1 +#define CONFIG_ESP_RMAKER_MQTT_SEND_USERNAME 1 +#define CONFIG_ESP_RMAKER_MQTT_USERNAME "?Platform=APN/1 ESPIF,RAINMAKER,v1.0" +#define CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK 4096 +#define CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_PRIORITY 5 +#define CONFIG_ESP_RMAKER_FACTORY_PARTITION_NAME "fctry" +#define CONFIG_ESP_RMAKER_FACTORY_NAMESPACE "rmaker_creds" +#define CONFIG_ESP_RMAKER_DEF_TIMEZONE "Asia/Shanghai" +#define CONFIG_ESP_RMAKER_SNTP_SERVER_NAME "pool.ntp.org" #define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 #define CONFIG_DSP_OPTIMIZED 1 #define CONFIG_DSP_OPTIMIZATION 1 diff --git a/tools/sdk/esp32/qspi_qspi/libbootloader_support.a b/tools/sdk/esp32/qspi_qspi/libbootloader_support.a index af1eea606ab..59516186cfb 100644 Binary files a/tools/sdk/esp32/qspi_qspi/libbootloader_support.a and b/tools/sdk/esp32/qspi_qspi/libbootloader_support.a differ diff --git a/tools/sdk/esp32/qspi_qspi/libesp_hw_support.a b/tools/sdk/esp32/qspi_qspi/libesp_hw_support.a index f81397bf836..c1a28586968 100644 Binary files a/tools/sdk/esp32/qspi_qspi/libesp_hw_support.a and b/tools/sdk/esp32/qspi_qspi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32/qspi_qspi/libesp_system.a b/tools/sdk/esp32/qspi_qspi/libesp_system.a index 59063a86c72..0c97e03e446 100644 Binary files a/tools/sdk/esp32/qspi_qspi/libesp_system.a and b/tools/sdk/esp32/qspi_qspi/libesp_system.a differ diff --git a/tools/sdk/esp32/qspi_qspi/libfreertos.a b/tools/sdk/esp32/qspi_qspi/libfreertos.a index 7c2228905aa..387ab2ba035 100644 Binary files a/tools/sdk/esp32/qspi_qspi/libfreertos.a and b/tools/sdk/esp32/qspi_qspi/libfreertos.a differ diff --git a/tools/sdk/esp32/qspi_qspi/libspi_flash.a b/tools/sdk/esp32/qspi_qspi/libspi_flash.a index 5d1e876b610..c9217310008 100644 Binary files a/tools/sdk/esp32/qspi_qspi/libspi_flash.a and b/tools/sdk/esp32/qspi_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32/qspi_qspi/sections.ld b/tools/sdk/esp32/qspi_qspi/sections.ld index ba03a92b1ae..a757898d2e1 100644 --- a/tools/sdk/esp32/qspi_qspi/sections.ld +++ b/tools/sdk/esp32/qspi_qspi/sections.ld @@ -385,7 +385,7 @@ SECTIONS *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .data EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .data.*) *(.dram1 .dram1.*) _coredump_dram_start = ABSOLUTE(.); - *(.dram1.coredump .dram1.coredump.*) + *(.dram2.coredump .dram2.coredump.*) _coredump_dram_end = ABSOLUTE(.); *libapp_trace.a:app_trace.*(.rodata .rodata.*) *libapp_trace.a:app_trace_util.*(.rodata .rodata.*) @@ -605,8 +605,8 @@ SECTIONS _bss_start = ABSOLUTE(.); *(.bss .bss.*) - *(.dynbss .dynsbss .gnu.linkonce.b .gnu.linkonce.b.* .gnu.linkonce.sb .gnu.linkonce.sb.* .gnu.linkonce.sb2 .gnu.linkonce.sb2.* .sbss .sbss.* .sbss2 .sbss2.* .scommon .share.mem) *(.ext_ram.bss .ext_ram.bss.*) + *(.dynbss .dynsbss .gnu.linkonce.b .gnu.linkonce.b.* .gnu.linkonce.sb .gnu.linkonce.sb.* .gnu.linkonce.sb2 .gnu.linkonce.sb2.* .sbss .sbss.* .sbss2 .sbss2.* .scommon .share.mem) *(COMMON) _bt_bss_start = ABSOLUTE(.); *libbt.a:(.bss .bss.* COMMON) @@ -772,7 +772,7 @@ SECTIONS *(.iram.data .iram.data.*) _coredump_iram_start = ABSOLUTE(.); - *(.iram.data.coredump .iram.data.coredump.*) + *(.iram2.coredump .iram2.coredump.*) _coredump_iram_end = ABSOLUTE(.); _iram_data_end = ABSOLUTE(.); diff --git a/tools/sdk/esp32/sdkconfig b/tools/sdk/esp32/sdkconfig index 3e6834a55a0..7318079de73 100644 --- a/tools/sdk/esp32/sdkconfig +++ b/tools/sdk/esp32/sdkconfig @@ -136,18 +136,10 @@ CONFIG_LIB_BUILDER_FLASHFREQ="40m" # CONFIG_ESP_RMAKER_ASSISTED_CLAIM=y CONFIG_ESP_RMAKER_MQTT_HOST="a1p72mufdu6064-ats.iot.us-east-1.amazonaws.com" -CONFIG_ESP_RMAKER_TASK_STACK=4096 -CONFIG_ESP_RMAKER_TASK_PRIORITY=5 -CONFIG_ESP_RMAKER_MAX_NODE_CONFIG_SIZE=2048 CONFIG_ESP_RMAKER_MAX_PARAM_DATA_SIZE=1024 -CONFIG_ESP_RMAKER_FACTORY_PARTITION_NAME="fctry" -# CONFIG_RMAKER_MQTT_PERSISTENT_SESSION is not set -CONFIG_ESP_RMAKER_MQTT_PORT_443=y -# CONFIG_ESP_RMAKER_MQTT_PORT_8883 is not set -CONFIG_ESP_RMAKER_MQTT_PORT=1 -CONFIG_ESP_RMAKER_DEF_TIMEZONE="" -CONFIG_ESP_RMAKER_SNTP_SERVER_NAME="pool.ntp.org" # CONFIG_ESP_RMAKER_DISABLE_USER_MAPPING_PROV is not set +# CONFIG_ESP_RMAKER_USER_ID_CHECK is not set +# CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE is not set CONFIG_ESP_RMAKER_CONSOLE_UART_NUM_0=y # CONFIG_ESP_RMAKER_CONSOLE_UART_NUM_1 is not set CONFIG_ESP_RMAKER_CONSOLE_UART_NUM=0 @@ -160,12 +152,13 @@ CONFIG_ESP_RMAKER_OTA_AUTOFETCH_PERIOD=0 # CONFIG_ESP_RMAKER_SKIP_COMMON_NAME_CHECK is not set # CONFIG_ESP_RMAKER_SKIP_VERSION_CHECK is not set # CONFIG_ESP_RMAKER_SKIP_PROJECT_NAME_CHECK is not set +CONFIG_ESP_RMAKER_OTA_HTTP_RX_BUFFER_SIZE=1024 # end of ESP RainMaker OTA Config # # ESP RainMaker Scheduling # -CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES=5 +CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES=10 # end of ESP RainMaker Scheduling # end of ESP RainMaker Config @@ -220,6 +213,18 @@ CONFIG_ARDUHAL_PARTITION_SCHEME="default" # # end of Arduino TinyUSB +# +# ESP Speech Recognition +# +# CONFIG_USE_WAKENET is not set +# CONFIG_USE_MULTINET is not set + +# +# Add speech commands +# +# end of Add speech commands +# end of ESP Speech Recognition + # # Compiler options # @@ -1520,6 +1525,32 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y CONFIG_IO_GLITCH_FILTER_TIME_MS=50 # end of Button +# +# ESP RainMaker Common +# +CONFIG_ESP_RMAKER_LIB_ESP_MQTT=y +# CONFIG_ESP_RMAKER_LIB_AWS_IOT is not set +CONFIG_ESP_RMAKER_MQTT_GLUE_LIB=1 +CONFIG_ESP_RMAKER_MQTT_PORT_443=y +# CONFIG_ESP_RMAKER_MQTT_PORT_8883 is not set +CONFIG_ESP_RMAKER_MQTT_PORT=1 +# CONFIG_ESP_RMAKER_MQTT_PERSISTENT_SESSION is not set +CONFIG_ESP_RMAKER_MQTT_SEND_USERNAME=y +CONFIG_ESP_RMAKER_MQTT_USERNAME="?Platform=APN/1 ESPIF,RAINMAKER,v1.0" +CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK=4096 +CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_PRIORITY=5 +CONFIG_ESP_RMAKER_FACTORY_PARTITION_NAME="fctry" +CONFIG_ESP_RMAKER_FACTORY_NAMESPACE="rmaker_creds" +CONFIG_ESP_RMAKER_DEF_TIMEZONE="Asia/Shanghai" +CONFIG_ESP_RMAKER_SNTP_SERVER_NAME="pool.ntp.org" +# end of ESP RainMaker Common + +# +# WS2812 RGB LED +# +# CONFIG_WS2812_LED_ENABLE is not set +# end of WS2812 RGB LED + # # DSP Library # @@ -1579,6 +1610,7 @@ CONFIG_LITTLEFS_USE_MTIME=y CONFIG_LITTLEFS_MTIME_USE_SECONDS=y # CONFIG_LITTLEFS_MTIME_USE_NONCE is not set # CONFIG_LITTLEFS_SPIFFS_COMPAT is not set +# CONFIG_LITTLEFS_FLUSH_FILE_EVERY_WRITE is not set # end of LittleFS # end of Component config diff --git a/tools/sdk/esp32c3/bin/bootloader_dio_40m.bin b/tools/sdk/esp32c3/bin/bootloader_dio_40m.bin index 90dfd3ce511..f665a4a4922 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_dio_40m.bin and b/tools/sdk/esp32c3/bin/bootloader_dio_40m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_dio_80m.bin b/tools/sdk/esp32c3/bin/bootloader_dio_80m.bin index bd824f24686..c5a299b713d 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_dio_80m.bin and b/tools/sdk/esp32c3/bin/bootloader_dio_80m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_dout_40m.bin b/tools/sdk/esp32c3/bin/bootloader_dout_40m.bin index c6af79e6c10..5ee9c3c6a15 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_dout_40m.bin and b/tools/sdk/esp32c3/bin/bootloader_dout_40m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_dout_80m.bin b/tools/sdk/esp32c3/bin/bootloader_dout_80m.bin index 7fda9672f21..17fc6893202 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_dout_80m.bin and b/tools/sdk/esp32c3/bin/bootloader_dout_80m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qio_40m.bin b/tools/sdk/esp32c3/bin/bootloader_qio_40m.bin index c885d697846..aa7d259ab22 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_qio_40m.bin and b/tools/sdk/esp32c3/bin/bootloader_qio_40m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qio_80m.bin b/tools/sdk/esp32c3/bin/bootloader_qio_80m.bin index 77b1e3104ac..68e44ed0ef8 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_qio_80m.bin and b/tools/sdk/esp32c3/bin/bootloader_qio_80m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qout_40m.bin b/tools/sdk/esp32c3/bin/bootloader_qout_40m.bin index 792d1c1cc87..497d795af1c 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_qout_40m.bin and b/tools/sdk/esp32c3/bin/bootloader_qout_40m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qout_80m.bin b/tools/sdk/esp32c3/bin/bootloader_qout_80m.bin index 1858ed377a8..637df8c52c3 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_qout_80m.bin and b/tools/sdk/esp32c3/bin/bootloader_qout_80m.bin differ diff --git a/tools/sdk/esp32c3/include/button/button/include/iot_button.h b/tools/sdk/esp32c3/include/button/button/include/iot_button.h new file mode 100644 index 00000000000..3e735133464 --- /dev/null +++ b/tools/sdk/esp32c3/include/button/button/include/iot_button.h @@ -0,0 +1,272 @@ +// Copyright 2020 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +#ifndef _IOT_BUTTON_H_ +#define _IOT_BUTTON_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +typedef void (* button_cb)(void*); +typedef void* button_handle_t; + +typedef enum { + BUTTON_ACTIVE_HIGH = 1, /*!