From 237a3fe96c451e5da88e8cfe9d850961f9bbe036 Mon Sep 17 00:00:00 2001 From: David McCurley <44048235+mrengineer7777@users.noreply.github.com> Date: Thu, 20 Apr 2023 03:28:43 -0500 Subject: [PATCH 01/15] Add v2.0.8 into Issue Template (#8092) --- .github/ISSUE_TEMPLATE/Issue-report.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/Issue-report.yml b/.github/ISSUE_TEMPLATE/Issue-report.yml index 3efe4537204..1dc31c32872 100644 --- a/.github/ISSUE_TEMPLATE/Issue-report.yml +++ b/.github/ISSUE_TEMPLATE/Issue-report.yml @@ -41,6 +41,7 @@ body: options: - latest master (checkout manually) - latest development Release Candidate (RC-X) + - v2.0.8 - v2.0.7 - v2.0.6 - v2.0.5 From 98f6d783cbeeddef7b9d10e85f1e81eea15e91b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Tue, 2 May 2023 13:36:23 +0200 Subject: [PATCH 02/15] Added 2 new libs + removed unnecessary multiple examples (#8145) --- .github/workflows/lib.json | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lib.json b/.github/workflows/lib.json index c237537bd38..4a5f6bf9036 100644 --- a/.github/workflows/lib.json +++ b/.github/workflows/lib.json @@ -19,9 +19,6 @@ "name": "ESP32Servo", "exclude_targets": [], "sketch_path": [ - "~/Arduino/libraries/ESP32Servo/examples/Knob/Knob.ino", - "~/Arduino/libraries/ESP32Servo/examples/Sweep/Sweep.ino", - "~/Arduino/libraries/ESP32Servo/examples/PWMExample/PWMExample.ino", "~/Arduino/libraries/ESP32Servo/examples/Multiple-Servo-Example-Arduino/Multiple-Servo-Example-Arduino.ino" ] }, @@ -51,5 +48,19 @@ "sketch_path": [ "~/Arduino/libraries/IRremote/examples/SendDemo/SendDemo.ino" ] + }, + { + "name": "MFRC522", + "exclude_targets": [], + "sketch_path": [ + "~/Arduino/libraries/MFRC522/examples/ReadUidMultiReader/ReadUidMultiReader.ino" + ] + }, + { + "name": "WS2812FX", + "exclude_targets": [], + "sketch_path": [ + "~/Arduino/libraries/WS2812FX/examples/ws2812fx_matrix/ws2812fx_matrix.ino" + ] } ] \ No newline at end of file From 85d179c63c64faf98b506396cf1e4566cc6d503c Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Wed, 3 May 2023 13:42:55 -0300 Subject: [PATCH 03/15] Apply this change to 2.0.9 (#8131) * Fix the F_CPU frequency for the ESP32-S3 Hello, I was using the FastLED library and it was complaining about F_CPU not being defined. So, I just noticed that it is not defined for the ESP32-S3 module. So I made this change in the header file and it compiled. Therefore I wanted to propose this change to the HAL library to improve compatibility. Thank you for your time. * Makes F_CPU generic based on the SoC frequency Works for ESP32, ESP32C3, ESP32S2, ESP32S3 * Includes ESP32C3 in the F_CPU definition Necessary for ESP32 Arduino Core 2.0.x based on IDF 4.4 --------- Co-authored-by: Ali Devrim OGUZ <11381547+devrim-oguz@users.noreply.github.com> --- cores/esp32/esp32-hal.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cores/esp32/esp32-hal.h b/cores/esp32/esp32-hal.h index 51ecea405df..2a51c3ebae7 100644 --- a/cores/esp32/esp32-hal.h +++ b/cores/esp32/esp32-hal.h @@ -44,8 +44,12 @@ extern "C" { #ifndef F_CPU #if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4 #define F_CPU (CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ * 1000000U) +#elif CONFIG_IDF_TARGET_ESP32C3 +#define F_CPU (CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ * 1000000U) #elif CONFIG_IDF_TARGET_ESP32S2 #define F_CPU (CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ * 1000000U) +#elif CONFIG_IDF_TARGET_ESP32S3 +#define F_CPU (CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ * 1000000U) #endif #endif From a7bd6c9bc5112601692cb55d99aa5347b3926ba3 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Wed, 3 May 2023 13:46:12 -0300 Subject: [PATCH 04/15] Fixes analogWrite (#8137) * Fixes analogWrite * sets cnt_channel index * fixes TAB alligment --- cores/esp32/esp32-hal-ledc.c | 38 +++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/cores/esp32/esp32-hal-ledc.c b/cores/esp32/esp32-hal-ledc.c index a02431b58fb..08dba67104c 100644 --- a/cores/esp32/esp32-hal-ledc.c +++ b/cores/esp32/esp32-hal-ledc.c @@ -215,26 +215,32 @@ static int cnt_channel = LEDC_CHANNELS; static uint8_t analog_resolution = 8; static int analog_frequency = 1000; void analogWrite(uint8_t pin, int value) { - // Use ledc hardware for internal pins - if (pin < SOC_GPIO_PIN_COUNT) { - if (pin_to_channel[pin] == 0) { - if (!cnt_channel) { - log_e("No more analogWrite channels available! You can have maximum %u", LEDC_CHANNELS); - return; - } - if(ledcSetup(cnt_channel - 1, analog_frequency, analog_resolution) == 0){ - log_e("analogWrite setup failed (freq = %u, resolution = %u). Try setting different resolution or frequency"); - return; - } - ledcAttachPin(pin, cnt_channel - 1); - pin_to_channel[pin] = cnt_channel--; + // Use ledc hardware for internal pins + if (pin < SOC_GPIO_PIN_COUNT) { + int8_t channel = -1; + if (pin_to_channel[pin] == 0) { + if (!cnt_channel) { + log_e("No more analogWrite channels available! You can have maximum %u", LEDC_CHANNELS); + return; + } + cnt_channel--; + channel = cnt_channel; + } else { + channel = analogGetChannel(pin); + } + log_v("GPIO %d - Using Channel %d, Value = %d", pin, channel, value); + if(ledcSetup(channel, analog_frequency, analog_resolution) == 0){ + log_e("analogWrite setup failed (freq = %u, resolution = %u). Try setting different resolution or frequency"); + return; + } + ledcAttachPin(pin, channel); + pin_to_channel[pin] = channel; + ledcWrite(channel, value); } - ledcWrite(pin_to_channel[pin] - 1, value); - } } int8_t analogGetChannel(uint8_t pin) { - return pin_to_channel[pin] - 1; + return pin_to_channel[pin]; } void analogWriteFrequency(uint32_t freq) { From 2193d02f60bbc2c59144658c7211effc900b115a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Wed, 3 May 2023 18:47:17 +0200 Subject: [PATCH 05/15] External library test - Example change for WS2812FX lib (#8146) * Added 2 new libs + removed unnecessary multiple examples * Change example for WS2812FX lib --- .github/workflows/lib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lib.json b/.github/workflows/lib.json index 4a5f6bf9036..453267a2d2d 100644 --- a/.github/workflows/lib.json +++ b/.github/workflows/lib.json @@ -60,7 +60,7 @@ "name": "WS2812FX", "exclude_targets": [], "sketch_path": [ - "~/Arduino/libraries/WS2812FX/examples/ws2812fx_matrix/ws2812fx_matrix.ino" + "~/Arduino/libraries/WS2812FX/examples/ws2812fx_spi/ws2812fx_spi.ino" ] } ] \ No newline at end of file From 8f4f21c75a70f00a9898720862d498628a6ef749 Mon Sep 17 00:00:00 2001 From: David McCurley <44048235+mrengineer7777@users.noreply.github.com> Date: Wed, 3 May 2023 11:47:53 -0500 Subject: [PATCH 06/15] CameraWebserver.ino (#8149) Resolves deprecation warnings in CameraWebServer.ino. pin_sscb_sda -> pin_sccb_sda. pin_sscb_scl -> pin_sccb_scl. The variables are in the same union and are identical. --- .../ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino b/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino index 009de6e1e52..17491588d86 100644 --- a/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino +++ b/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino @@ -60,8 +60,8 @@ void setup() { config.pin_pclk = PCLK_GPIO_NUM; config.pin_vsync = VSYNC_GPIO_NUM; config.pin_href = HREF_GPIO_NUM; - config.pin_sscb_sda = SIOD_GPIO_NUM; - config.pin_sscb_scl = SIOC_GPIO_NUM; + config.pin_sccb_sda = SIOD_GPIO_NUM; + config.pin_sccb_scl = SIOC_GPIO_NUM; config.pin_pwdn = PWDN_GPIO_NUM; config.pin_reset = RESET_GPIO_NUM; config.xclk_freq_hz = 20000000; From 5c92a0231bdd3b3f4c74de855143a03c56cbb2a7 Mon Sep 17 00:00:00 2001 From: David McCurley <44048235+mrengineer7777@users.noreply.github.com> Date: Wed, 3 May 2023 11:49:04 -0500 Subject: [PATCH 07/15] BugFix FlashStringHelper Macros (#8147) Revert to previous definition of `FPSTR` and `F` macros. --- cores/esp32/WString.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/esp32/WString.h b/cores/esp32/WString.h index 261868bc9aa..4fbf3e3326e 100644 --- a/cores/esp32/WString.h +++ b/cores/esp32/WString.h @@ -34,8 +34,8 @@ // A pure abstract class forward used as a means to proide a unique pointer type // but really is never defined. class __FlashStringHelper; -#define FPSTR(pstr_pointer) (pstr_pointer) -#define F(string_literal) (string_literal) +#define FPSTR(pstr_pointer) (reinterpret_cast(pstr_pointer)) +#define F(string_literal) (FPSTR(PSTR(string_literal))) // An inherited class for holding the result of a concatenation. These // result objects are assumed to be writable by subsequent concatenations. From 758b4ebf728687c99811c748a6f232c59f59c6ea Mon Sep 17 00:00:00 2001 From: David McCurley <44048235+mrengineer7777@users.noreply.github.com> Date: Wed, 3 May 2023 11:50:35 -0500 Subject: [PATCH 08/15] eraseAP (#8148) --- libraries/WiFi/src/WiFiSTA.cpp | 16 ++++++++++++++++ libraries/WiFi/src/WiFiSTA.h | 1 + 2 files changed, 17 insertions(+) diff --git a/libraries/WiFi/src/WiFiSTA.cpp b/libraries/WiFi/src/WiFiSTA.cpp index 7bcafea1d3e..185aaa84503 100644 --- a/libraries/WiFi/src/WiFiSTA.cpp +++ b/libraries/WiFi/src/WiFiSTA.cpp @@ -366,6 +366,22 @@ bool WiFiSTAClass::disconnect(bool wifioff, bool eraseap) return false; } +/** + * @brief Reset WiFi settings in NVS to default values. + * @return true if erase succeeded + * @note: Resets SSID, password, protocol, mode, etc. + * These settings are maintained by WiFi driver in IDF. + * WiFi driver must be initialized. + */ +bool WiFiSTAClass::eraseAP(void) { + if(WiFi.getMode()==WIFI_MODE_NULL) { + if(!WiFi.enableSTA(true)) + return false; + } + + return esp_wifi_restore()==ESP_OK; +} + /** * Change IP configuration settings disabling the dhcp client * @param local_ip Static ip configuration diff --git a/libraries/WiFi/src/WiFiSTA.h b/libraries/WiFi/src/WiFiSTA.h index b8bb855c198..2cdea7667b8 100644 --- a/libraries/WiFi/src/WiFiSTA.h +++ b/libraries/WiFi/src/WiFiSTA.h @@ -53,6 +53,7 @@ class WiFiSTAClass bool reconnect(); bool disconnect(bool wifioff = false, bool eraseap = false); + bool eraseAP(void); bool isConnected(); From f89df423cdc6721ff4cedb1504dfa490a2a3ddc7 Mon Sep 17 00:00:00 2001 From: David McCurley <44048235+mrengineer7777@users.noreply.github.com> Date: Wed, 3 May 2023 11:57:06 -0500 Subject: [PATCH 09/15] BugFix FlashStringHelper Macros (#8143) Revert to previous definition of `FPSTR` and `F` macros. From 266eea71b59c81906581fcaf1c6be876479ab2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Piln=C3=BD?= <34927466+PilnyTomas@users.noreply.github.com> Date: Wed, 3 May 2023 19:20:31 +0200 Subject: [PATCH 10/15] Added link to external examples to the doc (#8130) --- docs/source/getting_started.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index 0b4280d4b91..4093b415c07 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -133,6 +133,7 @@ in the examples menu or inside each library folder. https://github.com/espressif/arduino-esp32/tree/master/libraries +There is also a `list of examples `_ managed outside of Espressif, so check them out. .. include:: common/datasheet.inc From 2c71406680076ca9af6c1dc5057822c8a3618ea0 Mon Sep 17 00:00:00 2001 From: Renan Passos <34728048+renanrms@users.noreply.github.com> Date: Wed, 3 May 2023 14:26:44 -0300 Subject: [PATCH 11/15] Text correction of timer.rst (#8074) * Update timer.rst Changed text because of an inconsistence between title and text explaining the timerGetConfig function. I don't know if the method timerSetConfig really exists. * Update timer.rst Add informations about timerSetConfig function. --- docs/source/api/timer.rst | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/source/api/timer.rst b/docs/source/api/timer.rst index d253b6794f9..7a97feaabce 100644 --- a/docs/source/api/timer.rst +++ b/docs/source/api/timer.rst @@ -48,10 +48,10 @@ This function is used to end timer. * ``timer`` timer struct. -timerSetConfig +timerGetConfig ************** -This function is used to configure initialized timer (timerBegin() called). +This function is used to get configuration of initialized timer (timerBegin() called). .. code-block:: arduino @@ -62,6 +62,18 @@ This function is used to configure initialized timer (timerBegin() called). This function will return ``configuration`` as uint32_t number. This can be translated by inserting it to struct ``timer_cfg_t.val``. +timerSetConfig +************** + +This function is used to configure initialized timer (timerBegin() called). + +.. code-block:: arduino + + void timerSetConfig(hw_timer_t *timer, uint32_t config); + +* ``timer`` timer struct. +* ``config`` configuration as uint32_t number. Use configuration struct ``timer_cfg_t`` and pass ``timer_cfg_t.val`` as ``config`` paramater. + timerAttachInterrupt ******************** @@ -372,4 +384,4 @@ Repeat timer example: Watchdog timer example: .. literalinclude:: ../../../libraries/ESP32/examples/Timer/WatchdogTimer/WatchdogTimer.ino - :language: arduino \ No newline at end of file + :language: arduino From 9d8471dc9a345b2eed1ab987414d1e0a7200ddf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Wed, 3 May 2023 19:27:54 +0200 Subject: [PATCH 12/15] CI - All boards test (#8114) * Create allboards.yml for all boards test * Clean workflow from unused stuff * Use compile-sketch main * Update find_all_boards.sh --- .github/scripts/find_all_boards.sh | 35 ++++++++++++ .github/workflows/allboards.yml | 86 ++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100755 .github/scripts/find_all_boards.sh create mode 100644 .github/workflows/allboards.yml diff --git a/.github/scripts/find_all_boards.sh b/.github/scripts/find_all_boards.sh new file mode 100755 index 00000000000..a2c53c212c5 --- /dev/null +++ b/.github/scripts/find_all_boards.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Get all boards +boards_array=() + +for line in `grep '.tarch=' boards.txt`; do + board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1) + boards_array+=("espressif:esp32:$board_name") + echo "Added 'espressif:esp32:$board_name' to array" +done + +# Create JSON like string with all boards found and pass it to env variable +board_count=${#boards_array[@]} +echo "Boards found: $board_count" +echo "BOARD-COUNT=$board_count" >> $GITHUB_ENV + +if [ $board_count -gt 0 ] +then + json_matrix='[' + for board in ${boards_array[@]} + do + json_matrix+='"'$board'"' + if [ $board_count -gt 1 ] + then + json_matrix+="," + fi + board_count=$(($board_count - 1)) + done + json_matrix+=']' + + echo $json_matrix + echo "FQBNS=${json_matrix}" >> $GITHUB_ENV +else + echo "FQBNS=" >> $GITHUB_ENV +fi diff --git a/.github/workflows/allboards.yml b/.github/workflows/allboards.yml new file mode 100644 index 00000000000..ddd631b1bf8 --- /dev/null +++ b/.github/workflows/allboards.yml @@ -0,0 +1,86 @@ +name: Boards Test - Remote trigger + +# The workflow will run on remote dispath with event-type set to "test-boards" +on: + repository_dispatch: + types: [test-boards] + +jobs: + find-boards: + runs-on: ubuntu-latest + + outputs: + fqbns: ${{ env.FQBNS }} + board-count: ${{ env.BOARD-COUNT }} + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + ref: ${{ github.event.client_payload.branch }} + + - name: Get boards fqbns + run: + bash .github/scripts/find_all_boards.sh + + setup-chunks: + needs: find-boards + runs-on: ubuntu-latest + if: needs.find-boards.outputs.fqbns != '' + + outputs: + test-chunks: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} + + steps: + - uses: actions/checkout@v3 + - run: npm install + - name: Setup jq + uses: dcarbone/install-jq-action@v1.0.1 + + - id: set-test-chunks + name: Set Chunks + run: + echo "test-chunks<> $GITHUB_OUTPUT + + echo "$( jq -nc '${{ needs.find-boards.outputs.fqbns }} | [_nwise( ${{ needs.find-boards.outputs.board-count }}/15 | ceil)]')" >> $GITHUB_OUTPUT + + echo "EOF" >> $GITHUB_OUTPUT + + test-boards: + needs: setup-chunks + runs-on: ubuntu-latest + + env: + REPOSITORY: | + - source-path: '.' + name: "espressif:esp32" + + strategy: + fail-fast: false + matrix: + chunk: ${{ fromJSON(needs.setup-chunks.outputs['test-chunks']) }} + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Echo FQBNS to file + run: + echo "$FQBN" > fqbns.json + env: + FQBN: ${{ toJSON(matrix.chunk) }} + + - name: Compile sketch + uses: P-R-O-C-H-Y/compile-sketches@main + with: + platforms: | + ${{ env.REPOSITORY }} + multiple-fqbn: true + multiple-fqbn-path: "fqbns.json" + use-json-file: false + enable-deltas-report: false + enable-warnings-report: false + cli-compile-flags: | + - --warnings="all" + sketch-paths: + "- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino" From 628b668c5c4c6ecb6d9b685a1159618c01928108 Mon Sep 17 00:00:00 2001 From: "Dirk O. Kaar" <19971886+dok-net@users.noreply.github.com> Date: Wed, 3 May 2023 19:28:18 +0200 Subject: [PATCH 13/15] Add overloads to support __FlashStringHelper like ESP8266 has them. (#8111) Co-authored-by: Me No Dev --- cores/esp32/WString.h | 2 +- libraries/ESPmDNS/src/ESPmDNS.cpp | 4 ++-- libraries/ESPmDNS/src/ESPmDNS.h | 5 ++++- libraries/WiFi/src/WiFiSTA.h | 6 ++++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cores/esp32/WString.h b/cores/esp32/WString.h index 4fbf3e3326e..6517109f29b 100644 --- a/cores/esp32/WString.h +++ b/cores/esp32/WString.h @@ -34,7 +34,7 @@ // A pure abstract class forward used as a means to proide a unique pointer type // but really is never defined. class __FlashStringHelper; -#define FPSTR(pstr_pointer) (reinterpret_cast(pstr_pointer)) +#define FPSTR(str_pointer) (reinterpret_cast(str_pointer)) #define F(string_literal) (FPSTR(PSTR(string_literal))) // An inherited class for holding the result of a concatenation. These diff --git a/libraries/ESPmDNS/src/ESPmDNS.cpp b/libraries/ESPmDNS/src/ESPmDNS.cpp index 77ab313a08f..cb2828716b1 100644 --- a/libraries/ESPmDNS/src/ESPmDNS.cpp +++ b/libraries/ESPmDNS/src/ESPmDNS.cpp @@ -60,7 +60,7 @@ MDNSResponder::~MDNSResponder() { end(); } -bool MDNSResponder::begin(const char* hostName){ +bool MDNSResponder::begin(const String& hostName){ if(mdns_init()){ log_e("Failed starting MDNS"); return false; @@ -68,7 +68,7 @@ bool MDNSResponder::begin(const char* hostName){ //WiFi.onEvent(_on_sys_event); _hostname = hostName; _hostname.toLowerCase(); - if(mdns_hostname_set(hostName)) { + if(mdns_hostname_set(hostName.c_str())) { log_e("Failed setting MDNS hostname"); return false; } diff --git a/libraries/ESPmDNS/src/ESPmDNS.h b/libraries/ESPmDNS/src/ESPmDNS.h index 16c590d4a87..9a5e5c14184 100644 --- a/libraries/ESPmDNS/src/ESPmDNS.h +++ b/libraries/ESPmDNS/src/ESPmDNS.h @@ -54,7 +54,10 @@ class MDNSResponder { public: MDNSResponder(); ~MDNSResponder(); - bool begin(const char* hostName); + bool begin(const String& hostName); + bool begin(const char* hostName){ + return begin(String(hostName)); + } void end(); void setInstanceName(String name); diff --git a/libraries/WiFi/src/WiFiSTA.h b/libraries/WiFi/src/WiFiSTA.h index 2cdea7667b8..0b8f9daf053 100644 --- a/libraries/WiFi/src/WiFiSTA.h +++ b/libraries/WiFi/src/WiFiSTA.h @@ -45,7 +45,13 @@ class WiFiSTAClass public: wl_status_t begin(const char* wpa2_ssid, wpa2_auth_method_t method, const char* wpa2_identity=NULL, const char* wpa2_username=NULL, const char *wpa2_password=NULL, const char* ca_pem=NULL, const char* client_crt=NULL, const char* client_key=NULL, int32_t channel=0, const uint8_t* bssid=0, bool connect=true); + wl_status_t begin(const String& wpa2_ssid, wpa2_auth_method_t method, const String& wpa2_identity = (const char*)NULL, const String& wpa2_username = (const char*)NULL, const String& wpa2_password = (const char*)NULL, const String& ca_pem = (const char*)NULL, const String& client_crt = (const char*)NULL, const String& client_key = (const char*)NULL, int32_t channel=0, const uint8_t* bssid=0, bool connect=true) { + return begin(wpa2_ssid.c_str(), method, wpa2_identity.c_str(), wpa2_username.c_str(), wpa2_password.c_str(), ca_pem.c_str(), client_crt.c_str(), client_key.c_str(), channel, bssid, connect); + } wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true); + wl_status_t begin(const String& ssid, const String& passphrase = (const char*)NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true) { + return begin(ssid.c_str(), passphrase.c_str(), channel, bssid, connect); + } wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true); wl_status_t begin(); From 7e51a03702e9658597e4f3c69314d5f4bc1b0400 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 3 May 2023 10:29:56 -0700 Subject: [PATCH 14/15] Add protocol-explicit upload.tool properties required for pluggable discovery compatibility (#8151) A new flexible and powerful "pluggable discovery" system was added to the Arduino boards platform framework. This system makes it easy for Arduino boards platform authors to use any arbitrary communication channel between the board and development tools. Boards platform configurations that use the old property syntax are automatically translated to the new syntax by Arduino CLI: https://arduino.github.io/arduino-cli/latest/platform-specification/#sketch-upload-configuration > For backward compatibility with IDE 1.8.15 and older the previous syntax is still supported This translation is only done in platforms that use the old syntax exclusively. If `pluggable_discovery` properties are defined for the platform then the new pluggable discovery-style `upload.tool.` properties must be defined for each board as well. This platform was converted to use the new pluggable discovery platform properties syntax, so those properties are required. Although such properties were added to board definitions at the time the syntax was changed, new board definitions without the required properties were added later. Those missing properties caused uploads to fail for users of the recent versions of Arduino IDE and Arduino CLI with an error of the form: Error during Upload: Property 'upload.tool.serial' is undefined It is also important to provide compatibility with versions of Arduino development tools from before the introduction of the modern pluggable discovery system. For this reason, the old style `.upload.tool` properties are retained. Old versions of the development tools will treat the `.upload.tool.default` properties as an unused arbitrary user defined property with no special significance and the new versions of the development tools will do the same for the `upload.tool` properties. --- boards.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boards.txt b/boards.txt index 7fef6d89647..f3ea5e1cc5b 100644 --- a/boards.txt +++ b/boards.txt @@ -7314,6 +7314,7 @@ dfrobot_beetle_esp32c3.menu.EraseFlash.all.upload.erase_cmd=-e dfrobot_firebeetle2_esp32e.name=FireBeetle 2 ESP32-E dfrobot_firebeetle2_esp32e.upload.tool=esptool_py +dfrobot_firebeetle2_esp32e.upload.tool.default=esptool_py dfrobot_firebeetle2_esp32e.upload.maximum_size=1310720 dfrobot_firebeetle2_esp32e.upload.maximum_data_size=327680 dfrobot_firebeetle2_esp32e.upload.flags= @@ -22259,6 +22260,7 @@ esp32c3m1IKit.menu.EraseFlash.all.upload.erase_cmd=-e roboheart_hercules.name=RoboHeart Hercules roboheart_hercules.upload.tool=esptool_py +roboheart_hercules.upload.tool.default=esptool_py roboheart_hercules.upload.maximum_size=1310720 roboheart_hercules.upload.maximum_data_size=327680 roboheart_hercules.upload.wait_for_upload_port=true From 3670e2bf2aca822f2e1225fdb0e0796e490005a8 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Wed, 3 May 2023 20:37:02 +0300 Subject: [PATCH 15/15] Update version to 2.0.9 --- cores/esp32/esp_arduino_version.h | 2 +- package.json | 2 +- platform.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cores/esp32/esp_arduino_version.h b/cores/esp32/esp_arduino_version.h index beeb4976a26..a16dc6f8eaf 100644 --- a/cores/esp32/esp_arduino_version.h +++ b/cores/esp32/esp_arduino_version.h @@ -23,7 +23,7 @@ extern "C" { /** Minor version number (x.X.x) */ #define ESP_ARDUINO_VERSION_MINOR 0 /** Patch version number (x.x.X) */ -#define ESP_ARDUINO_VERSION_PATCH 8 +#define ESP_ARDUINO_VERSION_PATCH 9 /** * Macro to convert ARDUINO version number into an integer diff --git a/package.json b/package.json index 973add3b31f..057c2e1e3f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "framework-arduinoespressif32", - "version": "2.0.8", + "version": "2.0.9", "description": "Arduino Wiring-based Framework for the Espressif ESP32, ESP32-S and ESP32-C series of SoCs", "keywords": [ "framework", diff --git a/platform.txt b/platform.txt index 7aefee20c93..8bb67884e71 100644 --- a/platform.txt +++ b/platform.txt @@ -1,5 +1,5 @@ name=ESP32 Arduino -version=2.0.8 +version=2.0.9 tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s2-elf