diff --git a/components/driver/include/driver/sdmmc_host.h b/components/driver/include/driver/sdmmc_host.h index f2e2d66d5d..63023e9030 100644 --- a/components/driver/include/driver/sdmmc_host.h +++ b/components/driver/include/driver/sdmmc_host.h @@ -42,6 +42,7 @@ extern "C" { .set_card_clk = &sdmmc_host_set_card_clk, \ .do_transaction = &sdmmc_host_do_transaction, \ .deinit = &sdmmc_host_deinit, \ + .command_timeout_ms = 0, \ } /** diff --git a/components/driver/include/driver/sdspi_host.h b/components/driver/include/driver/sdspi_host.h index 72bd9f3829..54eba081e9 100644 --- a/components/driver/include/driver/sdspi_host.h +++ b/components/driver/include/driver/sdspi_host.h @@ -43,6 +43,7 @@ extern "C" { .set_card_clk = &sdspi_host_set_card_clk, \ .do_transaction = &sdspi_host_do_transaction, \ .deinit = &sdspi_host_deinit, \ + .command_timeout_ms = 0, \ } /** diff --git a/components/esp32/clk.c b/components/esp32/clk.c index 34b36b9bb8..15b8af36c6 100644 --- a/components/esp32/clk.c +++ b/components/esp32/clk.c @@ -186,7 +186,15 @@ void esp_perip_clk_init(void) else { common_perip_clk = DPORT_WDG_CLK_EN | DPORT_I2S0_CLK_EN | +#if CONFIG_CONSOLE_UART_NUM != 0 + DPORT_UART0_CLK_EN | +#endif +#if CONFIG_CONSOLE_UART_NUM != 1 DPORT_UART1_CLK_EN | +#endif +#if CONFIG_CONSOLE_UART_NUM != 2 + DPORT_UART2_CLK_EN | +#endif DPORT_SPI_CLK_EN | DPORT_I2C_EXT0_CLK_EN | DPORT_UHCI0_CLK_EN | @@ -205,7 +213,6 @@ void esp_perip_clk_init(void) DPORT_PWM1_CLK_EN | DPORT_I2S1_CLK_EN | DPORT_SPI_DMA_CLK_EN | - DPORT_UART2_CLK_EN | DPORT_PWM2_CLK_EN | DPORT_PWM3_CLK_EN; hwcrypto_perip_clk = DPORT_PERI_EN_AES | diff --git a/components/esp32/include/esp_err.h b/components/esp32/include/esp_err.h index cf0973c56d..5486b14105 100644 --- a/components/esp32/include/esp_err.h +++ b/components/esp32/include/esp_err.h @@ -64,14 +64,14 @@ void _esp_error_check_failed(esp_err_t rc, const char *file, int line, const cha */ #ifdef NDEBUG #define ESP_ERROR_CHECK(x) do { \ - esp_err_t rc = (x); \ - (void) sizeof(rc); \ + esp_err_t __err_rc = (x); \ + (void) sizeof(__err_rc); \ } while(0); #else #define ESP_ERROR_CHECK(x) do { \ - esp_err_t rc = (x); \ - if (rc != ESP_OK) { \ - _esp_error_check_failed(rc, __FILE__, __LINE__, \ + esp_err_t __err_rc = (x); \ + if (__err_rc != ESP_OK) { \ + _esp_error_check_failed(__err_rc, __FILE__, __LINE__, \ __ASSERT_FUNC, #x); \ } \ } while(0); diff --git a/components/lwip/api/pppapi.c b/components/lwip/api/pppapi.c index 2212233cec..735ae76e47 100755 --- a/components/lwip/api/pppapi.c +++ b/components/lwip/api/pppapi.c @@ -48,9 +48,9 @@ static err_t pppapi_do_ppp_set_default(struct tcpip_api_call *m) { - struct pppapi_msg_msg *msg = (struct pppapi_msg_msg *)m; + struct pppapi_msg *msg = (struct pppapi_msg *)m; - ppp_set_default(msg->ppp); + ppp_set_default(msg->msg.ppp); return ERR_OK; } @@ -103,8 +103,8 @@ pppapi_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passw static err_t pppapi_do_ppp_set_notify_phase_callback(struct tcpip_api_call *m) { - struct pppapi_msg_msg *msg = (struct pppapi_msg_msg *)m; - ppp_set_notify_phase_callback(msg->ppp, msg->msg.setnotifyphasecb.notify_phase_cb); + struct pppapi_msg *msg = (struct pppapi_msg *)m; + ppp_set_notify_phase_callback(msg->msg.ppp, msg->msg.msg.setnotifyphasecb.notify_phase_cb); return ERR_OK; } @@ -164,11 +164,11 @@ pppapi_pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb, static err_t pppapi_do_pppoe_create(struct tcpip_api_call *m) { - struct pppapi_msg_msg *msg = (struct pppapi_msg_msg *)m; + struct pppapi_msg *msg = (struct pppapi_msg *)m; - msg->ppp = pppoe_create(msg->msg.ethernetcreate.pppif, msg->msg.ethernetcreate.ethif, - msg->msg.ethernetcreate.service_name, msg->msg.ethernetcreate.concentrator_name, - msg->msg.ethernetcreate.link_status_cb, msg->msg.ethernetcreate.ctx_cb); + msg->msg.ppp = pppoe_create(msg->msg.msg.ethernetcreate.pppif, msg->msg.msg.ethernetcreate.ethif, + msg->msg.msg.ethernetcreate.service_name, msg->msg.msg.ethernetcreate.concentrator_name, + msg->msg.msg.ethernetcreate.link_status_cb, msg->msg.msg.ethernetcreate.ctx_cb); return ERR_OK; } @@ -201,17 +201,17 @@ pppapi_pppoe_create(struct netif *pppif, struct netif *ethif, const char *servic static err_t pppapi_do_pppol2tp_create(struct tcpip_api_call *m) { - struct pppapi_msg_msg *msg = (struct pppapi_msg_msg *)m; + struct pppapi_msg *msg = (struct pppapi_msg *)m; - msg->ppp = pppol2tp_create(msg->msg.l2tpcreate.pppif, - msg->msg.l2tpcreate.netif, msg->msg.l2tpcreate.ipaddr, msg->msg.l2tpcreate.port, + msg->msg.ppp = pppol2tp_create(msg->msg.msg.l2tpcreate.pppif, + msg->msg.msg.l2tpcreate.netif, msg->msg.msg.l2tpcreate.ipaddr, msg->msg.msg.l2tpcreate.port, #if PPPOL2TP_AUTH_SUPPORT - msg->msg.l2tpcreate.secret, - msg->msg.l2tpcreate.secret_len, + msg->msg.msg.l2tpcreate.secret, + msg->msg.msg.l2tpcreate.secret_len, #else /* PPPOL2TP_AUTH_SUPPORT */ NULL, #endif /* PPPOL2TP_AUTH_SUPPORT */ - msg->msg.l2tpcreate.link_status_cb, msg->msg.l2tpcreate.ctx_cb); + msg->msg.msg.l2tpcreate.link_status_cb, msg->msg.msg.l2tpcreate.ctx_cb); return ERR_OK; } @@ -325,9 +325,9 @@ pppapi_close(ppp_pcb *pcb, u8_t nocarrier) static err_t pppapi_do_ppp_free(struct tcpip_api_call *m) { - struct pppapi_msg_msg *msg = (struct pppapi_msg_msg *)m; + struct pppapi_msg *msg = (struct pppapi_msg *)m; - return ppp_free(msg->ppp); + return ppp_free(msg->msg.ppp); } /** diff --git a/components/mdns/mdns.c b/components/mdns/mdns.c index 40b4c70961..c77283e071 100644 --- a/components/mdns/mdns.c +++ b/components/mdns/mdns.c @@ -555,9 +555,9 @@ static const uint8_t * _mdns_read_fqdn(const uint8_t * packet, const uint8_t * s return NULL; } uint8_t len = start[index++]; - if ((len & 0xC0) == 0) { - if (len > 64) { - //length can not be more than 64 + if (len < 0xC0) { + if (len > 63) { + //length can not be more than 63 return NULL; } uint8_t i; diff --git a/components/ulp/component_ulp_common.mk b/components/ulp/component_ulp_common.mk index 8824a6dd09..70e5b0205b 100644 --- a/components/ulp/component_ulp_common.mk +++ b/components/ulp/component_ulp_common.mk @@ -43,7 +43,7 @@ $(ULP_LD_SCRIPT): $(ULP_LD_TEMPLATE) # Link object files and generate map file $(ULP_ELF): $(ULP_OBJECTS) $(ULP_LD_SCRIPT) $(summary) ULP_LD $(patsubst $(PWD)/%,%,$(CURDIR))/$@ - $(ULP_LD) -o $@ -A elf32-esp32ulp -Map=$(ULP_MAP) -T $(ULP_LD_SCRIPT) $< + $(ULP_LD) -o $@ -A elf32-esp32ulp -Map=$(ULP_MAP) -T $(ULP_LD_SCRIPT) $(ULP_OBJECTS) # Dump the list of global symbols in a convenient format. $(ULP_SYM): $(ULP_ELF) diff --git a/tools/idf_monitor.py b/tools/idf_monitor.py index 1f315f29e3..e4a5ec4bd3 100755 --- a/tools/idf_monitor.py +++ b/tools/idf_monitor.py @@ -292,6 +292,8 @@ class Monitor(object): self.serial.write(codecs.encode(key)) except serial.SerialException: pass # this shouldn't happen, but sometimes port has closed in serial thread + except UnicodeEncodeError: + pass # this can happen if a non-ascii character was passed, ignoring def handle_serial_input(self, data): # this may need to be made more efficient, as it pushes out a byte