From f534b9976511013bc4350826ea49ba8b6a92ce89 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 11 Apr 2020 12:17:48 +1000 Subject: [PATCH] esp32: Update to ESP IDF v3.3.2. --- ports/esp32/Makefile | 5 +++-- ports/esp32/README.md | 6 +++--- ports/esp32/network_ppp.c | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ports/esp32/Makefile b/ports/esp32/Makefile index 7f43f9a879..0789455854 100644 --- a/ports/esp32/Makefile +++ b/ports/esp32/Makefile @@ -54,8 +54,8 @@ SDKCONFIG_COMBINED = $(BUILD)/sdkconfig.combined SDKCONFIG_H = $(BUILD)/sdkconfig.h # The git hash of the currently supported ESP IDF version. -# These correspond to v3.3.1 and v4.0. -ESPIDF_SUPHASH_V3 := 143d26aa49df524e10fb8e41a71d12e731b9b71d +# These correspond to v3.3.2 and v4.0. +ESPIDF_SUPHASH_V3 := 9e70825d1e1cbf7988cf36981774300066580ea7 ESPIDF_SUPHASH_V4 := 463a9d8b7f9af8205222b80707f9bdbba7c530e1 define print_supported_git_hash @@ -590,6 +590,7 @@ ESPIDF_BT_NIMBLE_O = $(patsubst %.c,%.o,\ $(wildcard $(ESPCOMP)/nimble/nimble/nimble/src/*.c) \ $(wildcard $(ESPCOMP)/nimble/nimble/porting/nimble/src/*.c) \ $(wildcard $(ESPCOMP)/nimble/nimble/porting/npl/freertos/src/*.c) \ + $(wildcard $(ESPCOMP)/nimble/port/src/*.c) \ ) endif endif diff --git a/ports/esp32/README.md b/ports/esp32/README.md index ebcaf68fa5..54fb41cf6f 100644 --- a/ports/esp32/README.md +++ b/ports/esp32/README.md @@ -128,9 +128,9 @@ the toolchain. You can follow the 3.x guide at: - * [Linux installation](https://docs.espressif.com/projects/esp-idf/en/v3.3.1/get-started/linux-setup.html) - * [MacOS installation](https://docs.espressif.com/projects/esp-idf/en/v3.3.1/get-started/macos-setup.html) - * [Windows installation](https://docs.espressif.com/projects/esp-idf/en/v3.3.1/get-started/windows-setup.html) + * [Linux installation](https://docs.espressif.com/projects/esp-idf/en/v3.3.2/get-started/linux-setup.html) + * [MacOS installation](https://docs.espressif.com/projects/esp-idf/en/v3.3.2/get-started/macos-setup.html) + * [Windows installation](https://docs.espressif.com/projects/esp-idf/en/v3.3.2/get-started/windows-setup.html) You will need to update your `PATH` environment variable to include the ESP32 toolchain. For example, you can issue the following commands on (at least) diff --git a/ports/esp32/network_ppp.c b/ports/esp32/network_ppp.c index 9f3a99a903..c3046c9fc7 100644 --- a/ports/esp32/network_ppp.c +++ b/ports/esp32/network_ppp.c @@ -227,9 +227,9 @@ MP_DEFINE_CONST_FUN_OBJ_1(ppp_delete_obj, ppp_delete); STATIC mp_obj_t ppp_ifconfig(size_t n_args, const mp_obj_t *args) { ppp_if_obj_t *self = MP_OBJ_TO_PTR(args[0]); - ip_addr_t dns; if (n_args == 1) { // get + const ip_addr_t *dns; if (self->pcb != NULL) { dns = dns_getserver(0); struct netif *pppif = ppp_netif(self->pcb); @@ -237,7 +237,7 @@ STATIC mp_obj_t ppp_ifconfig(size_t n_args, const mp_obj_t *args) { netutils_format_ipv4_addr((uint8_t *)&pppif->ip_addr, NETUTILS_BIG), netutils_format_ipv4_addr((uint8_t *)&pppif->gw, NETUTILS_BIG), netutils_format_ipv4_addr((uint8_t *)&pppif->netmask, NETUTILS_BIG), - netutils_format_ipv4_addr((uint8_t *)&dns, NETUTILS_BIG), + netutils_format_ipv4_addr((uint8_t *)dns, NETUTILS_BIG), }; return mp_obj_new_tuple(4, tuple); } else { @@ -245,6 +245,7 @@ STATIC mp_obj_t ppp_ifconfig(size_t n_args, const mp_obj_t *args) { return mp_obj_new_tuple(4, tuple); } } else { + ip_addr_t dns; mp_obj_t *items; mp_obj_get_array_fixed_n(args[1], 4, &items); netutils_parse_ipv4_addr(items[3], (uint8_t *)&dns.u_addr.ip4, NETUTILS_BIG);