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 1/5] 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 2/5] 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 3/5] 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 4/5] 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 5/5] 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