diff --git a/cores/esp32/esp32-hal-rmt.c b/cores/esp32/esp32-hal-rmt.c index a72d113d7b8..3cee1e695e9 100644 --- a/cores/esp32/esp32-hal-rmt.c +++ b/cores/esp32/esp32-hal-rmt.c @@ -12,53 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "freertos/FreeRTOS.h" -#include "freertos/event_groups.h" -#include "freertos/semphr.h" - #include "esp32-hal.h" -#include "esp8266-compat.h" -#include "soc/gpio_reg.h" -#include "soc/rmt_struct.h" -#include "driver/periph_ctrl.h" -#include "esp_intr_alloc.h" +#include "driver/rmt.h" /** * Internal macros */ -#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4 -#define MAX_CHANNELS 8 -#define MAX_DATA_PER_CHANNEL 64 -#define MAX_DATA_PER_ITTERATION 62 -#elif CONFIG_IDF_TARGET_ESP32S2 -#define MAX_CHANNELS 4 -#define MAX_DATA_PER_CHANNEL 64 -#define MAX_DATA_PER_ITTERATION 62 -#elif CONFIG_IDF_TARGET_ESP32C3 -#define MAX_CHANNELS 4 -#define MAX_DATA_PER_CHANNEL 48 -#define MAX_DATA_PER_ITTERATION 46 -#else -#error Target CONFIG_IDF_TARGET is not supported -#endif -#define _ABS(a) (a>0?a:-a) + +#define MAX_CHANNELS (SOC_RMT_GROUPS * SOC_RMT_CHANNELS_PER_GROUP) + +#define RMT_TX_CH_START (0) +#define RMT_TX_CH_END (SOC_RMT_TX_CANDIDATES_PER_GROUP - 1) +#define RMT_RX_CH_START (SOC_RMT_CHANNELS_PER_GROUP - SOC_RMT_TX_CANDIDATES_PER_GROUP) +#define RMT_RX_CH_END (SOC_RMT_CHANNELS_PER_GROUP - 1) + #define _LIMIT(a,b) (a>b?b:a) -#if CONFIG_IDF_TARGET_ESP32C3 -#define _INT_TX_END(channel) (1<<(channel)) -#define _INT_RX_END(channel) (4<<(channel)) -#define _INT_ERROR(channel) (16<<(channel)) -#define _INT_THR_EVNT(channel) (256<<(channel)) -#else -#define __INT_TX_END (1) -#define __INT_RX_END (2) -#define __INT_ERROR (4) -#define __INT_THR_EVNT (1<<24) - -#define _INT_TX_END(channel) (__INT_TX_END<<(channel*3)) -#define _INT_RX_END(channel) (__INT_RX_END<<(channel*3)) -#define _INT_ERROR(channel) (__INT_ERROR<<(channel*3)) -#define _INT_THR_EVNT(channel) ((__INT_THR_EVNT)<<(channel)) -#endif #if CONFIG_DISABLE_HAL_LOCKS # define RMT_MUTEX_LOCK(channel) @@ -77,39 +45,57 @@ # define DEBUG_INTERRUPT_END(pin) #endif /* _RMT_INTERNAL_DEBUG */ +#define RMT_DEFAULT_ARD_CONFIG_TX(gpio, channel_id, buffers) \ + { \ + .rmt_mode = RMT_MODE_TX, \ + .channel = channel_id, \ + .gpio_num = gpio, \ + .clk_div = 1, \ + .mem_block_num = buffers, \ + .flags = 0, \ + .tx_config = { \ + .carrier_level = RMT_CARRIER_LEVEL_HIGH, \ + .idle_level = RMT_IDLE_LEVEL_LOW, \ + .carrier_duty_percent = 50, \ + .carrier_en = false, \ + .loop_en = false, \ + .idle_output_en = true, \ + } \ + } + +#define RMT_DEFAULT_ARD_CONFIG_RX(gpio, channel_id, buffers) \ + { \ + .rmt_mode = RMT_MODE_RX, \ + .channel = channel_id, \ + .gpio_num = gpio, \ + .clk_div = 1, \ + .mem_block_num = buffers, \ + .flags = 0, \ + .rx_config = { \ + .idle_threshold = 0x80, \ + .filter_ticks_thresh = 100, \ + .filter_en = false, \ + } \ + } + + + + /** * Typedefs for internal stuctures, enums */ -typedef enum { - E_NO_INTR = 0, - E_TX_INTR = 1, - E_TXTHR_INTR = 2, - E_RX_INTR = 4, -} intr_mode_t; - -typedef enum { - E_INACTIVE = 0, - E_FIRST_HALF = 1, - E_LAST_DATA = 2, - E_END_TRANS = 4, - E_SET_CONTI = 8, -} transaction_state_t; - struct rmt_obj_s { bool allocated; EventGroupHandle_t events; - int pin; int channel; - bool tx_not_rx; int buffers; int data_size; uint32_t* data_ptr; - intr_mode_t intr_mode; - transaction_state_t tx_state; rmt_rx_data_cb_t cb; - bool data_alloc; void * arg; + TaskHandle_t rxTaskHandle; + bool rx_completed; }; /** @@ -117,21 +103,21 @@ struct rmt_obj_s */ static xSemaphoreHandle g_rmt_objlocks[MAX_CHANNELS] = { NULL, NULL, NULL, NULL, -#if CONFIG_IDF_TARGET_ESP32 +#if MAX_CHANNELS > 4 NULL, NULL, NULL, NULL #endif }; static rmt_obj_t g_rmt_objects[MAX_CHANNELS] = { - { false, NULL, 0, 0, 0, 0, 0, NULL, E_NO_INTR, E_INACTIVE, NULL, false, NULL}, - { false, NULL, 0, 0, 0, 0, 0, NULL, E_NO_INTR, E_INACTIVE, NULL, false, NULL}, - { false, NULL, 0, 0, 0, 0, 0, NULL, E_NO_INTR, E_INACTIVE, NULL, false, NULL}, - { false, NULL, 0, 0, 0, 0, 0, NULL, E_NO_INTR, E_INACTIVE, NULL, false, NULL}, -#if CONFIG_IDF_TARGET_ESP32 - { false, NULL, 0, 0, 0, 0, 0, NULL, E_NO_INTR, E_INACTIVE, NULL, false, NULL}, - { false, NULL, 0, 0, 0, 0, 0, NULL, E_NO_INTR, E_INACTIVE, NULL, false, NULL}, - { false, NULL, 0, 0, 0, 0, 0, NULL, E_NO_INTR, E_INACTIVE, NULL, false, NULL}, - { false, NULL, 0, 0, 0, 0, 0, NULL, E_NO_INTR, E_INACTIVE, NULL, false, NULL}, + { false, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, true}, + { false, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, true}, + { false, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, true}, + { false, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, true}, +#if MAX_CHANNELS > 4 + { false, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, true}, + { false, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, true}, + { false, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, true}, + { false, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, true}, #endif }; @@ -147,26 +133,130 @@ static xSemaphoreHandle g_rmt_block_lock = NULL; /** * Internal method (private) declarations */ -static void _initPin(int pin, int channel, bool tx_not_rx); -static bool _rmtSendOnce(rmt_obj_t* rmt, rmt_data_t* data, size_t size, bool continuous); +static rmt_obj_t* _rmtAllocate(int pin, int from, int size) +{ + size_t i; + // setup how many buffers shall we use + g_rmt_objects[from].buffers = size; + + for (i=0; ichannel; + +RMT_MUTEX_LOCK(channel); + rmt_get_tx_loop_mode(channel, &loop_en); + rmt_get_clk_div(channel, &div_cnt); + rmt_get_mem_block_num(channel, &memNum); + rmt_get_mem_pd(channel, &lowPowerMode); + rmt_get_memory_owner(channel, &owner); + rmt_get_rx_idle_thresh(channel, &idleThreshold); + rmt_get_status(channel, &status); + rmt_get_source_clk(channel, &srcClk); + + log_d("Status for RMT channel %d", channel); + log_d("- Loop enabled: %d", loop_en); + log_d("- Clock divisor: %d", div_cnt); + log_d("- Number of memory blocks: %d", memNum); + log_d("- Low power mode: %d", lowPowerMode); + log_d("- Memory owner: %s", owner==RMT_MEM_OWNER_TX?"TX":"RX"); + log_d("- Idle threshold: %d", idleThreshold); + log_d("- Status: %d", status); + log_d("- Source clock: %s", srcClk==RMT_BASECLK_APB?"APB (80MHz)":"1MHz"); +RMT_MUTEX_UNLOCK(channel); +} + +static void _rmtRxTask(void *args) { + rmt_obj_t *rmt = (rmt_obj_t *) args; + RingbufHandle_t rb = NULL; + size_t rmt_len = 0; + rmt_item32_t *data = NULL; + + if (!rmt) { + log_e(" -- Inavalid Argument \n"); + goto err; + } -static void ARDUINO_ISR_ATTR _rmt_isr(void* arg); + int channel = rmt->channel; + rmt_get_ringbuf_handle(channel, &rb); + if (!rb) { + log_e(" -- Failed to get RMT ringbuffer handle\n"); + goto err; + } + + for(;;) { + data = (rmt_item32_t *) xRingbufferReceive(rb, &rmt_len, portMAX_DELAY); + if (data) { + log_d(" -- Got %d bytes on RX Ringbuffer - CH %d\n", rmt_len, rmt->channel); + rmt->rx_completed = true; // used in rmtReceiveCompleted() + // callback + if (rmt->cb) { + (rmt->cb)((uint32_t *)data, rmt_len / sizeof(rmt_item32_t), rmt->arg); + } else { + // stop RX -- will force a correct call with a callback pointer / new rmtReadData() / rmtReadAsync() + rmt_rx_stop(channel); + } + // Async Read -- copy data to caller + if (rmt->data_ptr && rmt->data_size) { + uint32_t data_size = rmt->data_size; + uint32_t read_len = rmt_len / sizeof(rmt_item32_t); + if (read_len < rmt->data_size) data_size = read_len; + rmt_item32_t *p = (rmt_item32_t *)rmt->data_ptr; + for (uint32_t i = 0; i < data_size; i++) { + p[i] = data[i]; + } + } + // set events + if (rmt->events) { + xEventGroupSetBits(rmt->events, RMT_FLAG_RX_DONE); + } + vRingbufferReturnItem(rb, (void *) data); + } // xRingbufferReceive + } // for(;;) -static rmt_obj_t* _rmtAllocate(int pin, int from, int size); +err: + vTaskDelete(NULL); +} -static void _initPin(int pin, int channel, bool tx_not_rx); -static int ARDUINO_ISR_ATTR _rmt_get_mem_len(uint8_t channel); +static bool _rmtCreateRxTask(rmt_obj_t* rmt) +{ + if (!rmt) { + return false; + } + if (rmt->rxTaskHandle) { // Task already created + return false; + } -static void ARDUINO_ISR_ATTR _rmt_tx_mem_first(uint8_t ch); + xTaskCreate(_rmtRxTask, "rmt_rx_task", 4096, rmt, 20, &rmt->rxTaskHandle); -static void ARDUINO_ISR_ATTR _rmt_tx_mem_second(uint8_t ch); + if(rmt->rxTaskHandle == NULL){ + log_e("RMT RX Task create failed"); + return false; + } + return true; +} /** * Public method definitions */ + bool rmtSetCarrier(rmt_obj_t* rmt, bool carrier_en, bool carrier_level, uint32_t low, uint32_t high) { if (!rmt || low > 0xFFFF || high > 0xFFFF) { @@ -175,21 +265,9 @@ bool rmtSetCarrier(rmt_obj_t* rmt, bool carrier_en, bool carrier_level, uint32_t size_t channel = rmt->channel; RMT_MUTEX_LOCK(channel); -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.tx_carrier[channel].low = low; - RMT.tx_carrier[channel].high = high; - RMT.rx_conf[channel].conf0.carrier_en = carrier_en; - RMT.rx_conf[channel].conf0.carrier_out_lv = carrier_level; -#else - RMT.carrier_duty_ch[channel].low = low; - RMT.carrier_duty_ch[channel].high = high; - RMT.conf_ch[channel].conf0.carrier_en = carrier_en; - RMT.conf_ch[channel].conf0.carrier_out_lv = carrier_level; -#endif + rmt_set_tx_carrier(channel, carrier_en, high, low, carrier_level); RMT_MUTEX_UNLOCK(channel); - return true; - } bool rmtSetFilter(rmt_obj_t* rmt, bool filter_en, uint32_t filter_level) @@ -200,19 +278,9 @@ bool rmtSetFilter(rmt_obj_t* rmt, bool filter_en, uint32_t filter_level) size_t channel = rmt->channel; RMT_MUTEX_LOCK(channel); - -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.rx_conf[channel].conf1.rx_filter_thres = filter_level; - RMT.rx_conf[channel].conf1.rx_filter_en = filter_en; -#else - RMT.conf_ch[channel].conf1.rx_filter_thres = filter_level; - RMT.conf_ch[channel].conf1.rx_filter_en = filter_en; -#endif - + rmt_set_rx_filter(channel, filter_en, filter_level); RMT_MUTEX_UNLOCK(channel); - return true; - } bool rmtSetRxThreshold(rmt_obj_t* rmt, uint32_t value) @@ -223,13 +291,8 @@ bool rmtSetRxThreshold(rmt_obj_t* rmt, uint32_t value) size_t channel = rmt->channel; RMT_MUTEX_LOCK(channel); -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.rx_conf[channel].conf0.idle_thres = value; -#else - RMT.conf_ch[channel].conf0.idle_thres = value; -#endif + rmt_set_rx_idle_thresh(channel, value); RMT_MUTEX_UNLOCK(channel); - return true; } @@ -245,26 +308,34 @@ bool rmtDeinit(rmt_obj_t *rmt) return false; } + RMT_MUTEX_LOCK(rmt->channel); + // force stopping rmt processing + rmt_rx_stop(rmt->channel); + rmt_tx_stop(rmt->channel); + + if(rmt->rxTaskHandle){ + vTaskDelete(rmt->rxTaskHandle); + rmt->rxTaskHandle = NULL; + } + rmt_driver_uninstall(rmt->channel); + size_t from = rmt->channel; size_t to = rmt->buffers + rmt->channel; size_t i; -#if !CONFIG_DISABLE_HAL_LOCKS - if(g_rmt_objlocks[from] != NULL) { - vSemaphoreDelete(g_rmt_objlocks[from]); - } -#endif - - if (g_rmt_objects[from].data_alloc) { - free(g_rmt_objects[from].data_ptr); - } - for (i = from; i < to; i++) { g_rmt_objects[i].allocated = false; } g_rmt_objects[from].channel = 0; g_rmt_objects[from].buffers = 0; + RMT_MUTEX_UNLOCK(rmt->channel); + +#if !CONFIG_DISABLE_HAL_LOCKS + if(g_rmt_objlocks[from] != NULL) { + vSemaphoreDelete(g_rmt_objlocks[from]); + } +#endif return true; } @@ -275,12 +346,13 @@ bool rmtLoop(rmt_obj_t* rmt, rmt_data_t* data, size_t size) return false; } - int allocated_size = MAX_DATA_PER_CHANNEL * rmt->buffers; - - if (size > allocated_size) { - return false; - } - return _rmtSendOnce(rmt, data, size, true); + int channel = rmt->channel; + RMT_MUTEX_LOCK(channel); + rmt_tx_stop(channel); + rmt_set_tx_loop_mode(channel, true); + rmt_write_items(channel, (const rmt_item32_t *)data, size, false); + RMT_MUTEX_UNLOCK(channel); + return true; } bool rmtWrite(rmt_obj_t* rmt, rmt_data_t* data, size_t size) @@ -290,84 +362,37 @@ bool rmtWrite(rmt_obj_t* rmt, rmt_data_t* data, size_t size) } int channel = rmt->channel; - int allocated_size = MAX_DATA_PER_CHANNEL * rmt->buffers; - - if (size > (allocated_size - 1)) { - - int half_tx_nr = MAX_DATA_PER_ITTERATION/2; - RMT_MUTEX_LOCK(channel); - // setup interrupt handler if not yet installed for half and full tx - if (!intr_handle) { - esp_intr_alloc(ETS_RMT_INTR_SOURCE, (int)ARDUINO_ISR_FLAG, _rmt_isr, NULL, &intr_handle); - } - - rmt->data_size = size - MAX_DATA_PER_ITTERATION; - rmt->data_ptr = ((uint32_t*)data) + MAX_DATA_PER_ITTERATION; - rmt->intr_mode = E_TX_INTR | E_TXTHR_INTR; - rmt->tx_state = E_SET_CONTI | E_FIRST_HALF; - -#if CONFIG_IDF_TARGET_ESP32C3 - //uint32_t val = RMT.tx_conf[channel].val; - // init the tx limit for interruption - RMT.tx_lim[channel].limit = half_tx_nr+2; - //RMT.tx_conf[channel].val = val; - //RMT.tx_conf[channel].conf_update = 1; - // reset memory pointer - RMT.tx_conf[channel].mem_rst = 1; - //RMT.tx_conf[channel].mem_rst = 0; - RMT.tx_conf[channel].mem_rd_rst = 1; - //RMT.tx_conf[channel].mem_rd_rst = 0; -#else - // init the tx limit for interruption - RMT.tx_lim_ch[channel].limit = half_tx_nr+2; - // reset memory pointer - RMT.conf_ch[channel].conf1.apb_mem_rst = 1; - RMT.conf_ch[channel].conf1.apb_mem_rst = 0; - RMT.conf_ch[channel].conf1.mem_rd_rst = 1; - RMT.conf_ch[channel].conf1.mem_rd_rst = 0; - RMT.conf_ch[channel].conf1.mem_wr_rst = 1; - RMT.conf_ch[channel].conf1.mem_wr_rst = 0; -#endif - // set the tx end mark - //RMTMEM.chan[channel].data32[MAX_DATA_PER_ITTERATION].val = 0; - - // clear and enable both Tx completed and half tx event - RMT.int_clr.val = _INT_TX_END(channel); - RMT.int_clr.val = _INT_THR_EVNT(channel); - RMT.int_clr.val = _INT_ERROR(channel); - - RMT.int_ena.val |= _INT_TX_END(channel); - RMT.int_ena.val |= _INT_THR_EVNT(channel); - RMT.int_ena.val |= _INT_ERROR(channel); - - RMT_MUTEX_UNLOCK(channel); - - // start the transation - //return _rmtSendOnce(rmt, data, MAX_DATA_PER_ITTERATION, true); - return _rmtSendOnce(rmt, data, MAX_DATA_PER_ITTERATION, false); - } else { - // use one-go mode if data fits one buffer - return _rmtSendOnce(rmt, data, size, false); - } + RMT_MUTEX_LOCK(channel); + rmt_tx_stop(channel); + rmt_set_tx_loop_mode(channel, false); + rmt_write_items(channel, (const rmt_item32_t *)data, size, false); + RMT_MUTEX_UNLOCK(channel); + return true; } -bool rmtReadData(rmt_obj_t* rmt, uint32_t* data, size_t size) +bool rmtWriteBlocking(rmt_obj_t* rmt, rmt_data_t* data, size_t size) { if (!rmt) { return false; } + int channel = rmt->channel; + RMT_MUTEX_LOCK(channel); + rmt_tx_stop(channel); + rmt_set_tx_loop_mode(channel, false); + rmt_write_items(channel, (const rmt_item32_t *)data, size, true); + RMT_MUTEX_UNLOCK(channel); + return true; +} - if (g_rmt_objects[channel].buffers < size/MAX_DATA_PER_CHANNEL) { +bool rmtReadData(rmt_obj_t* rmt, uint32_t* data, size_t size) +{ + if (!rmt) { return false; } + int channel = rmt->channel; - size_t i; - volatile uint32_t* rmt_mem_ptr = &(RMTMEM.chan[channel].data32[0].val); - for (i=0; ichannel; - RMT.int_clr.val = _INT_ERROR(channel); - RMT.int_ena.val |= _INT_ERROR(channel); - -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.rx_conf[channel].conf1.mem_owner = 1; - RMT.rx_conf[channel].conf1.mem_wr_rst = 1; - RMT.rx_conf[channel].conf1.rx_en = 1; -#else - RMT.conf_ch[channel].conf1.mem_owner = 1; - RMT.conf_ch[channel].conf1.mem_wr_rst = 1; - RMT.conf_ch[channel].conf1.rx_en = 1; -#endif + RMT_MUTEX_LOCK(channel); + rmt_set_memory_owner(channel, RMT_MEM_OWNER_RX); + rmt_rx_start(channel, true); + rmt->rx_completed = false; + RMT_MUTEX_UNLOCK(channel); return true; } @@ -399,75 +417,46 @@ bool rmtReceiveCompleted(rmt_obj_t* rmt) if (!rmt) { return false; } - int channel = rmt->channel; - if (RMT.int_raw.val&_INT_RX_END(channel)) { - // RX end flag - RMT.int_clr.val = _INT_RX_END(channel); - return true; - } else { - return false; - } + return rmt->rx_completed; } bool rmtRead(rmt_obj_t* rmt, rmt_rx_data_cb_t cb, void * arg) { - if (!rmt && !cb) { + if (!rmt || !cb) { return false; } int channel = rmt->channel; - RMT_MUTEX_LOCK(channel); rmt->arg = arg; - rmt->intr_mode = E_RX_INTR; - rmt->tx_state = E_FIRST_HALF; rmt->cb = cb; - // allocate internally two buffers which would alternate - if (!rmt->data_alloc) { - rmt->data_ptr = (uint32_t*)malloc(2*MAX_DATA_PER_CHANNEL*(rmt->buffers)*sizeof(uint32_t)); - rmt->data_size = MAX_DATA_PER_CHANNEL*rmt->buffers; - rmt->data_alloc = true; - } - -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.rx_conf[channel].conf1.mem_owner = 1; -#else - RMT.conf_ch[channel].conf1.mem_owner = 1; -#endif - RMT.int_clr.val = _INT_RX_END(channel); - RMT.int_clr.val = _INT_ERROR(channel); - - RMT.int_ena.val |= _INT_RX_END(channel); - RMT.int_ena.val |= _INT_ERROR(channel); - -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.rx_conf[channel].conf1.mem_wr_rst = 1; - RMT.rx_conf[channel].conf1.rx_en = 1; -#else - RMT.conf_ch[channel].conf1.mem_wr_rst = 1; - - RMT.conf_ch[channel].conf1.rx_en = 1; -#endif + RMT_MUTEX_LOCK(channel); + // cb as NULL is a way to cancel the callback process + if (cb == NULL) { + rmt_rx_stop(channel); + return true; + } + // Start a read process but now with a call back function + rmt_set_memory_owner(channel, RMT_MEM_OWNER_RX); + rmt_rx_start(channel, true); + rmt->rx_completed = false; + _rmtCreateRxTask(rmt); RMT_MUTEX_UNLOCK(channel); - return true; } -bool rmtEnd(rmt_obj_t* rmt) { +bool rmtEnd(rmt_obj_t* rmt) +{ if (!rmt) { return false; } int channel = rmt->channel; RMT_MUTEX_LOCK(channel); -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.rx_conf[channel].conf1.rx_en = 1; -#else - RMT.conf_ch[channel].conf1.rx_en = 1; -#endif + rmt_rx_stop(channel); + rmt->rx_completed = true; RMT_MUTEX_UNLOCK(channel); - return true; } @@ -478,55 +467,34 @@ bool rmtReadAsync(rmt_obj_t* rmt, rmt_data_t* data, size_t size, void* eventFlag } int channel = rmt->channel; - if (g_rmt_objects[channel].buffers < size/MAX_DATA_PER_CHANNEL) { - return false; - } + // No limit on size with IDF ;-) + //if (g_rmt_objects[channel].buffers < size/SOC_RMT_MEM_WORDS_PER_CHANNEL) { + // return false; + //} + RMT_MUTEX_LOCK(channel); if (eventFlag) { xEventGroupClearBits(eventFlag, RMT_FLAGS_ALL); - rmt->events = eventFlag; - } - - if (data && size>0) { - rmt->data_ptr = (uint32_t*)data; - rmt->data_size = size; } - - RMT_MUTEX_LOCK(channel); - rmt->intr_mode = E_RX_INTR; - -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.rx_conf[channel].conf1.mem_owner = 1; -#else - RMT.conf_ch[channel].conf1.mem_owner = 1; -#endif - - RMT.int_clr.val = _INT_RX_END(channel); - RMT.int_clr.val = _INT_ERROR(channel); - - RMT.int_ena.val |= _INT_RX_END(channel); - RMT.int_ena.val |= _INT_ERROR(channel); - -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.rx_conf[channel].conf1.mem_wr_rst = 1; - - RMT.rx_conf[channel].conf1.rx_en = 1; -#else - RMT.conf_ch[channel].conf1.mem_wr_rst = 1; - - RMT.conf_ch[channel].conf1.rx_en = 1; -#endif + // if NULL, no problems - rmtReadAsync works as a plain rmtReadData() + rmt->events = eventFlag; + + // if NULL, no problems - task will take care of it + rmt->data_ptr = (uint32_t*)data; + rmt->data_size = size; + + // Start a read process + rmt_set_memory_owner(channel, RMT_MEM_OWNER_RX); + rmt_rx_start(channel, true); + rmt->rx_completed = false; + _rmtCreateRxTask(rmt); RMT_MUTEX_UNLOCK(channel); // wait for data if requested so if (waitForData && eventFlag) { uint32_t flags = xEventGroupWaitBits(eventFlag, RMT_FLAGS_ALL, pdTRUE /* clear on exit */, pdFALSE /* wait for all bits */, timeout); - if (flags & RMT_FLAG_ERROR) { - return false; - } } - return true; } @@ -534,38 +502,19 @@ float rmtSetTick(rmt_obj_t* rmt, float tick) { if (!rmt) { return false; - } - /* - divider field span from 1 (smallest), 2, 3, ... , 0xFF, 0x00 (highest) - * rmt tick from 1/80M -> 12.5ns (1x) div_cnt = 0x01 - 3.2 us (256x) div_cnt = 0x00 - * rmt tick for 1 MHz -> 1us (1x) div_cnt = 0x01 - 256us (256x) div_cnt = 0x00 - */ - + } size_t channel = rmt->channel; -#if CONFIG_IDF_TARGET_ESP32C3 - int apb_div = _LIMIT(tick/25.0f, 256); - float apb_tick = 25.0f * apb_div; - RMT.tx_conf[channel].div_cnt = apb_div & 0xFF; - RMT.tx_conf[channel].conf_update = 1; - return apb_tick; -#else + RMT_MUTEX_LOCK(channel); + // RMT_BASECLK_REF (1MHz) is not supported in IDF upon Programmming Guide + // Only APB works + rmt_set_source_clk(channel, RMT_BASECLK_APB); int apb_div = _LIMIT(tick/12.5f, 256); - int ref_div = _LIMIT(tick/1000, 256); float apb_tick = 12.5f * apb_div; - float ref_tick = 1000.0f * ref_div; - if (_ABS(apb_tick - tick) < _ABS(ref_tick - tick)) { - RMT.conf_ch[channel].conf0.div_cnt = apb_div & 0xFF; - RMT.conf_ch[channel].conf1.ref_always_on = 1; - return apb_tick; - } else { - RMT.conf_ch[channel].conf0.div_cnt = ref_div & 0xFF; - RMT.conf_ch[channel].conf1.ref_always_on = 0; - return ref_tick; - } -#endif + + rmt_set_clk_div(channel, apb_div & 0xFF); + RMT_MUTEX_UNLOCK(channel); + return apb_tick; } rmt_obj_t* rmtInit(int pin, bool tx_not_rx, rmt_reserve_memsize_t memsize) @@ -582,8 +531,17 @@ rmt_obj_t* rmtInit(int pin, bool tx_not_rx, rmt_reserve_memsize_t memsize) // lock while (xSemaphoreTake(g_rmt_block_lock, portMAX_DELAY) != pdPASS) {} - for (i=0; i MAX_CHANNELS || j != buffers) { xSemaphoreGive(g_rmt_block_lock); + log_e("rmInit Failed - not enough channels\n"); return NULL; } + + // A suitable channel has been found, it has to block its resources in our internal data strucuture + size_t channel = i; rmt = _rmtAllocate(pin, i, buffers); xSemaphoreGive(g_rmt_block_lock); - size_t channel = i; + rmt->buffers = buffers; + rmt->channel = channel; + rmt->arg = NULL; + rmt->cb = NULL; + rmt->data_ptr = NULL; + rmt->data_size = 0; + rmt->rx_completed = false; + rmt->events = NULL; #if !CONFIG_DISABLE_HAL_LOCKS if(g_rmt_objlocks[channel] == NULL) { @@ -615,447 +584,30 @@ rmt_obj_t* rmtInit(int pin, bool tx_not_rx, rmt_reserve_memsize_t memsize) #endif RMT_MUTEX_LOCK(channel); - - rmt->pin = pin; - rmt->tx_not_rx = tx_not_rx; - rmt->buffers =buffers; - rmt->channel = channel; - rmt->arg = NULL; - - _initPin(pin, channel, tx_not_rx); - - // Initialize the registers in default mode: - // - no carrier, filter - // - timebase tick of 1us - // - idle threshold set to 0x8000 (max pulse width + 1) -#if CONFIG_IDF_TARGET_ESP32C3 - - RMT.sys_conf.fifo_mask = 1; + esp_err_t esp_err_code = ESP_OK; if (tx_not_rx) { - RMT.tx_lim[channel].limit = MAX_DATA_PER_ITTERATION/2 + 2; - RMT.tx_conf[channel].val = 0; -// RMT.tx_conf[channel].carrier_en = 0; -// RMT.tx_conf[channel].carrier_out_lv = 0; -// RMT.tx_conf[channel].tx_conti_mode = 0; -// RMT.tx_conf[channel].idle_out_lv = 0; // signal level for idle -// RMT.tx_conf[channel].tx_start = 0; -// RMT.tx_conf[channel].tx_stop = 0; -// RMT.tx_conf[channel].carrier_eff_en = 0; -// RMT.tx_conf[channel].afifo_rst = 0; -// RMT.tx_conf[channel].conf_update = 0; -// RMT.tx_conf[channel].mem_tx_wrap_en = 0; -// RMT.tx_conf[channel].mem_rst = 1; - - RMT.tx_conf[channel].idle_out_en = 1; // enable idle - RMT.tx_conf[channel].div_cnt = 1; - RMT.tx_conf[channel].mem_size = buffers; - RMT.tx_conf[channel].mem_rd_rst = 1; - RMT.tx_conf[channel].conf_update = 1; + rmt_config_t config = RMT_DEFAULT_ARD_CONFIG_TX(pin, channel, buffers); + esp_err_code = rmt_config(&config); + if (esp_err_code == ESP_OK) + esp_err_code = rmt_driver_install(channel, 0, 0); + log_d(" -- %s RMT - CH %d - %d RAM Blocks - pin %d\n", tx_not_rx?"TX":"RX", channel, buffers, pin); } else { - RMT.rx_conf[channel].conf0.div_cnt = 1; - RMT.rx_conf[channel].conf0.mem_size = buffers; - RMT.rx_conf[channel].conf0.carrier_en = 0; - RMT.rx_conf[channel].conf0.carrier_out_lv = 0; - RMT.rx_conf[channel].conf0.idle_thres = 0x80; - RMT.rx_conf[channel].conf1.rx_filter_en = 0; - RMT.rx_conf[channel].conf1.rx_filter_thres = 0; - RMT.rx_conf[channel].conf1.mem_rst = 0; - RMT.rx_conf[channel].conf1.mem_rx_wrap_en = 0; - RMT.rx_conf[channel].conf1.afifo_rst = 0; - RMT.rx_conf[channel].conf1.conf_update = 0; - RMT.rx_conf[channel].conf1.rx_en = 1; - RMT.rx_conf[channel].conf1.mem_owner = 1; - RMT.rx_conf[channel].conf1.mem_wr_rst = 1; - } -#else - RMT.conf_ch[channel].conf0.div_cnt = 1; - RMT.conf_ch[channel].conf0.mem_size = buffers; - RMT.conf_ch[channel].conf0.carrier_en = 0; - RMT.conf_ch[channel].conf0.carrier_out_lv = 0; -#if CONFIG_IDF_TARGET_ESP32 - RMT.conf_ch[channel].conf0.mem_pd = 0; -#endif - RMT.conf_ch[channel].conf0.idle_thres = 0x80; - RMT.conf_ch[channel].conf1.rx_en = 0; - RMT.conf_ch[channel].conf1.tx_conti_mode = 0; -#if CONFIG_IDF_TARGET_ESP32 - RMT.conf_ch[channel].conf1.ref_cnt_rst = 0; -#else - RMT.conf_ch[channel].conf1.chk_rx_carrier_en = 0; -#endif - RMT.conf_ch[channel].conf1.rx_filter_en = 0; - RMT.conf_ch[channel].conf1.rx_filter_thres = 0; - RMT.conf_ch[channel].conf1.idle_out_lv = 0; // signal level for idle - RMT.conf_ch[channel].conf1.idle_out_en = 1; // enable idle - RMT.conf_ch[channel].conf1.ref_always_on = 0; // base clock - - RMT.apb_conf.fifo_mask = 1; + rmt_config_t config = RMT_DEFAULT_ARD_CONFIG_RX(pin, channel, buffers); + esp_err_code = rmt_config(&config); + if (esp_err_code == ESP_OK) + esp_err_code = rmt_driver_install(channel, 1024, 0); + if (esp_err_code == ESP_OK) + esp_err_code = rmt_set_memory_owner(channel, RMT_MEM_OWNER_RX); + log_d(" -- %s RMT - CH %d - %d RAM Blocks - pin %d\n", tx_not_rx?"TX":"RX", channel, buffers, pin); + } - if (tx_not_rx) { - // RMT.conf_ch[channel].conf1.rx_en = 0; - RMT.conf_ch[channel].conf1.mem_owner = 0; - RMT.conf_ch[channel].conf1.mem_rd_rst = 1; - } else { - // RMT.conf_ch[channel].conf1.rx_en = 1; - RMT.conf_ch[channel].conf1.mem_owner = 1; - RMT.conf_ch[channel].conf1.mem_wr_rst = 1; - } -#endif - // install interrupt if at least one channel is active - if (!intr_handle) { - esp_intr_alloc(ETS_RMT_INTR_SOURCE, (int)ARDUINO_ISR_FLAG, _rmt_isr, NULL, &intr_handle); - } RMT_MUTEX_UNLOCK(channel); - return rmt; -} - -/** - * Private methods definitions - */ -bool _rmtSendOnce(rmt_obj_t* rmt, rmt_data_t* data, size_t size, bool continuous) -{ - if (!rmt) { - return false; - } - int channel = rmt->channel; -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.sys_conf.fifo_mask = 1; -#else - RMT.apb_conf.fifo_mask = 1; -#endif - if (data && size>0) { - size_t i; - volatile uint32_t* rmt_mem_ptr = &(RMTMEM.chan[channel].data32[0].val); - for (i = 0; i < size; i++) { - *rmt_mem_ptr++ = data[i].val; - } - // tx end mark - RMTMEM.chan[channel].data32[size].val = 0; - } - - RMT_MUTEX_LOCK(channel); -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.tx_conf[channel].tx_conti_mode = continuous; - RMT.tx_conf[channel].mem_rd_rst = 1; - RMT.tx_conf[channel].tx_start = 1; -#else - RMT.conf_ch[channel].conf1.tx_conti_mode = continuous; - RMT.conf_ch[channel].conf1.mem_rd_rst = 1; - RMT.conf_ch[channel].conf1.tx_start = 1; -#endif - RMT_MUTEX_UNLOCK(channel); - - return true; -} - - -static rmt_obj_t* _rmtAllocate(int pin, int from, int size) -{ - size_t i; - // setup how many buffers shall we use - g_rmt_objects[from].buffers = size; - - for (i=0; i 0) { - size_t i; - uint32_t * data = g_rmt_objects[ch].data_ptr; - // in case of callback, provide switching between memories - if (g_rmt_objects[ch].cb) { - if (g_rmt_objects[ch].tx_state & E_FIRST_HALF) { - g_rmt_objects[ch].tx_state &= ~E_FIRST_HALF; - } else { - g_rmt_objects[ch].tx_state |= E_FIRST_HALF; - data += MAX_DATA_PER_CHANNEL*(g_rmt_objects[ch].buffers); - } - } - uint32_t *data_received = data; - for (i = 0; i < g_rmt_objects[ch].data_size; i++ ) { - *data++ = RMTMEM.chan[ch].data32[i].val; - } - if (g_rmt_objects[ch].cb) { - // actually received data ptr - (g_rmt_objects[ch].cb)(data_received, _rmt_get_mem_len(ch), g_rmt_objects[ch].arg); - - // restart the reception -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.rx_conf[ch].conf1.mem_owner = 1; - RMT.rx_conf[ch].conf1.mem_wr_rst = 1; - RMT.rx_conf[ch].conf1.rx_en = 1; -#else - RMT.conf_ch[ch].conf1.mem_owner = 1; - RMT.conf_ch[ch].conf1.mem_wr_rst = 1; - RMT.conf_ch[ch].conf1.rx_en = 1; -#endif - RMT.int_ena.val |= _INT_RX_END(ch); - } else { - // if not callback provide, expect only one Rx - g_rmt_objects[ch].intr_mode &= ~E_RX_INTR; - } - } - } else { - // Report error and disable Rx interrupt - log_e("Unexpected Rx interrupt!\n"); // TODO: eplace messages with log_X - RMT.int_ena.val &= ~_INT_RX_END(ch); - } - - - } - - if (intr_val & _INT_ERROR(ch)) { - // clear the flag - RMT.int_clr.val = _INT_ERROR(ch); - RMT.int_ena.val &= ~_INT_ERROR(ch); - // report error - log_e("RMT Error %d!\n", ch); - if (g_rmt_objects[ch].events) { - xEventGroupSetBits(g_rmt_objects[ch].events, RMT_FLAG_ERROR); - } - // reset memory -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.tx_conf[ch].mem_rd_rst = 1; - RMT.tx_conf[ch].mem_rd_rst = 0; - RMT.rx_conf[ch].conf1.mem_wr_rst = 1; - RMT.rx_conf[ch].conf1.mem_wr_rst = 0; -#else - RMT.conf_ch[ch].conf1.mem_rd_rst = 1; - RMT.conf_ch[ch].conf1.mem_rd_rst = 0; - RMT.conf_ch[ch].conf1.mem_wr_rst = 1; - RMT.conf_ch[ch].conf1.mem_wr_rst = 0; -#endif - } - - if (intr_val & _INT_TX_END(ch)) { - - RMT.int_clr.val = _INT_TX_END(ch); - _rmt_tx_mem_second(ch); - } - - if (intr_val & _INT_THR_EVNT(ch)) { - // clear the flag - RMT.int_clr.val = _INT_THR_EVNT(ch); -#if CONFIG_IDF_TARGET_ESP32C3 - //RMT.int_clr.val = _INT_TX_END(ch); - //RMT.int_ena.val |= _INT_TX_END(ch); -#endif - - // initial setup of continuous mode - if (g_rmt_objects[ch].tx_state & E_SET_CONTI) { -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.tx_conf[ch].tx_conti_mode = 1; -#else - RMT.conf_ch[ch].conf1.tx_conti_mode = 1; -#endif - g_rmt_objects[ch].intr_mode &= ~E_SET_CONTI; - } - _rmt_tx_mem_first(ch); - } - } - //DEBUG_INTERRUPT_END(4); -} - -static void ARDUINO_ISR_ATTR _rmt_tx_mem_second(uint8_t ch) -{ - DEBUG_INTERRUPT_START(4) - uint32_t* data = g_rmt_objects[ch].data_ptr; - int half_tx_nr = MAX_DATA_PER_ITTERATION/2; - int i; - -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.tx_lim[ch].limit = half_tx_nr+2; -#else - RMT.tx_lim_ch[ch].limit = half_tx_nr+2; -#endif - RMT.int_clr.val = _INT_THR_EVNT(ch); - RMT.int_ena.val |= _INT_THR_EVNT(ch); -#if CONFIG_IDF_TARGET_ESP32C3 - //RMT.int_clr.val = _INT_TX_END(ch); - //RMT.int_ena.val &= ~_INT_TX_END(ch); -#endif - - g_rmt_objects[ch].tx_state |= E_FIRST_HALF; - - if (data) { - int remaining_size = g_rmt_objects[ch].data_size; - //ets_printf("RMT Tx[%d] %d\n", ch, remaining_size); - // will the remaining data occupy the entire halfbuffer - if (remaining_size > half_tx_nr) { - for (i = 0; i < half_tx_nr; i++) { - RMTMEM.chan[ch].data32[half_tx_nr+i].val = data[i]; - } - g_rmt_objects[ch].data_size -= half_tx_nr; - g_rmt_objects[ch].data_ptr += half_tx_nr; - } else { - for (i = 0; i < half_tx_nr; i++) { - if (i < remaining_size) { - RMTMEM.chan[ch].data32[half_tx_nr+i].val = data[i]; - } else { - RMTMEM.chan[ch].data32[half_tx_nr+i].val = 0x000F000F; - } - } - g_rmt_objects[ch].data_ptr = NULL; - - } -#if CONFIG_IDF_TARGET_ESP32C3 - RMTMEM.chan[ch].data32[half_tx_nr+i].val = 0; - RMT.tx_conf[ch].tx_start = 1; -#endif - } else if ((!(g_rmt_objects[ch].tx_state & E_LAST_DATA)) && - (!(g_rmt_objects[ch].tx_state & E_END_TRANS))) { - //ets_printf("RMT Tx finishing %d!\n", ch); - for (i = 0; i < half_tx_nr; i++) { - RMTMEM.chan[ch].data32[half_tx_nr+i].val = 0x000F000F; - } - RMTMEM.chan[ch].data32[half_tx_nr+i].val = 0; - g_rmt_objects[ch].tx_state |= E_LAST_DATA; -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.tx_conf[ch].tx_conti_mode = 0; -#else - RMT.conf_ch[ch].conf1.tx_conti_mode = 0; -#endif + if (esp_err_code == ESP_OK) { + return rmt; } else { - //ets_printf("RMT Tx finished %d!\n", ch); -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.tx_conf[ch].tx_conti_mode = 0; -#else - RMT.conf_ch[ch].conf1.tx_conti_mode = 0; -#endif - RMT.int_ena.val &= ~_INT_TX_END(ch); - RMT.int_ena.val &= ~_INT_THR_EVNT(ch); - g_rmt_objects[ch].intr_mode = E_NO_INTR; - g_rmt_objects[ch].tx_state = E_INACTIVE; - } - DEBUG_INTERRUPT_END(4); -} - -static void ARDUINO_ISR_ATTR _rmt_tx_mem_first(uint8_t ch) -{ - DEBUG_INTERRUPT_START(2); - uint32_t* data = g_rmt_objects[ch].data_ptr; - int half_tx_nr = MAX_DATA_PER_ITTERATION/2; - int i; - RMT.int_ena.val &= ~_INT_THR_EVNT(ch); -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.tx_lim[ch].limit = 0; -#else - RMT.tx_lim_ch[ch].limit = 0; -#endif - - if (data) { - int remaining_size = g_rmt_objects[ch].data_size; - //ets_printf("RMT TxF[%d] %d\n", ch, remaining_size); - - // will the remaining data occupy the entire halfbuffer - if (remaining_size > half_tx_nr) { - RMTMEM.chan[ch].data32[0].val = data[0] - 1; - for (i = 1; i < half_tx_nr; i++) { - RMTMEM.chan[ch].data32[i].val = data[i]; - } - g_rmt_objects[ch].tx_state &= ~E_FIRST_HALF; - // turn off the treshold interrupt - RMT.int_ena.val &= ~_INT_THR_EVNT(ch); -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.tx_lim[ch].limit = 0; -#else - RMT.tx_lim_ch[ch].limit = 0; -#endif - g_rmt_objects[ch].data_size -= half_tx_nr; - g_rmt_objects[ch].data_ptr += half_tx_nr; - } else { - RMTMEM.chan[ch].data32[0].val = data[0] - 1; - for (i = 1; i < half_tx_nr; i++) { - if (i < remaining_size) { - RMTMEM.chan[ch].data32[i].val = data[i]; - } else { - RMTMEM.chan[ch].data32[i].val = 0x000F000F; - } - } - - g_rmt_objects[ch].tx_state &= ~E_FIRST_HALF; - g_rmt_objects[ch].data_ptr = NULL; - } - } else { - //ets_printf("RMT TxF finished %d!\n", ch); - for (i = 0; i < half_tx_nr; i++) { - RMTMEM.chan[ch].data32[i].val = 0x000F000F; - } - RMTMEM.chan[ch].data32[i].val = 0; - - g_rmt_objects[ch].tx_state &= ~E_FIRST_HALF; -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.tx_lim[ch].limit = 0; -#else - RMT.tx_lim_ch[ch].limit = 0; -#endif - g_rmt_objects[ch].tx_state |= E_LAST_DATA; -#if CONFIG_IDF_TARGET_ESP32C3 - RMT.tx_conf[ch].tx_conti_mode = 0; -#else - RMT.conf_ch[ch].conf1.tx_conti_mode = 0; -#endif - } - DEBUG_INTERRUPT_END(2); -} - -static int ARDUINO_ISR_ATTR _rmt_get_mem_len(uint8_t channel) -{ -#if CONFIG_IDF_TARGET_ESP32C3 - int block_num = RMT.rx_conf[channel].conf0.mem_size; - int item_block_len = block_num * 48; -#else - int block_num = RMT.conf_ch[channel].conf0.mem_size; - int item_block_len = block_num * 64; -#endif - volatile rmt_item32_t* data = RMTMEM.chan[channel].data32; - int idx; - for(idx = 0; idx < item_block_len; idx++) { - if(data[idx].duration0 == 0) { - return idx; - } else if(data[idx].duration1 == 0) { - return idx + 1; - } + log_e("RMT failed to initilize."); + return NULL; } - return idx; } diff --git a/cores/esp32/esp32-hal-rmt.h b/cores/esp32/esp32-hal-rmt.h index cce6c8c8107..201fe594009 100644 --- a/cores/esp32/esp32-hal-rmt.h +++ b/cores/esp32/esp32-hal-rmt.h @@ -25,6 +25,9 @@ extern "C" { #define RMT_FLAG_ERROR (4) #define RMT_FLAGS_ALL (RMT_FLAG_TX_DONE | RMT_FLAG_RX_DONE | RMT_FLAG_ERROR) +#define RMT_TX_MODE true +#define RMT_RX_MODE false + struct rmt_obj_s; typedef enum { @@ -54,6 +57,13 @@ typedef struct { }; } rmt_data_t; + +/** +* Prints object information +* +*/ +void _rmtDumpStatus(rmt_obj_t* rmt); + /** * Initialize the object * @@ -69,10 +79,17 @@ float rmtSetTick(rmt_obj_t* rmt, float tick); /** * Sending data in one-go mode or continual mode * (more data being send while updating buffers in interrupts) -* +* Non-Blocking mode - returns right after executing */ bool rmtWrite(rmt_obj_t* rmt, rmt_data_t* data, size_t size); +/** +* Sending data in one-go mode or continual mode +* (more data being send while updating buffers in interrupts) +* Blocking mode - only returns when data has been sent +*/ +bool rmtWriteBlocking(rmt_obj_t* rmt, rmt_data_t* data, size_t size); + /** * Loop data up to the reserved memsize continuously * diff --git a/libraries/ESP32/examples/RMT/RMTCallback/RMTCallback.ino b/libraries/ESP32/examples/RMT/RMTCallback/RMTCallback.ino index 6a4c63bc7e5..7fd56d8a453 100644 --- a/libraries/ESP32/examples/RMT/RMTCallback/RMTCallback.ino +++ b/libraries/ESP32/examples/RMT/RMTCallback/RMTCallback.ino @@ -12,7 +12,7 @@ class MyProcessor { public: MyProcessor(uint8_t pin, float nanoTicks) { - assert((rmt_recv = rmtInit(21, false, RMT_MEM_192))); + assert((rmt_recv = rmtInit(21, RMT_RX_MODE, RMT_MEM_192))); realNanoTick = rmtSetTick(rmt_recv, nanoTicks); }; @@ -61,4 +61,4 @@ void loop() { Serial.printf("GPIO 4: %08x 5: %08x 6: %08x\n", mp1.val(), mp2.val(), mp3.val()); delay(500); -} +} \ No newline at end of file diff --git a/libraries/ESP32/examples/RMT/RMTLoopback/RMTLoopback.ino b/libraries/ESP32/examples/RMT/RMTLoopback/RMTLoopback.ino index 248aad3fa36..6b1ee2fa55d 100644 --- a/libraries/ESP32/examples/RMT/RMTLoopback/RMTLoopback.ino +++ b/libraries/ESP32/examples/RMT/RMTLoopback/RMTLoopback.ino @@ -5,6 +5,17 @@ #include "esp32-hal.h" +#if CONFIG_IDF_TARGET_ESP32C3 +// ESP32 C3 has only 2 channels for RX and 2 for TX, thus MAX RMT_MEM is 128 +#define RMT_TX_PIN 4 +#define RMT_RX_PIN 5 +#define RMT_MEM_RX RMT_MEM_128 +#else +#define RMT_TX_PIN 18 +#define RMT_RX_PIN 21 +#define RMT_MEM_RX RMT_MEM_192 +#endif + rmt_data_t my_data[256]; rmt_data_t data[256]; @@ -18,18 +29,19 @@ void setup() Serial.begin(115200); events = xEventGroupCreate(); - if ((rmt_send = rmtInit(18, true, RMT_MEM_64)) == NULL) + if ((rmt_send = rmtInit(RMT_TX_PIN, RMT_TX_MODE, RMT_MEM_64)) == NULL) { Serial.println("init sender failed\n"); } - if ((rmt_recv = rmtInit(21, false, RMT_MEM_192)) == NULL) + if ((rmt_recv = rmtInit(RMT_RX_PIN, RMT_RX_MODE, RMT_MEM_RX)) == NULL) { Serial.println("init receiver failed\n"); } float realTick = rmtSetTick(rmt_send, 100); printf("real tick set to: %fns\n", realTick); - + // both will keep same tick + realTick = rmtSetTick(rmt_recv, 100); } void loop() diff --git a/libraries/ESP32/examples/RMT/RMTReadXJT/RMTReadXJT.ino b/libraries/ESP32/examples/RMT/RMTReadXJT/RMTReadXJT.ino index 39978d26dab..f87dd220513 100644 --- a/libraries/ESP32/examples/RMT/RMTReadXJT/RMTReadXJT.ino +++ b/libraries/ESP32/examples/RMT/RMTReadXJT/RMTReadXJT.ino @@ -182,7 +182,7 @@ void setup() Serial.begin(115200); // Initialize the channel to capture up to 192 items - if ((rmt_recv = rmtInit(21, false, RMT_MEM_192)) == NULL) + if ((rmt_recv = rmtInit(21, RMT_RX_MODE, RMT_MEM_192)) == NULL) { Serial.println("init receiver failed\n"); } diff --git a/libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino b/libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino index 5067140fbd6..094e5f0fc1d 100644 --- a/libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino +++ b/libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino @@ -41,7 +41,7 @@ void setup() { Serial.begin(115200); - if ((rmt_send = rmtInit(18, true, RMT_MEM_64)) == NULL) + if ((rmt_send = rmtInit(18, RMT_TX_MODE, RMT_MEM_64)) == NULL) { Serial.println("init sender failed\n"); } diff --git a/libraries/README.md b/libraries/README.md index cab7bd23710..d7e0e8fbd29 100644 --- a/libraries/README.md +++ b/libraries/README.md @@ -40,6 +40,9 @@ arduino-esp32 includes libraries for Arduino compatibility along with some objec ### ESPmDNS mDNS service advertising +### Ethernet + Ethernet networking + ### FFat FAT indexed filesystem on SPI flash @@ -52,6 +55,12 @@ arduino-esp32 includes libraries for Arduino compatibility along with some objec ### HTTPUpdate Download a firmware update from HTTPd and apply it using Update +### HTTPUpdateServer + Upload a firmware for the update from HTTPd + +### LittleFS + LittleFS (File System) + ### NetBIOS NetBIOS name advertiser @@ -79,6 +88,9 @@ arduino-esp32 includes libraries for Arduino compatibility along with some objec ### Update Sketch Update using ESP32 OTA functionality +### USB + Universal Serial Bus driver (device only) + ### WebServer A simple HTTP daemon @@ -89,4 +101,4 @@ arduino-esp32 includes libraries for Arduino compatibility along with some objec Arduino compatible WiFi client object using embedded encryption ### Wire - Arduino compatible I2C driver (master only) + Arduino compatible I2C driver diff --git a/platform.txt b/platform.txt index 18a12709c72..2a8a3283b1d 100644 --- a/platform.txt +++ b/platform.txt @@ -23,7 +23,7 @@ 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-beta1-183-gf23dcd3555" -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_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/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/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.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-beta1-189-ga79dc75f0a" -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_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/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/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.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 @@ -38,7 +38,7 @@ build.extra_flags.esp32=-DARDUINO_USB_CDC_ON_BOOT=0 # # 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-beta1-183-gf23dcd3555" -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/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-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-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.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-beta1-189-ga79dc75f0a" -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/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-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-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.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 @@ -53,7 +53,7 @@ build.extra_flags.esp32s2=-DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} -DARDUIN # # 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-beta1-183-gf23dcd3555" -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.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-beta1-189-ga79dc75f0a" -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 diff --git a/tools/platformio-build-esp32.py b/tools/platformio-build-esp32.py index 4a186894eac..fbbfcf3d8e5 100644 --- a/tools/platformio-build-esp32.py +++ b/tools/platformio-build-esp32.py @@ -303,7 +303,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'), + ("IDF_VER", '\\"v4.4-beta1-189-ga79dc75f0a\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32c3.py b/tools/platformio-build-esp32c3.py index 1c9273ffe4d..f0f86d5ba9e 100644 --- a/tools/platformio-build-esp32c3.py +++ b/tools/platformio-build-esp32c3.py @@ -293,7 +293,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'), + ("IDF_VER", '\\"v4.4-beta1-189-ga79dc75f0a\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32s2.py b/tools/platformio-build-esp32s2.py index cee6d54292d..5e4d496de6e 100644 --- a/tools/platformio-build-esp32s2.py +++ b/tools/platformio-build-esp32s2.py @@ -290,7 +290,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'), + ("IDF_VER", '\\"v4.4-beta1-189-ga79dc75f0a\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/sdk/esp32/include/config/sdkconfig.h b/tools/sdk/esp32/include/config/sdkconfig.h index fbafe0602ba..fa51634dabd 100644 --- a/tools/sdk/esp32/include/config/sdkconfig.h +++ b/tools/sdk/esp32/include/config/sdkconfig.h @@ -406,7 +406,9 @@ #define CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS 5 #define CONFIG_LWIP_ICMP 1 #define CONFIG_LWIP_MAX_RAW_PCBS 16 -#define CONFIG_LWIP_SNTP_MAX_SERVERS 1 +#define CONFIG_LWIP_SNTP_MAX_SERVERS 3 +#define CONFIG_LWIP_DHCP_GET_NTP_SRV 1 +#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1 #define CONFIG_LWIP_SNTP_UPDATE_DELAY 3600000 #define CONFIG_LWIP_ESP_LWIP_ASSERT 1 #define CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT 1 @@ -677,5 +679,5 @@ #define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS #define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP -#define CONFIG_ARDUINO_IDF_COMMIT "f23dcd3555" +#define CONFIG_ARDUINO_IDF_COMMIT "a79dc75f0a" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp index c5b5bf02dfc..99fdc2ed607 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp @@ -66,19 +66,18 @@ namespace dl this->output_exponent = input.exponent; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } this->output->set_exponent(this->output_exponent); - this->output->set_shape(this->output_shape); + this->output->set_shape(input.shape); this->output->expand_dims(this->axis); this->output->free_element(); } else { this->output = &input; - this->output->set_shape(this->output_shape); this->output->expand_dims(this->axis); } this->output_shape = this->output->shape; diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp index 3d96fa1f042..380df1a413b 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp @@ -59,7 +59,7 @@ namespace dl this->output_shape = {input.get_size()}; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_leakyrelu.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_leakyrelu.hpp index a972e135006..773c62430f2 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_leakyrelu.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_leakyrelu.hpp @@ -10,14 +10,14 @@ namespace dl namespace layer { /** - * @brief LeakyReLU(input). + * @brief LeakyRelu(input). * * @tparam feature_t supports int16_t and int8_t, * - int16_t: stands for operation in int16_t quantize * - int8_t: stands for operation in int8_t quantize */ template - class LeakyReLU : public Layer + class LeakyRelu : public Layer { private: feature_t activation_alpha; /**/ @@ -28,7 +28,7 @@ namespace dl std::vector output_shape; /**/ public: /** - * @brief Construct a new LeakyReLU object + * @brief Construct a new LeakyRelu object * * @param activation_alpha quantized alpha * @param activation_exponent exponent of quantized alpha @@ -36,7 +36,7 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - LeakyReLU(const int activation_alpha, const int activation_exponent, const char *name = "LeakyReLU", bool inplace = false) : Layer(name), output(NULL), output_shape({}) + LeakyRelu(const int activation_alpha, const int activation_exponent, const char *name = "LeakyRelu", bool inplace = false) : Layer(name), output(NULL), output_shape({}) { this->activation_alpha = activation_alpha; this->activation_exponent = activation_exponent; @@ -44,10 +44,10 @@ namespace dl } /** - * @brief Destroy the LeakyReLU object + * @brief Destroy the LeakyRelu object * */ - ~LeakyReLU() + ~LeakyRelu() { if ((!this->inplace) && (this->output != NULL)) { @@ -66,7 +66,7 @@ namespace dl this->output_shape = input.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -90,7 +90,7 @@ namespace dl /** * @brief Get the output * - * @return Tensor& LeakyReLU result + * @return Tensor& LeakyRelu result */ Tensor &get_output() { @@ -98,11 +98,11 @@ namespace dl } /** - * @brief Call LeakyReLU operation. + * @brief Call LeakyRelu operation. * * @param input as an input * @param assign_core not effective yet - * @return LeakyReLU result + * @return LeakyRelu result */ Tensor &call(Tensor &input, const std::vector &assign_core = CONFIG_DEFAULT_ASSIGN_CORE) { @@ -130,7 +130,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::leakyrelu(*this->output, input, this->activation_alpha, this->activation_exponent, assign_core); + nn::leakyrelu(*this->output, input, this->activation_alpha, this->activation_exponent, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); } diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max2d.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max2d.hpp index c6be15638ab..e7defa0b08f 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max2d.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max2d.hpp @@ -68,7 +68,7 @@ namespace dl if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -132,7 +132,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::max2d(*this->output, input0, input1, assign_core); + nn::max2d(*this->output, input0, input1, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "max2d"); } diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_min2d.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_min2d.hpp index e38fbf3d0d2..609566348d3 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_min2d.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_min2d.hpp @@ -68,7 +68,7 @@ namespace dl if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -132,7 +132,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::min2d(*this->output, input0, input1, assign_core); + nn::min2d(*this->output, input0, input1, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "min2d"); } diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_mul2d.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_mul2d.hpp index 21bcca7a81e..a391c790335 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_mul2d.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_mul2d.hpp @@ -75,7 +75,7 @@ namespace dl if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -140,7 +140,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::mul2d(*this->output, input0, input1, this->activation, assign_core); + nn::mul2d(*this->output, input0, input1, this->activation, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "mul2d"); } diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_prelu.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_prelu.hpp index 96168a783b1..2141e986646 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_prelu.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_prelu.hpp @@ -10,17 +10,17 @@ namespace dl namespace layer { /** - * @brief PReLU(input). + * @brief PRelu(input). * * @tparam feature_t supports int16_t and int8_t, * - int16_t: stands for operation in int16_t quantize * - int8_t: stands for operation in int8_t quantize */ template - class PReLU : public Layer + class PRelu : public Layer { private: - feature_t *activation_element; /**/ + const feature_t *activation_element; /**/ int activation_exponent; /**/ Tensor *output; /**/ bool inplace; /* output_shape; /**/ public: /** - * @brief Construct a new PReLU object + * @brief Construct a new PRelu object * * @param activation_element quantized alpha elements along channel axis * @param activation_exponent exponent of quantized alpha elements @@ -36,10 +36,10 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - PReLU(const feature_t *activation_element, + PRelu(const feature_t *activation_element, const int activation_exponent = 0, - const char *name = NULL, - bool inplace = "PReLU") : Layer(name), + const char *name = "PRelu", + bool inplace = false) : Layer(name), activation_element(activation_element), activation_exponent(activation_exponent), output(NULL), @@ -49,10 +49,10 @@ namespace dl } /** - * @brief Destroy the PReLU object + * @brief Destroy the PRelu object * */ - ~PReLU() + ~PRelu() { if ((!this->inplace) && (this->output != NULL)) { @@ -71,7 +71,7 @@ namespace dl this->output_shape = input.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -94,7 +94,7 @@ namespace dl /** * @brief Get the output * - * @return Tensor& PReLU result + * @return Tensor& PRelu result */ Tensor &get_output() { @@ -102,11 +102,11 @@ namespace dl } /** - * @brief Call PReLU operation. + * @brief Call PRelu operation. * * @param input as an input * @param assign_core not effective yet - * @return PReLU result + * @return PRelu result */ Tensor &call(Tensor &input, const std::vector &assign_core = CONFIG_DEFAULT_ASSIGN_CORE) { @@ -125,7 +125,7 @@ namespace dl DL_LOG_LAYER_LATENCY_START(); nn::prelu(*this->output, input, this->activation_element, this->activation_exponent, assign_core); - DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "prelu"); } else { @@ -135,7 +135,7 @@ namespace dl this->output->set_shape(this->output_shape); } nn::prelu(*this->output, input, this->activation_element, this->activation_exponent, assign_core); - DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "prelu"); } return *this->output; diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp index 1a7a40c5856..dff05c7f420 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp @@ -61,7 +61,7 @@ namespace dl this->output_shape = input.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp index d800c17fa71..2ef76ef96d8 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp @@ -64,19 +64,21 @@ namespace dl this->output_exponent = input.exponent; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } this->output->set_exponent(this->output_exponent); - this->output->set_shape(this->output_shape); + this->output->set_shape(input.shape); + this->output->reshape(this->output_shape); this->output->free_element(); } else { this->output = &input; - this->output->set_shape(this->output_shape); + this->output->reshape(this->output_shape); } + this->output_shape = this->output->shape; if (print_shape) { diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp index 7e692aa1cd8..710901a3d02 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp @@ -66,7 +66,7 @@ namespace dl this->output_exponent = input.exponent; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -78,7 +78,6 @@ namespace dl else { this->output = &input; - this->output->set_shape(input.shape); this->output->squeeze(this->axis); } this->output_shape = this->output->shape; diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp index 47f39c5674a..61bcc9f2804 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp @@ -71,7 +71,7 @@ namespace dl this->output_shape = input0.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -120,12 +120,12 @@ namespace dl { this->output->set_shape(this->output_shape); } - this->output.malloc_element(); + this->output->malloc_element(); this->output->set_exponent(input0.exponent); DL_LOG_LAYER_LATENCY_END(this->name, "apply"); DL_LOG_LAYER_LATENCY_START(); - nn::sub2d(this->output, input0, input1, this->activation, assign_core); + nn::sub2d(*this->output, input0, input1, this->activation, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "sub2d"); } else @@ -135,7 +135,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::sub2d(this->output, input0, input1, this->activation, assign_core, this->output_exponent); + nn::sub2d(*this->output, input0, input1, this->activation, assign_core, this->output_exponent); DL_LOG_LAYER_LATENCY_END(this->name, "sub2d"); } return *this->output; diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp index dab9addf678..87e9cce5ce4 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp @@ -63,13 +63,24 @@ namespace dl { this->output_exponent = input.exponent; this->output_shape = input.shape; - for (int i = 0; i < this->perm.size(); i++) + int dims = this->output_shape.size(); + if (this->perm.size() == 0) { + for (int i = dims - 1; i >= 0; i--) + { + this->perm.push_back(i); + } + } + for (int i = 0; i < dims; ++i) + { + if (this->perm[i] < 0) + this->perm[i] = dims + this->perm[i]; this->output_shape[i] = input.shape[this->perm[i]]; } + if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } diff --git a/tools/sdk/esp32/include/esp-face/include/typedef/dl_variable.hpp b/tools/sdk/esp32/include/esp-face/include/typedef/dl_variable.hpp index 471b3028f1a..118f6430575 100644 --- a/tools/sdk/esp32/include/esp-face/include/typedef/dl_variable.hpp +++ b/tools/sdk/esp32/include/esp-face/include/typedef/dl_variable.hpp @@ -396,9 +396,6 @@ namespace dl * @brief print all the element of the Tensor. * * @param message to print - * @param with_padding one of true or false, - * - true: the padding element will also be ed - * - false: the padding element will not be ed */ void print_all(const char *message = "") { @@ -553,4 +550,4 @@ namespace dl return output; } }; -} // namespace dl \ No newline at end of file +} // namespace dl diff --git a/tools/sdk/esp32/include/hal/esp32/include/hal/mcpwm_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/mcpwm_ll.h index 3e2b4b762c8..44c19c85d76 100644 --- a/tools/sdk/esp32/include/hal/esp32/include/hal/mcpwm_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/mcpwm_ll.h @@ -1,16 +1,8 @@ -// Copyright 2015-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. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /******************************************************************************* * NOTICE @@ -339,17 +331,15 @@ static inline void mcpwm_ll_timer_set_count_mode(mcpwm_dev_t *mcpwm, int timer_i static inline mcpwm_timer_count_mode_t mcpwm_ll_timer_get_count_mode(mcpwm_dev_t *mcpwm, int timer_id) { switch (mcpwm->timer[timer_id].timer_cfg1.timer_mod) { - case 0: - return MCPWM_TIMER_COUNT_MODE_PAUSE; case 1: return MCPWM_TIMER_COUNT_MODE_UP; case 2: return MCPWM_TIMER_COUNT_MODE_DOWN; case 3: return MCPWM_TIMER_COUNT_MODE_UP_DOWN; + case 0: default: - HAL_ASSERT(false && "unknown count mode"); - return mcpwm->timer[timer_id].timer_cfg1.timer_mod; + return MCPWM_TIMER_COUNT_MODE_PAUSE; } } diff --git a/tools/sdk/esp32/ld/libcat_face_detect.a b/tools/sdk/esp32/ld/libcat_face_detect.a index 6962cd06027..c7a9cb5440d 100644 Binary files a/tools/sdk/esp32/ld/libcat_face_detect.a and b/tools/sdk/esp32/ld/libcat_face_detect.a differ diff --git a/tools/sdk/esp32/ld/libcolor_detect.a b/tools/sdk/esp32/ld/libcolor_detect.a index 4e3e520507c..29267ed392a 100644 Binary files a/tools/sdk/esp32/ld/libcolor_detect.a and b/tools/sdk/esp32/ld/libcolor_detect.a differ diff --git a/tools/sdk/esp32/ld/libdl.a b/tools/sdk/esp32/ld/libdl.a index d0951c92ac8..8b5db786f2d 100644 Binary files a/tools/sdk/esp32/ld/libdl.a and b/tools/sdk/esp32/ld/libdl.a differ diff --git a/tools/sdk/esp32/ld/libhuman_face_detect.a b/tools/sdk/esp32/ld/libhuman_face_detect.a index aae3e51eb07..cd849d2c661 100644 Binary files a/tools/sdk/esp32/ld/libhuman_face_detect.a and b/tools/sdk/esp32/ld/libhuman_face_detect.a differ diff --git a/tools/sdk/esp32/ld/libmfn.a b/tools/sdk/esp32/ld/libmfn.a index 123df59825a..fcc4727cc1b 100644 Binary files a/tools/sdk/esp32/ld/libmfn.a and b/tools/sdk/esp32/ld/libmfn.a differ diff --git a/tools/sdk/esp32/lib/libapp_update.a b/tools/sdk/esp32/lib/libapp_update.a index a17117e3b5a..34b6f44ca46 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/libdriver.a b/tools/sdk/esp32/lib/libdriver.a index 86d3a749119..e042cb61eb3 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/libesp_littlefs.a b/tools/sdk/esp32/lib/libesp_littlefs.a index 596e551e9b5..b28436b2548 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_netif.a b/tools/sdk/esp32/lib/libesp_netif.a index 189978f19c8..22dda939c2a 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_rainmaker.a b/tools/sdk/esp32/lib/libesp_rainmaker.a index cc0c1d16456..73f1c801fe7 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_system.a b/tools/sdk/esp32/lib/libesp_system.a index ffefbac7751..c002693990d 100644 Binary files a/tools/sdk/esp32/lib/libesp_system.a and b/tools/sdk/esp32/lib/libesp_system.a differ diff --git a/tools/sdk/esp32/lib/liblwip.a b/tools/sdk/esp32/lib/liblwip.a index 15636acadb5..75d915bb0f1 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/sdkconfig b/tools/sdk/esp32/sdkconfig index 00535a1125f..89a757a8462 100644 --- a/tools/sdk/esp32/sdkconfig +++ b/tools/sdk/esp32/sdkconfig @@ -1115,8 +1115,9 @@ CONFIG_LWIP_MAX_RAW_PCBS=16 # # SNTP # -CONFIG_LWIP_SNTP_MAX_SERVERS=1 -# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +CONFIG_LWIP_SNTP_MAX_SERVERS=3 +CONFIG_LWIP_DHCP_GET_NTP_SRV=y +CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 # end of SNTP diff --git a/tools/sdk/esp32c3/include/config/sdkconfig.h b/tools/sdk/esp32c3/include/config/sdkconfig.h index 5a1722d2c3a..e2a47666e88 100644 --- a/tools/sdk/esp32c3/include/config/sdkconfig.h +++ b/tools/sdk/esp32c3/include/config/sdkconfig.h @@ -375,7 +375,9 @@ #define CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS 5 #define CONFIG_LWIP_ICMP 1 #define CONFIG_LWIP_MAX_RAW_PCBS 16 -#define CONFIG_LWIP_SNTP_MAX_SERVERS 1 +#define CONFIG_LWIP_SNTP_MAX_SERVERS 3 +#define CONFIG_LWIP_DHCP_GET_NTP_SRV 1 +#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1 #define CONFIG_LWIP_SNTP_UPDATE_DELAY 3600000 #define CONFIG_LWIP_ESP_LWIP_ASSERT 1 #define CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT 1 @@ -630,5 +632,5 @@ #define CONFIG_TIMER_TASK_STACK_SIZE CONFIG_ESP_TIMER_TASK_STACK_SIZE #define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX #define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE -#define CONFIG_ARDUINO_IDF_COMMIT "f23dcd3555" +#define CONFIG_ARDUINO_IDF_COMMIT "a79dc75f0a" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_expand_dims.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_expand_dims.hpp index c5b5bf02dfc..99fdc2ed607 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_expand_dims.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_expand_dims.hpp @@ -66,19 +66,18 @@ namespace dl this->output_exponent = input.exponent; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } this->output->set_exponent(this->output_exponent); - this->output->set_shape(this->output_shape); + this->output->set_shape(input.shape); this->output->expand_dims(this->axis); this->output->free_element(); } else { this->output = &input; - this->output->set_shape(this->output_shape); this->output->expand_dims(this->axis); } this->output_shape = this->output->shape; diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_flatten.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_flatten.hpp index 3d96fa1f042..380df1a413b 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_flatten.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_flatten.hpp @@ -59,7 +59,7 @@ namespace dl this->output_shape = {input.get_size()}; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_leakyrelu.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_leakyrelu.hpp index a972e135006..773c62430f2 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_leakyrelu.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_leakyrelu.hpp @@ -10,14 +10,14 @@ namespace dl namespace layer { /** - * @brief LeakyReLU(input). + * @brief LeakyRelu(input). * * @tparam feature_t supports int16_t and int8_t, * - int16_t: stands for operation in int16_t quantize * - int8_t: stands for operation in int8_t quantize */ template - class LeakyReLU : public Layer + class LeakyRelu : public Layer { private: feature_t activation_alpha; /**/ @@ -28,7 +28,7 @@ namespace dl std::vector output_shape; /**/ public: /** - * @brief Construct a new LeakyReLU object + * @brief Construct a new LeakyRelu object * * @param activation_alpha quantized alpha * @param activation_exponent exponent of quantized alpha @@ -36,7 +36,7 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - LeakyReLU(const int activation_alpha, const int activation_exponent, const char *name = "LeakyReLU", bool inplace = false) : Layer(name), output(NULL), output_shape({}) + LeakyRelu(const int activation_alpha, const int activation_exponent, const char *name = "LeakyRelu", bool inplace = false) : Layer(name), output(NULL), output_shape({}) { this->activation_alpha = activation_alpha; this->activation_exponent = activation_exponent; @@ -44,10 +44,10 @@ namespace dl } /** - * @brief Destroy the LeakyReLU object + * @brief Destroy the LeakyRelu object * */ - ~LeakyReLU() + ~LeakyRelu() { if ((!this->inplace) && (this->output != NULL)) { @@ -66,7 +66,7 @@ namespace dl this->output_shape = input.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -90,7 +90,7 @@ namespace dl /** * @brief Get the output * - * @return Tensor& LeakyReLU result + * @return Tensor& LeakyRelu result */ Tensor &get_output() { @@ -98,11 +98,11 @@ namespace dl } /** - * @brief Call LeakyReLU operation. + * @brief Call LeakyRelu operation. * * @param input as an input * @param assign_core not effective yet - * @return LeakyReLU result + * @return LeakyRelu result */ Tensor &call(Tensor &input, const std::vector &assign_core = CONFIG_DEFAULT_ASSIGN_CORE) { @@ -130,7 +130,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::leakyrelu(*this->output, input, this->activation_alpha, this->activation_exponent, assign_core); + nn::leakyrelu(*this->output, input, this->activation_alpha, this->activation_exponent, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); } diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_max2d.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_max2d.hpp index c6be15638ab..e7defa0b08f 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_max2d.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_max2d.hpp @@ -68,7 +68,7 @@ namespace dl if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -132,7 +132,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::max2d(*this->output, input0, input1, assign_core); + nn::max2d(*this->output, input0, input1, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "max2d"); } diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_min2d.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_min2d.hpp index e38fbf3d0d2..609566348d3 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_min2d.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_min2d.hpp @@ -68,7 +68,7 @@ namespace dl if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -132,7 +132,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::min2d(*this->output, input0, input1, assign_core); + nn::min2d(*this->output, input0, input1, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "min2d"); } diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_mul2d.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_mul2d.hpp index 21bcca7a81e..a391c790335 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_mul2d.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_mul2d.hpp @@ -75,7 +75,7 @@ namespace dl if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -140,7 +140,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::mul2d(*this->output, input0, input1, this->activation, assign_core); + nn::mul2d(*this->output, input0, input1, this->activation, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "mul2d"); } diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_prelu.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_prelu.hpp index 96168a783b1..2141e986646 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_prelu.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_prelu.hpp @@ -10,17 +10,17 @@ namespace dl namespace layer { /** - * @brief PReLU(input). + * @brief PRelu(input). * * @tparam feature_t supports int16_t and int8_t, * - int16_t: stands for operation in int16_t quantize * - int8_t: stands for operation in int8_t quantize */ template - class PReLU : public Layer + class PRelu : public Layer { private: - feature_t *activation_element; /**/ + const feature_t *activation_element; /**/ int activation_exponent; /**/ Tensor *output; /**/ bool inplace; /* output_shape; /**/ public: /** - * @brief Construct a new PReLU object + * @brief Construct a new PRelu object * * @param activation_element quantized alpha elements along channel axis * @param activation_exponent exponent of quantized alpha elements @@ -36,10 +36,10 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - PReLU(const feature_t *activation_element, + PRelu(const feature_t *activation_element, const int activation_exponent = 0, - const char *name = NULL, - bool inplace = "PReLU") : Layer(name), + const char *name = "PRelu", + bool inplace = false) : Layer(name), activation_element(activation_element), activation_exponent(activation_exponent), output(NULL), @@ -49,10 +49,10 @@ namespace dl } /** - * @brief Destroy the PReLU object + * @brief Destroy the PRelu object * */ - ~PReLU() + ~PRelu() { if ((!this->inplace) && (this->output != NULL)) { @@ -71,7 +71,7 @@ namespace dl this->output_shape = input.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -94,7 +94,7 @@ namespace dl /** * @brief Get the output * - * @return Tensor& PReLU result + * @return Tensor& PRelu result */ Tensor &get_output() { @@ -102,11 +102,11 @@ namespace dl } /** - * @brief Call PReLU operation. + * @brief Call PRelu operation. * * @param input as an input * @param assign_core not effective yet - * @return PReLU result + * @return PRelu result */ Tensor &call(Tensor &input, const std::vector &assign_core = CONFIG_DEFAULT_ASSIGN_CORE) { @@ -125,7 +125,7 @@ namespace dl DL_LOG_LAYER_LATENCY_START(); nn::prelu(*this->output, input, this->activation_element, this->activation_exponent, assign_core); - DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "prelu"); } else { @@ -135,7 +135,7 @@ namespace dl this->output->set_shape(this->output_shape); } nn::prelu(*this->output, input, this->activation_element, this->activation_exponent, assign_core); - DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "prelu"); } return *this->output; diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_relu.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_relu.hpp index 1a7a40c5856..dff05c7f420 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_relu.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_relu.hpp @@ -61,7 +61,7 @@ namespace dl this->output_shape = input.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_reshape.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_reshape.hpp index d800c17fa71..2ef76ef96d8 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_reshape.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_reshape.hpp @@ -64,19 +64,21 @@ namespace dl this->output_exponent = input.exponent; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } this->output->set_exponent(this->output_exponent); - this->output->set_shape(this->output_shape); + this->output->set_shape(input.shape); + this->output->reshape(this->output_shape); this->output->free_element(); } else { this->output = &input; - this->output->set_shape(this->output_shape); + this->output->reshape(this->output_shape); } + this->output_shape = this->output->shape; if (print_shape) { diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_squeeze.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_squeeze.hpp index 7e692aa1cd8..710901a3d02 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_squeeze.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_squeeze.hpp @@ -66,7 +66,7 @@ namespace dl this->output_exponent = input.exponent; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -78,7 +78,6 @@ namespace dl else { this->output = &input; - this->output->set_shape(input.shape); this->output->squeeze(this->axis); } this->output_shape = this->output->shape; diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_sub2d.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_sub2d.hpp index 47f39c5674a..61bcc9f2804 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_sub2d.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_sub2d.hpp @@ -71,7 +71,7 @@ namespace dl this->output_shape = input0.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -120,12 +120,12 @@ namespace dl { this->output->set_shape(this->output_shape); } - this->output.malloc_element(); + this->output->malloc_element(); this->output->set_exponent(input0.exponent); DL_LOG_LAYER_LATENCY_END(this->name, "apply"); DL_LOG_LAYER_LATENCY_START(); - nn::sub2d(this->output, input0, input1, this->activation, assign_core); + nn::sub2d(*this->output, input0, input1, this->activation, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "sub2d"); } else @@ -135,7 +135,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::sub2d(this->output, input0, input1, this->activation, assign_core, this->output_exponent); + nn::sub2d(*this->output, input0, input1, this->activation, assign_core, this->output_exponent); DL_LOG_LAYER_LATENCY_END(this->name, "sub2d"); } return *this->output; diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_transpose.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_transpose.hpp index dab9addf678..87e9cce5ce4 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_transpose.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_transpose.hpp @@ -63,13 +63,24 @@ namespace dl { this->output_exponent = input.exponent; this->output_shape = input.shape; - for (int i = 0; i < this->perm.size(); i++) + int dims = this->output_shape.size(); + if (this->perm.size() == 0) { + for (int i = dims - 1; i >= 0; i--) + { + this->perm.push_back(i); + } + } + for (int i = 0; i < dims; ++i) + { + if (this->perm[i] < 0) + this->perm[i] = dims + this->perm[i]; this->output_shape[i] = input.shape[this->perm[i]]; } + if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } diff --git a/tools/sdk/esp32c3/include/esp-face/include/typedef/dl_variable.hpp b/tools/sdk/esp32c3/include/esp-face/include/typedef/dl_variable.hpp index 471b3028f1a..118f6430575 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/typedef/dl_variable.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/typedef/dl_variable.hpp @@ -396,9 +396,6 @@ namespace dl * @brief print all the element of the Tensor. * * @param message to print - * @param with_padding one of true or false, - * - true: the padding element will also be ed - * - false: the padding element will not be ed */ void print_all(const char *message = "") { @@ -553,4 +550,4 @@ namespace dl return output; } }; -} // namespace dl \ No newline at end of file +} // namespace dl diff --git a/tools/sdk/esp32c3/ld/libcat_face_detect.a b/tools/sdk/esp32c3/ld/libcat_face_detect.a index f8ca0cf2050..92ffea09ff7 100644 Binary files a/tools/sdk/esp32c3/ld/libcat_face_detect.a and b/tools/sdk/esp32c3/ld/libcat_face_detect.a differ diff --git a/tools/sdk/esp32c3/ld/libcolor_detect.a b/tools/sdk/esp32c3/ld/libcolor_detect.a index fe39eef8665..e073722fb38 100644 Binary files a/tools/sdk/esp32c3/ld/libcolor_detect.a and b/tools/sdk/esp32c3/ld/libcolor_detect.a differ diff --git a/tools/sdk/esp32c3/ld/libdl.a b/tools/sdk/esp32c3/ld/libdl.a index 2bfb232c32d..76e1b7c50bc 100644 Binary files a/tools/sdk/esp32c3/ld/libdl.a and b/tools/sdk/esp32c3/ld/libdl.a differ diff --git a/tools/sdk/esp32c3/ld/libhuman_face_detect.a b/tools/sdk/esp32c3/ld/libhuman_face_detect.a index a2968f9ea81..d91b25cc251 100644 Binary files a/tools/sdk/esp32c3/ld/libhuman_face_detect.a and b/tools/sdk/esp32c3/ld/libhuman_face_detect.a differ diff --git a/tools/sdk/esp32c3/ld/libmfn.a b/tools/sdk/esp32c3/ld/libmfn.a index c976fa2a6be..a1d56e467c8 100644 Binary files a/tools/sdk/esp32c3/ld/libmfn.a and b/tools/sdk/esp32c3/ld/libmfn.a differ diff --git a/tools/sdk/esp32c3/lib/libapp_update.a b/tools/sdk/esp32c3/lib/libapp_update.a index e8ba38ee6d3..430c3644268 100644 Binary files a/tools/sdk/esp32c3/lib/libapp_update.a and b/tools/sdk/esp32c3/lib/libapp_update.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_littlefs.a b/tools/sdk/esp32c3/lib/libesp_littlefs.a index f99178b28fa..07501e6ed37 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_littlefs.a and b/tools/sdk/esp32c3/lib/libesp_littlefs.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_netif.a b/tools/sdk/esp32c3/lib/libesp_netif.a index f6718645dbf..a0d71db4ded 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_netif.a and b/tools/sdk/esp32c3/lib/libesp_netif.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_system.a b/tools/sdk/esp32c3/lib/libesp_system.a index 80f43e0fb88..79e5dcbaa20 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_system.a and b/tools/sdk/esp32c3/lib/libesp_system.a differ diff --git a/tools/sdk/esp32c3/lib/liblwip.a b/tools/sdk/esp32c3/lib/liblwip.a index bed10d7a7f5..f6045ef4fc0 100644 Binary files a/tools/sdk/esp32c3/lib/liblwip.a and b/tools/sdk/esp32c3/lib/liblwip.a differ diff --git a/tools/sdk/esp32c3/sdkconfig b/tools/sdk/esp32c3/sdkconfig index c6864ba317a..2cceb4ecc9b 100644 --- a/tools/sdk/esp32c3/sdkconfig +++ b/tools/sdk/esp32c3/sdkconfig @@ -1134,8 +1134,9 @@ CONFIG_LWIP_MAX_RAW_PCBS=16 # # SNTP # -CONFIG_LWIP_SNTP_MAX_SERVERS=1 -# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +CONFIG_LWIP_SNTP_MAX_SERVERS=3 +CONFIG_LWIP_DHCP_GET_NTP_SRV=y +CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 # end of SNTP diff --git a/tools/sdk/esp32s2/include/config/sdkconfig.h b/tools/sdk/esp32s2/include/config/sdkconfig.h index f5989cb267a..f847f0cd99f 100644 --- a/tools/sdk/esp32s2/include/config/sdkconfig.h +++ b/tools/sdk/esp32s2/include/config/sdkconfig.h @@ -328,7 +328,9 @@ #define CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS 5 #define CONFIG_LWIP_ICMP 1 #define CONFIG_LWIP_MAX_RAW_PCBS 16 -#define CONFIG_LWIP_SNTP_MAX_SERVERS 1 +#define CONFIG_LWIP_SNTP_MAX_SERVERS 3 +#define CONFIG_LWIP_DHCP_GET_NTP_SRV 1 +#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1 #define CONFIG_LWIP_SNTP_UPDATE_DELAY 3600000 #define CONFIG_LWIP_ESP_LWIP_ASSERT 1 #define CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT 1 @@ -577,5 +579,5 @@ #define CONFIG_USB_MSC_BUFSIZE CONFIG_TINYUSB_MSC_BUFSIZE #define CONFIG_USB_MSC_ENABLED CONFIG_TINYUSB_MSC_ENABLED #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "f23dcd3555" +#define CONFIG_ARDUINO_IDF_COMMIT "a79dc75f0a" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_expand_dims.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_expand_dims.hpp index c5b5bf02dfc..99fdc2ed607 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_expand_dims.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_expand_dims.hpp @@ -66,19 +66,18 @@ namespace dl this->output_exponent = input.exponent; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } this->output->set_exponent(this->output_exponent); - this->output->set_shape(this->output_shape); + this->output->set_shape(input.shape); this->output->expand_dims(this->axis); this->output->free_element(); } else { this->output = &input; - this->output->set_shape(this->output_shape); this->output->expand_dims(this->axis); } this->output_shape = this->output->shape; diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_flatten.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_flatten.hpp index 3d96fa1f042..380df1a413b 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_flatten.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_flatten.hpp @@ -59,7 +59,7 @@ namespace dl this->output_shape = {input.get_size()}; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_leakyrelu.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_leakyrelu.hpp index a972e135006..773c62430f2 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_leakyrelu.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_leakyrelu.hpp @@ -10,14 +10,14 @@ namespace dl namespace layer { /** - * @brief LeakyReLU(input). + * @brief LeakyRelu(input). * * @tparam feature_t supports int16_t and int8_t, * - int16_t: stands for operation in int16_t quantize * - int8_t: stands for operation in int8_t quantize */ template - class LeakyReLU : public Layer + class LeakyRelu : public Layer { private: feature_t activation_alpha; /**/ @@ -28,7 +28,7 @@ namespace dl std::vector output_shape; /**/ public: /** - * @brief Construct a new LeakyReLU object + * @brief Construct a new LeakyRelu object * * @param activation_alpha quantized alpha * @param activation_exponent exponent of quantized alpha @@ -36,7 +36,7 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - LeakyReLU(const int activation_alpha, const int activation_exponent, const char *name = "LeakyReLU", bool inplace = false) : Layer(name), output(NULL), output_shape({}) + LeakyRelu(const int activation_alpha, const int activation_exponent, const char *name = "LeakyRelu", bool inplace = false) : Layer(name), output(NULL), output_shape({}) { this->activation_alpha = activation_alpha; this->activation_exponent = activation_exponent; @@ -44,10 +44,10 @@ namespace dl } /** - * @brief Destroy the LeakyReLU object + * @brief Destroy the LeakyRelu object * */ - ~LeakyReLU() + ~LeakyRelu() { if ((!this->inplace) && (this->output != NULL)) { @@ -66,7 +66,7 @@ namespace dl this->output_shape = input.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -90,7 +90,7 @@ namespace dl /** * @brief Get the output * - * @return Tensor& LeakyReLU result + * @return Tensor& LeakyRelu result */ Tensor &get_output() { @@ -98,11 +98,11 @@ namespace dl } /** - * @brief Call LeakyReLU operation. + * @brief Call LeakyRelu operation. * * @param input as an input * @param assign_core not effective yet - * @return LeakyReLU result + * @return LeakyRelu result */ Tensor &call(Tensor &input, const std::vector &assign_core = CONFIG_DEFAULT_ASSIGN_CORE) { @@ -130,7 +130,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::leakyrelu(*this->output, input, this->activation_alpha, this->activation_exponent, assign_core); + nn::leakyrelu(*this->output, input, this->activation_alpha, this->activation_exponent, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); } diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_max2d.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_max2d.hpp index c6be15638ab..e7defa0b08f 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_max2d.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_max2d.hpp @@ -68,7 +68,7 @@ namespace dl if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -132,7 +132,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::max2d(*this->output, input0, input1, assign_core); + nn::max2d(*this->output, input0, input1, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "max2d"); } diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_min2d.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_min2d.hpp index e38fbf3d0d2..609566348d3 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_min2d.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_min2d.hpp @@ -68,7 +68,7 @@ namespace dl if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -132,7 +132,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::min2d(*this->output, input0, input1, assign_core); + nn::min2d(*this->output, input0, input1, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "min2d"); } diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_mul2d.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_mul2d.hpp index 21bcca7a81e..a391c790335 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_mul2d.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_mul2d.hpp @@ -75,7 +75,7 @@ namespace dl if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -140,7 +140,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::mul2d(*this->output, input0, input1, this->activation, assign_core); + nn::mul2d(*this->output, input0, input1, this->activation, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "mul2d"); } diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_prelu.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_prelu.hpp index 96168a783b1..2141e986646 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_prelu.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_prelu.hpp @@ -10,17 +10,17 @@ namespace dl namespace layer { /** - * @brief PReLU(input). + * @brief PRelu(input). * * @tparam feature_t supports int16_t and int8_t, * - int16_t: stands for operation in int16_t quantize * - int8_t: stands for operation in int8_t quantize */ template - class PReLU : public Layer + class PRelu : public Layer { private: - feature_t *activation_element; /**/ + const feature_t *activation_element; /**/ int activation_exponent; /**/ Tensor *output; /**/ bool inplace; /* output_shape; /**/ public: /** - * @brief Construct a new PReLU object + * @brief Construct a new PRelu object * * @param activation_element quantized alpha elements along channel axis * @param activation_exponent exponent of quantized alpha elements @@ -36,10 +36,10 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - PReLU(const feature_t *activation_element, + PRelu(const feature_t *activation_element, const int activation_exponent = 0, - const char *name = NULL, - bool inplace = "PReLU") : Layer(name), + const char *name = "PRelu", + bool inplace = false) : Layer(name), activation_element(activation_element), activation_exponent(activation_exponent), output(NULL), @@ -49,10 +49,10 @@ namespace dl } /** - * @brief Destroy the PReLU object + * @brief Destroy the PRelu object * */ - ~PReLU() + ~PRelu() { if ((!this->inplace) && (this->output != NULL)) { @@ -71,7 +71,7 @@ namespace dl this->output_shape = input.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -94,7 +94,7 @@ namespace dl /** * @brief Get the output * - * @return Tensor& PReLU result + * @return Tensor& PRelu result */ Tensor &get_output() { @@ -102,11 +102,11 @@ namespace dl } /** - * @brief Call PReLU operation. + * @brief Call PRelu operation. * * @param input as an input * @param assign_core not effective yet - * @return PReLU result + * @return PRelu result */ Tensor &call(Tensor &input, const std::vector &assign_core = CONFIG_DEFAULT_ASSIGN_CORE) { @@ -125,7 +125,7 @@ namespace dl DL_LOG_LAYER_LATENCY_START(); nn::prelu(*this->output, input, this->activation_element, this->activation_exponent, assign_core); - DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "prelu"); } else { @@ -135,7 +135,7 @@ namespace dl this->output->set_shape(this->output_shape); } nn::prelu(*this->output, input, this->activation_element, this->activation_exponent, assign_core); - DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "prelu"); } return *this->output; diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_relu.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_relu.hpp index 1a7a40c5856..dff05c7f420 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_relu.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_relu.hpp @@ -61,7 +61,7 @@ namespace dl this->output_shape = input.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_reshape.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_reshape.hpp index d800c17fa71..2ef76ef96d8 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_reshape.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_reshape.hpp @@ -64,19 +64,21 @@ namespace dl this->output_exponent = input.exponent; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } this->output->set_exponent(this->output_exponent); - this->output->set_shape(this->output_shape); + this->output->set_shape(input.shape); + this->output->reshape(this->output_shape); this->output->free_element(); } else { this->output = &input; - this->output->set_shape(this->output_shape); + this->output->reshape(this->output_shape); } + this->output_shape = this->output->shape; if (print_shape) { diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_squeeze.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_squeeze.hpp index 7e692aa1cd8..710901a3d02 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_squeeze.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_squeeze.hpp @@ -66,7 +66,7 @@ namespace dl this->output_exponent = input.exponent; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -78,7 +78,6 @@ namespace dl else { this->output = &input; - this->output->set_shape(input.shape); this->output->squeeze(this->axis); } this->output_shape = this->output->shape; diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_sub2d.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_sub2d.hpp index 47f39c5674a..61bcc9f2804 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_sub2d.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_sub2d.hpp @@ -71,7 +71,7 @@ namespace dl this->output_shape = input0.shape; if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } @@ -120,12 +120,12 @@ namespace dl { this->output->set_shape(this->output_shape); } - this->output.malloc_element(); + this->output->malloc_element(); this->output->set_exponent(input0.exponent); DL_LOG_LAYER_LATENCY_END(this->name, "apply"); DL_LOG_LAYER_LATENCY_START(); - nn::sub2d(this->output, input0, input1, this->activation, assign_core); + nn::sub2d(*this->output, input0, input1, this->activation, assign_core); DL_LOG_LAYER_LATENCY_END(this->name, "sub2d"); } else @@ -135,7 +135,7 @@ namespace dl { this->output->set_shape(this->output_shape); } - nn::sub2d(this->output, input0, input1, this->activation, assign_core, this->output_exponent); + nn::sub2d(*this->output, input0, input1, this->activation, assign_core, this->output_exponent); DL_LOG_LAYER_LATENCY_END(this->name, "sub2d"); } return *this->output; diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_transpose.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_transpose.hpp index dab9addf678..87e9cce5ce4 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_transpose.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_transpose.hpp @@ -63,13 +63,24 @@ namespace dl { this->output_exponent = input.exponent; this->output_shape = input.shape; - for (int i = 0; i < this->perm.size(); i++) + int dims = this->output_shape.size(); + if (this->perm.size() == 0) { + for (int i = dims - 1; i >= 0; i--) + { + this->perm.push_back(i); + } + } + for (int i = 0; i < dims; ++i) + { + if (this->perm[i] < 0) + this->perm[i] = dims + this->perm[i]; this->output_shape[i] = input.shape[this->perm[i]]; } + if (!this->inplace) { - if (this->output != NULL) + if (this->output == NULL) { this->output = new Tensor; } diff --git a/tools/sdk/esp32s2/include/esp-face/include/typedef/dl_variable.hpp b/tools/sdk/esp32s2/include/esp-face/include/typedef/dl_variable.hpp index 471b3028f1a..118f6430575 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/typedef/dl_variable.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/typedef/dl_variable.hpp @@ -396,9 +396,6 @@ namespace dl * @brief print all the element of the Tensor. * * @param message to print - * @param with_padding one of true or false, - * - true: the padding element will also be ed - * - false: the padding element will not be ed */ void print_all(const char *message = "") { @@ -553,4 +550,4 @@ namespace dl return output; } }; -} // namespace dl \ No newline at end of file +} // namespace dl diff --git a/tools/sdk/esp32s2/ld/libcat_face_detect.a b/tools/sdk/esp32s2/ld/libcat_face_detect.a index 2895139618b..3e06b1dab00 100644 Binary files a/tools/sdk/esp32s2/ld/libcat_face_detect.a and b/tools/sdk/esp32s2/ld/libcat_face_detect.a differ diff --git a/tools/sdk/esp32s2/ld/libcolor_detect.a b/tools/sdk/esp32s2/ld/libcolor_detect.a index 8db888bc430..59c73d0f498 100644 Binary files a/tools/sdk/esp32s2/ld/libcolor_detect.a and b/tools/sdk/esp32s2/ld/libcolor_detect.a differ diff --git a/tools/sdk/esp32s2/ld/libdl.a b/tools/sdk/esp32s2/ld/libdl.a index fef3d980101..69214ae6c66 100644 Binary files a/tools/sdk/esp32s2/ld/libdl.a and b/tools/sdk/esp32s2/ld/libdl.a differ diff --git a/tools/sdk/esp32s2/ld/libhuman_face_detect.a b/tools/sdk/esp32s2/ld/libhuman_face_detect.a index 547178a6d26..d7e1d7a0e19 100644 Binary files a/tools/sdk/esp32s2/ld/libhuman_face_detect.a and b/tools/sdk/esp32s2/ld/libhuman_face_detect.a differ diff --git a/tools/sdk/esp32s2/ld/libmfn.a b/tools/sdk/esp32s2/ld/libmfn.a index c09504ba0cc..fda053f4ace 100644 Binary files a/tools/sdk/esp32s2/ld/libmfn.a and b/tools/sdk/esp32s2/ld/libmfn.a differ diff --git a/tools/sdk/esp32s2/lib/libapp_update.a b/tools/sdk/esp32s2/lib/libapp_update.a index 5809d9d90fb..4df1eb88005 100644 Binary files a/tools/sdk/esp32s2/lib/libapp_update.a and b/tools/sdk/esp32s2/lib/libapp_update.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_littlefs.a b/tools/sdk/esp32s2/lib/libesp_littlefs.a index c04d1876117..11283bbf2a3 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_littlefs.a and b/tools/sdk/esp32s2/lib/libesp_littlefs.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_netif.a b/tools/sdk/esp32s2/lib/libesp_netif.a index 345a87a198a..d816609bc4a 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_netif.a and b/tools/sdk/esp32s2/lib/libesp_netif.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_system.a b/tools/sdk/esp32s2/lib/libesp_system.a index 7859a708e9e..e7f2ec0ebfc 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_system.a and b/tools/sdk/esp32s2/lib/libesp_system.a differ diff --git a/tools/sdk/esp32s2/lib/liblwip.a b/tools/sdk/esp32s2/lib/liblwip.a index 70184bd8797..708f8892cec 100644 Binary files a/tools/sdk/esp32s2/lib/liblwip.a and b/tools/sdk/esp32s2/lib/liblwip.a differ diff --git a/tools/sdk/esp32s2/sdkconfig b/tools/sdk/esp32s2/sdkconfig index 3cb05e18822..1a5566f1f08 100644 --- a/tools/sdk/esp32s2/sdkconfig +++ b/tools/sdk/esp32s2/sdkconfig @@ -966,8 +966,9 @@ CONFIG_LWIP_MAX_RAW_PCBS=16 # # SNTP # -CONFIG_LWIP_SNTP_MAX_SERVERS=1 -# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +CONFIG_LWIP_SNTP_MAX_SERVERS=3 +CONFIG_LWIP_DHCP_GET_NTP_SRV=y +CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 # end of SNTP