diff --git a/cores/esp32/esp32-hal-rmt.c b/cores/esp32/esp32-hal-rmt.c index 3cee1e695e9..a72d113d7b8 100644 --- a/cores/esp32/esp32-hal-rmt.c +++ b/cores/esp32/esp32-hal-rmt.c @@ -12,21 +12,53 @@ // 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 "driver/rmt.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" /** * Internal macros */ - -#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) - +#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 _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) @@ -45,57 +77,39 @@ # 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; }; /** @@ -103,21 +117,21 @@ struct rmt_obj_s */ static xSemaphoreHandle g_rmt_objlocks[MAX_CHANNELS] = { NULL, NULL, NULL, NULL, -#if MAX_CHANNELS > 4 +#if CONFIG_IDF_TARGET_ESP32 NULL, NULL, NULL, NULL #endif }; static rmt_obj_t g_rmt_objects[MAX_CHANNELS] = { - { 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}, + { 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}, #endif }; @@ -133,130 +147,26 @@ static xSemaphoreHandle g_rmt_block_lock = NULL; /** * Internal method (private) declarations */ +static void _initPin(int pin, int channel, bool tx_not_rx); -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 bool _rmtSendOnce(rmt_obj_t* rmt, rmt_data_t* data, size_t size, bool continuous); - 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 void ARDUINO_ISR_ATTR _rmt_isr(void* arg); -err: - vTaskDelete(NULL); -} +static rmt_obj_t* _rmtAllocate(int pin, int from, int size); +static void _initPin(int pin, int channel, bool tx_not_rx); -static bool _rmtCreateRxTask(rmt_obj_t* rmt) -{ - if (!rmt) { - return false; - } - if (rmt->rxTaskHandle) { // Task already created - return false; - } +static int ARDUINO_ISR_ATTR _rmt_get_mem_len(uint8_t channel); - xTaskCreate(_rmtRxTask, "rmt_rx_task", 4096, rmt, 20, &rmt->rxTaskHandle); +static void ARDUINO_ISR_ATTR _rmt_tx_mem_first(uint8_t ch); - if(rmt->rxTaskHandle == NULL){ - log_e("RMT RX Task create failed"); - return false; - } - return true; -} +static void ARDUINO_ISR_ATTR _rmt_tx_mem_second(uint8_t ch); /** * 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) { @@ -265,9 +175,21 @@ bool rmtSetCarrier(rmt_obj_t* rmt, bool carrier_en, bool carrier_level, uint32_t size_t channel = rmt->channel; RMT_MUTEX_LOCK(channel); - rmt_set_tx_carrier(channel, carrier_en, high, low, carrier_level); +#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_MUTEX_UNLOCK(channel); + return true; + } bool rmtSetFilter(rmt_obj_t* rmt, bool filter_en, uint32_t filter_level) @@ -278,9 +200,19 @@ bool rmtSetFilter(rmt_obj_t* rmt, bool filter_en, uint32_t filter_level) size_t channel = rmt->channel; RMT_MUTEX_LOCK(channel); - rmt_set_rx_filter(channel, filter_en, filter_level); + +#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_MUTEX_UNLOCK(channel); + return true; + } bool rmtSetRxThreshold(rmt_obj_t* rmt, uint32_t value) @@ -291,8 +223,13 @@ bool rmtSetRxThreshold(rmt_obj_t* rmt, uint32_t value) size_t channel = rmt->channel; RMT_MUTEX_LOCK(channel); - rmt_set_rx_idle_thresh(channel, value); +#if CONFIG_IDF_TARGET_ESP32C3 + RMT.rx_conf[channel].conf0.idle_thres = value; +#else + RMT.conf_ch[channel].conf0.idle_thres = value; +#endif RMT_MUTEX_UNLOCK(channel); + return true; } @@ -308,34 +245,26 @@ 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; } @@ -346,43 +275,80 @@ bool rmtLoop(rmt_obj_t* rmt, rmt_data_t* data, size_t size) return false; } - 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; -} + int allocated_size = MAX_DATA_PER_CHANNEL * rmt->buffers; -bool rmtWrite(rmt_obj_t* rmt, rmt_data_t* data, size_t size) -{ - if (!rmt) { + if (size > allocated_size) { 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, false); - RMT_MUTEX_UNLOCK(channel); - return true; + return _rmtSendOnce(rmt, data, size, true); } -bool rmtWriteBlocking(rmt_obj_t* rmt, rmt_data_t* data, size_t size) +bool rmtWrite(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; + 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); + } } bool rmtReadData(rmt_obj_t* rmt, uint32_t* data, size_t size) @@ -392,7 +358,16 @@ bool rmtReadData(rmt_obj_t* rmt, uint32_t* data, size_t size) } int channel = rmt->channel; - rmtReadAsync(rmt, (rmt_data_t*) data, size, NULL, false, 0); + if (g_rmt_objects[channel].buffers < size/MAX_DATA_PER_CHANNEL) { + return false; + } + + size_t i; + volatile uint32_t* rmt_mem_ptr = &(RMTMEM.chan[channel].data32[0].val); + for (i=0; ichannel; - 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); + 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 return true; } @@ -417,46 +399,75 @@ bool rmtReceiveCompleted(rmt_obj_t* rmt) if (!rmt) { return false; } + int channel = rmt->channel; - return rmt->rx_completed; + 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; + } } 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; - - RMT_MUTEX_LOCK(channel); - // cb as NULL is a way to cancel the callback process - if (cb == NULL) { - rmt_rx_stop(channel); - return true; + // 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; } - // 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); + +#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_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); - rmt_rx_stop(channel); - rmt->rx_completed = true; +#if CONFIG_IDF_TARGET_ESP32C3 + RMT.rx_conf[channel].conf1.rx_en = 1; +#else + RMT.conf_ch[channel].conf1.rx_en = 1; +#endif RMT_MUTEX_UNLOCK(channel); + return true; } @@ -467,34 +478,55 @@ bool rmtReadAsync(rmt_obj_t* rmt, rmt_data_t* data, size_t size, void* eventFlag } int channel = rmt->channel; - // No limit on size with IDF ;-) - //if (g_rmt_objects[channel].buffers < size/SOC_RMT_MEM_WORDS_PER_CHANNEL) { - // return false; - //} + if (g_rmt_objects[channel].buffers < size/MAX_DATA_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; } - // 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_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 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; } @@ -502,19 +534,38 @@ 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; - 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); +#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 int apb_div = _LIMIT(tick/12.5f, 256); + int ref_div = _LIMIT(tick/1000, 256); float apb_tick = 12.5f * apb_div; - - rmt_set_clk_div(channel, apb_div & 0xFF); - RMT_MUTEX_UNLOCK(channel); - return apb_tick; + 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_obj_t* rmtInit(int pin, bool tx_not_rx, rmt_reserve_memsize_t memsize) @@ -531,17 +582,8 @@ 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) {} - // Some SoC may have fixed channel numbers for TX and RX - example: ESP32C3 - uint8_t ch_start, ch_end; - if (tx_not_rx) { - ch_start = RMT_TX_CH_START; - ch_end = RMT_TX_CH_END; - } else { - ch_start = RMT_RX_CH_START; - ch_end = RMT_RX_CH_END; - } - for (i=ch_start; i<=ch_end; i++) { - for (j=0; j 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); - 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; + size_t channel = i; #if !CONFIG_DISABLE_HAL_LOCKS if(g_rmt_objlocks[channel] == NULL) { @@ -584,30 +615,447 @@ rmt_obj_t* rmtInit(int pin, bool tx_not_rx, rmt_reserve_memsize_t memsize) #endif RMT_MUTEX_LOCK(channel); - esp_err_t esp_err_code = ESP_OK; + + 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; if (tx_not_rx) { - 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); + 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; } else { - 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); - } + 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; + 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); - if (esp_err_code == ESP_OK) { - return rmt; + 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 + } 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; + } } + return idx; } diff --git a/cores/esp32/esp32-hal-rmt.h b/cores/esp32/esp32-hal-rmt.h index 201fe594009..cce6c8c8107 100644 --- a/cores/esp32/esp32-hal-rmt.h +++ b/cores/esp32/esp32-hal-rmt.h @@ -25,9 +25,6 @@ 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 { @@ -57,13 +54,6 @@ typedef struct { }; } rmt_data_t; - -/** -* Prints object information -* -*/ -void _rmtDumpStatus(rmt_obj_t* rmt); - /** * Initialize the object * @@ -79,17 +69,10 @@ 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 7fd56d8a453..6a4c63bc7e5 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, RMT_RX_MODE, RMT_MEM_192))); + assert((rmt_recv = rmtInit(21, false, 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 6b1ee2fa55d..248aad3fa36 100644 --- a/libraries/ESP32/examples/RMT/RMTLoopback/RMTLoopback.ino +++ b/libraries/ESP32/examples/RMT/RMTLoopback/RMTLoopback.ino @@ -5,17 +5,6 @@ #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]; @@ -29,19 +18,18 @@ void setup() Serial.begin(115200); events = xEventGroupCreate(); - if ((rmt_send = rmtInit(RMT_TX_PIN, RMT_TX_MODE, RMT_MEM_64)) == NULL) + if ((rmt_send = rmtInit(18, true, RMT_MEM_64)) == NULL) { Serial.println("init sender failed\n"); } - if ((rmt_recv = rmtInit(RMT_RX_PIN, RMT_RX_MODE, RMT_MEM_RX)) == NULL) + if ((rmt_recv = rmtInit(21, false, RMT_MEM_192)) == 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 f87dd220513..39978d26dab 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, RMT_RX_MODE, RMT_MEM_192)) == NULL) + if ((rmt_recv = rmtInit(21, false, 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 094e5f0fc1d..5067140fbd6 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, RMT_TX_MODE, RMT_MEM_64)) == NULL) + if ((rmt_send = rmtInit(18, true, RMT_MEM_64)) == NULL) { Serial.println("init sender failed\n"); } diff --git a/libraries/README.md b/libraries/README.md index d7e0e8fbd29..cab7bd23710 100644 --- a/libraries/README.md +++ b/libraries/README.md @@ -40,9 +40,6 @@ 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 @@ -55,12 +52,6 @@ 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 @@ -88,9 +79,6 @@ 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 @@ -101,4 +89,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 + Arduino compatible I2C driver (master only) diff --git a/platform.txt b/platform.txt index 2a8a3283b1d..18a12709c72 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-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.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.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-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.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.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-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.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.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 fbbfcf3d8e5..4a186894eac 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-189-ga79dc75f0a\\"'), + ("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32c3.py b/tools/platformio-build-esp32c3.py index f0f86d5ba9e..1c9273ffe4d 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-189-ga79dc75f0a\\"'), + ("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32s2.py b/tools/platformio-build-esp32s2.py index 5e4d496de6e..cee6d54292d 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-189-ga79dc75f0a\\"'), + ("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'), "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 fa51634dabd..fbafe0602ba 100644 --- a/tools/sdk/esp32/include/config/sdkconfig.h +++ b/tools/sdk/esp32/include/config/sdkconfig.h @@ -406,9 +406,7 @@ #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 3 -#define CONFIG_LWIP_DHCP_GET_NTP_SRV 1 -#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1 +#define CONFIG_LWIP_SNTP_MAX_SERVERS 1 #define CONFIG_LWIP_SNTP_UPDATE_DELAY 3600000 #define CONFIG_LWIP_ESP_LWIP_ASSERT 1 #define CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT 1 @@ -679,5 +677,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 "a79dc75f0a" +#define CONFIG_ARDUINO_IDF_COMMIT "f23dcd3555" #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 99fdc2ed607..c5b5bf02dfc 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,18 +66,19 @@ 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(input.shape); + this->output->set_shape(this->output_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 380df1a413b..3d96fa1f042 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 773c62430f2..a972e135006 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 e7defa0b08f..c6be15638ab 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 609566348d3..e38fbf3d0d2 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 a391c790335..21bcca7a81e 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 2141e986646..96168a783b1 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: - const feature_t *activation_element; /**/ + 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 = "PRelu", - bool inplace = false) : Layer(name), + const char *name = NULL, + bool inplace = "PReLU") : 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, "prelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); } 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, "prelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); } 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 dff05c7f420..1a7a40c5856 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 2ef76ef96d8..d800c17fa71 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,21 +64,19 @@ 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(input.shape); - this->output->reshape(this->output_shape); + this->output->set_shape(this->output_shape); this->output->free_element(); } else { this->output = &input; - this->output->reshape(this->output_shape); + this->output->set_shape(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 710901a3d02..7e692aa1cd8 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,6 +78,7 @@ 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 61bcc9f2804..47f39c5674a 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 87e9cce5ce4..dab9addf678 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,24 +63,13 @@ namespace dl { this->output_exponent = input.exponent; this->output_shape = input.shape; - int dims = this->output_shape.size(); - if (this->perm.size() == 0) + for (int i = 0; i < this->perm.size(); i++) { - 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 118f6430575..471b3028f1a 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,6 +396,9 @@ 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 = "") { @@ -550,4 +553,4 @@ namespace dl return output; } }; -} // namespace dl +} // namespace dl \ No newline at end of file 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 44c19c85d76..3e2b4b762c8 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,8 +1,16 @@ -/* - * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ +// 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. /******************************************************************************* * NOTICE @@ -331,15 +339,17 @@ 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: - return MCPWM_TIMER_COUNT_MODE_PAUSE; + HAL_ASSERT(false && "unknown count mode"); + return mcpwm->timer[timer_id].timer_cfg1.timer_mod; } } diff --git a/tools/sdk/esp32/ld/libcat_face_detect.a b/tools/sdk/esp32/ld/libcat_face_detect.a index c7a9cb5440d..6962cd06027 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 29267ed392a..4e3e520507c 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 8b5db786f2d..d0951c92ac8 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 cd849d2c661..aae3e51eb07 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 fcc4727cc1b..123df59825a 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 34b6f44ca46..a17117e3b5a 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 e042cb61eb3..86d3a749119 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 b28436b2548..596e551e9b5 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 22dda939c2a..189978f19c8 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 73f1c801fe7..cc0c1d16456 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 c002693990d..ffefbac7751 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 75d915bb0f1..15636acadb5 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 89a757a8462..00535a1125f 100644 --- a/tools/sdk/esp32/sdkconfig +++ b/tools/sdk/esp32/sdkconfig @@ -1115,9 +1115,8 @@ CONFIG_LWIP_MAX_RAW_PCBS=16 # # SNTP # -CONFIG_LWIP_SNTP_MAX_SERVERS=3 -CONFIG_LWIP_DHCP_GET_NTP_SRV=y -CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 +CONFIG_LWIP_SNTP_MAX_SERVERS=1 +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set 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 e2a47666e88..5a1722d2c3a 100644 --- a/tools/sdk/esp32c3/include/config/sdkconfig.h +++ b/tools/sdk/esp32c3/include/config/sdkconfig.h @@ -375,9 +375,7 @@ #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 3 -#define CONFIG_LWIP_DHCP_GET_NTP_SRV 1 -#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1 +#define CONFIG_LWIP_SNTP_MAX_SERVERS 1 #define CONFIG_LWIP_SNTP_UPDATE_DELAY 3600000 #define CONFIG_LWIP_ESP_LWIP_ASSERT 1 #define CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT 1 @@ -632,5 +630,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 "a79dc75f0a" +#define CONFIG_ARDUINO_IDF_COMMIT "f23dcd3555" #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 99fdc2ed607..c5b5bf02dfc 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,18 +66,19 @@ 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(input.shape); + this->output->set_shape(this->output_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 380df1a413b..3d96fa1f042 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 773c62430f2..a972e135006 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 e7defa0b08f..c6be15638ab 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 609566348d3..e38fbf3d0d2 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 a391c790335..21bcca7a81e 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 2141e986646..96168a783b1 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: - const feature_t *activation_element; /**/ + 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 = "PRelu", - bool inplace = false) : Layer(name), + const char *name = NULL, + bool inplace = "PReLU") : 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, "prelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); } 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, "prelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); } 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 dff05c7f420..1a7a40c5856 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 2ef76ef96d8..d800c17fa71 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,21 +64,19 @@ 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(input.shape); - this->output->reshape(this->output_shape); + this->output->set_shape(this->output_shape); this->output->free_element(); } else { this->output = &input; - this->output->reshape(this->output_shape); + this->output->set_shape(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 710901a3d02..7e692aa1cd8 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,6 +78,7 @@ 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 61bcc9f2804..47f39c5674a 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 87e9cce5ce4..dab9addf678 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,24 +63,13 @@ namespace dl { this->output_exponent = input.exponent; this->output_shape = input.shape; - int dims = this->output_shape.size(); - if (this->perm.size() == 0) + for (int i = 0; i < this->perm.size(); i++) { - 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 118f6430575..471b3028f1a 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,6 +396,9 @@ 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 = "") { @@ -550,4 +553,4 @@ namespace dl return output; } }; -} // namespace dl +} // namespace dl \ No newline at end of file diff --git a/tools/sdk/esp32c3/ld/libcat_face_detect.a b/tools/sdk/esp32c3/ld/libcat_face_detect.a index 92ffea09ff7..f8ca0cf2050 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 e073722fb38..fe39eef8665 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 76e1b7c50bc..2bfb232c32d 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 d91b25cc251..a2968f9ea81 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 a1d56e467c8..c976fa2a6be 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 430c3644268..e8ba38ee6d3 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 07501e6ed37..f99178b28fa 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 a0d71db4ded..f6718645dbf 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 79e5dcbaa20..80f43e0fb88 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 f6045ef4fc0..bed10d7a7f5 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 2cceb4ecc9b..c6864ba317a 100644 --- a/tools/sdk/esp32c3/sdkconfig +++ b/tools/sdk/esp32c3/sdkconfig @@ -1134,9 +1134,8 @@ CONFIG_LWIP_MAX_RAW_PCBS=16 # # SNTP # -CONFIG_LWIP_SNTP_MAX_SERVERS=3 -CONFIG_LWIP_DHCP_GET_NTP_SRV=y -CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 +CONFIG_LWIP_SNTP_MAX_SERVERS=1 +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set 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 f847f0cd99f..f5989cb267a 100644 --- a/tools/sdk/esp32s2/include/config/sdkconfig.h +++ b/tools/sdk/esp32s2/include/config/sdkconfig.h @@ -328,9 +328,7 @@ #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 3 -#define CONFIG_LWIP_DHCP_GET_NTP_SRV 1 -#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1 +#define CONFIG_LWIP_SNTP_MAX_SERVERS 1 #define CONFIG_LWIP_SNTP_UPDATE_DELAY 3600000 #define CONFIG_LWIP_ESP_LWIP_ASSERT 1 #define CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT 1 @@ -579,5 +577,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 "a79dc75f0a" +#define CONFIG_ARDUINO_IDF_COMMIT "f23dcd3555" #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 99fdc2ed607..c5b5bf02dfc 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,18 +66,19 @@ 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(input.shape); + this->output->set_shape(this->output_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 380df1a413b..3d96fa1f042 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 773c62430f2..a972e135006 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 e7defa0b08f..c6be15638ab 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 609566348d3..e38fbf3d0d2 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 a391c790335..21bcca7a81e 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 2141e986646..96168a783b1 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: - const feature_t *activation_element; /**/ + 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 = "PRelu", - bool inplace = false) : Layer(name), + const char *name = NULL, + bool inplace = "PReLU") : 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, "prelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); } 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, "prelu"); + DL_LOG_LAYER_LATENCY_END(this->name, "leakyrelu"); } 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 dff05c7f420..1a7a40c5856 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 2ef76ef96d8..d800c17fa71 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,21 +64,19 @@ 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(input.shape); - this->output->reshape(this->output_shape); + this->output->set_shape(this->output_shape); this->output->free_element(); } else { this->output = &input; - this->output->reshape(this->output_shape); + this->output->set_shape(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 710901a3d02..7e692aa1cd8 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,6 +78,7 @@ 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 61bcc9f2804..47f39c5674a 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 87e9cce5ce4..dab9addf678 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,24 +63,13 @@ namespace dl { this->output_exponent = input.exponent; this->output_shape = input.shape; - int dims = this->output_shape.size(); - if (this->perm.size() == 0) + for (int i = 0; i < this->perm.size(); i++) { - 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 118f6430575..471b3028f1a 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,6 +396,9 @@ 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 = "") { @@ -550,4 +553,4 @@ namespace dl return output; } }; -} // namespace dl +} // namespace dl \ No newline at end of file diff --git a/tools/sdk/esp32s2/ld/libcat_face_detect.a b/tools/sdk/esp32s2/ld/libcat_face_detect.a index 3e06b1dab00..2895139618b 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 59c73d0f498..8db888bc430 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 69214ae6c66..fef3d980101 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 d7e1d7a0e19..547178a6d26 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 fda053f4ace..c09504ba0cc 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 4df1eb88005..5809d9d90fb 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 11283bbf2a3..c04d1876117 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 d816609bc4a..345a87a198a 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 e7f2ec0ebfc..7859a708e9e 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 708f8892cec..70184bd8797 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 1a5566f1f08..3cb05e18822 100644 --- a/tools/sdk/esp32s2/sdkconfig +++ b/tools/sdk/esp32s2/sdkconfig @@ -966,9 +966,8 @@ CONFIG_LWIP_MAX_RAW_PCBS=16 # # SNTP # -CONFIG_LWIP_SNTP_MAX_SERVERS=3 -CONFIG_LWIP_DHCP_GET_NTP_SRV=y -CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 +CONFIG_LWIP_SNTP_MAX_SERVERS=1 +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 # end of SNTP