Skip to content

Commit 88071d0

Browse files
authored
Merge branch 'master' into release/v3.0.x
2 parents 5cb8b65 + fb6e977 commit 88071d0

File tree

61 files changed

+1174
-626
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1174
-626
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ body:
7575
attributes:
7676
label: IDE Name
7777
description: What IDE are you using?
78-
placeholder: eg. Arduino IDE, PlatformIO, Sloeber...
78+
placeholder: eg. Arduino IDE, VSCode, Sloeber...
7979
validations:
8080
required: true
8181
- type: input

boards.txt

+871
Large diffs are not rendered by default.

cores/esp32/Esp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ const char *EspClass::getChipModel(void) {
274274
return "ESP32-D0WD";
275275
}
276276
case EFUSE_RD_CHIP_VER_PKG_ESP32D2WDQ5: return "ESP32-D2WD";
277-
case EFUSE_RD_CHIP_VER_PKG_ESP32PICOD2: return "ESP32-PICO-D2";
277+
case EFUSE_RD_CHIP_VER_PKG_ESP32U4WDH: return "ESP32-U4WDH";
278278
case EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4: return "ESP32-PICO-D4";
279279
case EFUSE_RD_CHIP_VER_PKG_ESP32PICOV302: return "ESP32-PICO-V3-02";
280280
case EFUSE_RD_CHIP_VER_PKG_ESP32D0WDR2V3: return "ESP32-D0WDR2-V3";

docs/_static/logo_pio.png

-25.4 KB
Binary file not shown.

docs/en/getting_started.rst

+5-6
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,13 @@ Supported IDEs
7878

7979
Here is the list of supported IDE for Arduino ESP32 support integration.
8080

81-
+-------------------+-------------------+
82-
| |arduino-logo| | |pio-logo| |
83-
+-------------------+-------------------+
84-
| Arduino IDE | PlatformIO |
85-
+-------------------+-------------------+
81+
+-------------------+
82+
| |arduino-logo| |
83+
+-------------------+
84+
| Arduino IDE |
85+
+-------------------+
8686

8787
.. |arduino-logo| image:: ../_static/logo_arduino.png
88-
.. |pio-logo| image:: ../_static/logo_pio.png
8988

9089
See `Installing Guides <installing.html>`_ for more details on how to install the Arduino ESP32 support.
9190

docs/en/installing.rst

-87
Original file line numberDiff line numberDiff line change
@@ -63,92 +63,6 @@ To start the installation process using the Boards Manager, follow these steps:
6363

6464
- Restart Arduino IDE.
6565

66-
Installing using PlatformIO
67-
---------------------------
68-
69-
.. figure:: ../_static/logo_pio.png
70-
:align: center
71-
:width: 200
72-
:figclass: align-center
73-
74-
PlatformIO is a professional collaborative platform for embedded development. It has out-of-the-box support for ESP32 SoCs and allows working with Arduino ESP32 as well as ESP-IDF from Espressif without changing your development environment. PlatformIO includes lots of instruments for the most common development tasks such as debugging, unit testing, and static code analysis.
75-
76-
.. warning:: Integration of the Arduino Core ESP32 project in PlatformIO is maintained by PlatformIO developers. Arduino Core ESP32 Project Team cannot support PlatformIO-specific issues. Please report these issues in official `PlatformIO repositories <https://github.com/platformio>`_.
77-
78-
A detailed overview of the PlatformIO ecosystem and its philosophy can be found in `the official documentation <https://docs.platformio.org/en/latest/core/index.html>`_.
79-
80-
PlatformIO can be used in two flavors:
81-
82-
- `PlatformIO IDE <https://platformio.org/platformio-ide>`_ is a toolset for embedded C/C++ development available on Windows, macOS and Linux platforms
83-
84-
- `PlatformIO Core (CLI) <https://docs.platformio.org/en/latest/core/index.html>`_ is a command-line tool that consists of a multi-platform build system, platform and library managers and other integration components. It can be used with a variety of code development environments and allows integration with cloud platforms and web services
85-
86-
To install PlatformIO, you can follow this Getting Started, provided at `docs.platformio.org`_.
87-
88-
Using the stable code
89-
*********************
90-
91-
.. note::
92-
A detailed overview of supported development boards, examples and frameworks can be found on `the official Espressif32 dev-platform page <https://registry.platformio.org/platforms/platformio/espressif32>`_ in the PlatformIO Registry.
93-
94-
The most reliable and easiest way to get started is to use the latest stable version of the ESP32 development platform that passed all tests/verifications and can be used in production.
95-
96-
Create a new project and select one of the available boards. You can change after by changing the `platformio.ini <https://docs.platformio.org/en/latest/projectconf/index.html>`_ file.
97-
98-
- For ESP32
99-
100-
.. code-block:: bash
101-
102-
[env:esp32dev]
103-
platform = espressif32
104-
board = esp32dev
105-
framework = arduino
106-
107-
- For ESP32-S2 (ESP32-S2-Saola-1 board)
108-
109-
.. code-block:: bash
110-
111-
[env:esp32-s2-saola-1]
112-
platform = espressif32
113-
board = esp32-s2-saola-1
114-
framework = arduino
115-
116-
- For ESP32-C3 (ESP32-C3-DevKitM-1 board)
117-
118-
.. code-block:: bash
119-
120-
[env:esp32-c3-devkitm-1]
121-
platform = espressif32
122-
board = esp32-c3-devkitm-1
123-
framework = arduino
124-
125-
How to update to the latest code
126-
********************************
127-
128-
To test the latest Arduino ESP32, you need to change your project *platformio.ini* accordingly.
129-
The following configuration uses the upstream version of the Espressif development platform and the latest Arduino core directly from the Espressif GitHub repository:
130-
131-
.. code-block:: bash
132-
133-
[env:esp32-c3-devkitm-1]
134-
platform = https://github.com/platformio/platform-espressif32.git
135-
board = esp32-c3-devkitm-1
136-
framework = arduino
137-
platform_packages =
138-
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32#master
139-
140-
141-
To get more information about PlatformIO, see the following links:
142-
143-
- `PlatformIO Core (CLI) <https://docs.platformio.org/en/latest/core/index.html>`_
144-
145-
- `PlatformIO Home <https://docs.platformio.org/en/latest/home/index.html>`_
146-
147-
- `Tutorials and Examples <https://docs.platformio.org/en/latest/tutorials/index.html>`_
148-
149-
- `Library Management <https://docs.platformio.org/en/latest/librarymanager/index.html>`_
150-
151-
15266
Windows (manual installation)
15367
-----------------------------
15468

@@ -360,4 +274,3 @@ Where ``~/Documents/Arduino`` represents your sketch book location as per "Ardui
360274
- Restart Arduino IDE.
361275

362276
.. _Arduino.cc: https://www.arduino.cc/en/Main/Software
363-
.. _docs.platformio.org: https://docs.platformio.org/en/latest/integration/ide/pioide.html

docs/en/tutorials/blink.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Introduction
77

88
This is the interactive blink tutorial using `Wokwi`_. For this tutorial, you don't need the ESP32 board or the Arduino toolchain.
99

10-
.. note:: If you don't want to use this tutorial with the simulation, you can copy and paste the :ref:`blink_example_code` from `Wokwi`_ editor and use it on the `Arduino IDE`_ or `PlatformIO`_.
10+
.. note:: If you don't want to use this tutorial with the simulation, you can copy and paste the :ref:`blink_example_code` from `Wokwi`_ editor and use it on the `Arduino IDE`.
1111

1212
About this Tutorial
1313
-------------------
@@ -109,5 +109,4 @@ Resources
109109

110110
.. _ESP32 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
111111
.. _Wokwi: https://wokwi.com/
112-
.. _PlatformIO: https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#platformio
113112
.. _Arduino IDE: https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-boards-manager

libraries/BLE/src/BLECharacteristic.cpp

+25
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,13 @@ void BLECharacteristic::handleGATTServerEvent(esp_gatts_cb_event_t event, esp_ga
279279

280280
log_d(" - Response to write event: New value: handle: %.2x, uuid: %s", getHandle(), getUUID().toString().c_str());
281281

282+
// The call to BLEUtils::buildHexData() doesn't output anything if the log level is not
283+
// "DEBUG". As it is quite CPU intensive, it is much better to not call it if not needed.
284+
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
282285
char *pHexData = BLEUtils::buildHexData(nullptr, param->write.value, param->write.len);
283286
log_d(" - Data: length: %d, data: %s", param->write.len, pHexData);
284287
free(pHexData);
288+
#endif
285289

286290
if (param->write.need_rsp) {
287291
esp_gatt_rsp_t rsp;
@@ -390,9 +394,13 @@ void BLECharacteristic::handleGATTServerEvent(esp_gatts_cb_event_t event, esp_ga
390394
rsp.attr_value.handle = param->read.handle;
391395
rsp.attr_value.auth_req = ESP_GATT_AUTH_REQ_NONE;
392396

397+
// The call to BLEUtils::buildHexData() doesn't output anything if the log level is not
398+
// "DEBUG". As it is quite CPU intensive, it is much better to not call it if not needed.
399+
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
393400
char *pHexData = BLEUtils::buildHexData(nullptr, rsp.attr_value.value, rsp.attr_value.len);
394401
log_d(" - Data: length=%d, data=%s, offset=%d", rsp.attr_value.len, pHexData, rsp.attr_value.offset);
395402
free(pHexData);
403+
#endif
396404

397405
esp_err_t errRc = ::esp_ble_gatts_send_response(gatts_if, param->read.conn_id, param->read.trans_id, ESP_GATT_OK, &rsp);
398406
if (errRc != ESP_OK) {
@@ -471,7 +479,20 @@ void BLECharacteristic::notify(bool is_notification) {
471479

472480
m_pCallbacks->onNotify(this); // Invoke the notify callback.
473481

482+
// GeneralUtils::hexDump() doesn't output anything if the log level is not
483+
// "VERBOSE". Additionally, it is very CPU intensive, even when it doesn't
484+
// output anything! So it is much better to *not* call it at all if not needed.
485+
// In a simple program which calls BLECharacteristic::notify() every 50 ms,
486+
// the performance gain of this little optimization is 37% in release mode
487+
// (-O3) and 57% in debug mode.
488+
// Of course, the "#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE" guard
489+
// could also be put inside the GeneralUtils::hexDump() function itself. But
490+
// it's better to put it here also, as it is clearer (indicating a verbose log
491+
// thing) and it allows to remove the "m_value.getValue().c_str()" call, which
492+
// is, in itself, quite CPU intensive.
493+
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
474494
GeneralUtils::hexDump((uint8_t *)m_value.getValue().c_str(), m_value.getValue().length());
495+
#endif
475496

476497
if (getService()->getServer()->getConnectedCount() == 0) {
477498
log_v("<< notify: No connected clients.");
@@ -624,9 +645,13 @@ void BLECharacteristic::setReadProperty(bool value) {
624645
* @param [in] length The length of the data in bytes.
625646
*/
626647
void BLECharacteristic::setValue(uint8_t *data, size_t length) {
648+
// The call to BLEUtils::buildHexData() doesn't output anything if the log level is not
649+
// "VERBOSE". As it is quite CPU intensive, it is much better to not call it if not needed.
650+
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
627651
char *pHex = BLEUtils::buildHexData(nullptr, data, length);
628652
log_v(">> setValue: length=%d, data=%s, characteristic UUID=%s", length, pHex, getUUID().toString().c_str());
629653
free(pHex);
654+
#endif
630655
if (length > ESP_GATT_MAX_ATTR_LEN) {
631656
log_e("Size %d too large, must be no bigger than %d", length, ESP_GATT_MAX_ATTR_LEN);
632657
return;

libraries/ESP32/examples/AnalogOut/LEDCFade/LEDCFade.ino

-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ void ARDUINO_ISR_ATTR LED_FADE_ISR() {
3030
void setup() {
3131
// Initialize serial communication at 115200 bits per second:
3232
Serial.begin(115200);
33-
while (!Serial) {
34-
delay(10);
35-
}
3633

3734
// Setup timer with given frequency, resolution and attach it to a led pin with auto-selected channel
3835
ledcAttach(LED_PIN, LEDC_BASE_FREQ, LEDC_TIMER_12_BIT);

libraries/ESP32/examples/DeepSleep/SmoothBlink_ULP_Code/SmoothBlink_ULP_Code.ino

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ void ulp_setup() {
139139

140140
void setup() {
141141
Serial.begin(115200);
142-
while (!Serial) {} // wait for Serial to start
143142

144143
ulp_setup(); // it really only runs on the first ESP32 boot
145144
Serial.printf("\nStarted smooth blink with delay %ld\n", *fadeCycleDelay);

libraries/ESP32/examples/FreeRTOS/BasicMultiThreading/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ To get more information about the Espressif boards see [Espressif Development Ki
6262
* Before Compile/Verify, select the correct board: `Tools -> Board`.
6363
* Select the COM port: `Tools -> Port: xxx` where the `xxx` is the detected COM port.
6464

65-
#### Using Platform IO
66-
67-
* Select the COM port: `Devices` or set the `upload_port` option on the `platformio.ini` file.
68-
6965
## Troubleshooting
7066

7167
***Important: Make sure you are using a good quality USB cable and that you have a reliable power source***

libraries/ESP32/examples/FreeRTOS/Mutex/Mutex.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ void Task(void *pvParameters);
1717
void setup() {
1818
// Initialize serial communication at 115200 bits per second:
1919
Serial.begin(115200);
20-
while (!Serial) {
21-
delay(100);
22-
}
20+
2321
Serial.printf(" Task 0 | Task 1\n");
2422

2523
#ifdef USE_MUTEX

libraries/ESP32/examples/FreeRTOS/Mutex/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ To get more information about the Espressif boards see [Espressif Development Ki
5151
* Before Compile/Verify, select the correct board: `Tools -> Board`.
5252
* Select the COM port: `Tools -> Port: xxx` where the `xxx` is the detected COM port.
5353

54-
#### Using Platform IO
55-
56-
* Select the COM port: `Devices` or set the `upload_port` option on the `platformio.ini` file.
57-
5854
## Example Log Output
5955

6056
The expected output of shared variables protected by mutex demonstrates mutually exclusive access from tasks - they do not interrupt each other and do not rewrite the value before the other task has read it back.

libraries/ESP32/examples/FreeRTOS/Queue/Queue.ino

-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ typedef struct {
2424
void setup() {
2525
// Initialize serial communication at 115200 bits per second:
2626
Serial.begin(115200);
27-
while (!Serial) {
28-
delay(10);
29-
}
3027

3128
// Create the queue which will have <QueueElementSize> number of elements, each of size `message_t` and pass the address to <QueueHandle>.
3229
QueueHandle = xQueueCreate(QueueElementSize, sizeof(message_t));

libraries/ESP32/examples/FreeRTOS/Queue/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ To get more information about the Espressif boards see [Espressif Development Ki
2929
* Before Compile/Verify, select the correct board: `Tools -> Board`.
3030
* Select the COM port: `Tools -> Port: xxx` where the `xxx` is the detected COM port.
3131

32-
#### Using Platform IO
33-
34-
* Select the COM port: `Devices` or set the `upload_port` option on the `platformio.ini` file.
35-
3632
## Example Log Output
3733

3834
```

libraries/ESP32/examples/FreeRTOS/Semaphore/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ To get more information about the Espressif boards see [Espressif Development Ki
3535
* Before Compile/Verify, select the correct board: `Tools -> Board`.
3636
* Select the COM port: `Tools -> Port: xxx` where the `xxx` is the detected COM port.
3737

38-
#### Using Platform IO
39-
40-
* Select the COM port: `Devices` or set the `upload_port` option on the `platformio.ini` file.
41-
4238
## Example Log Output
4339

4440
```

libraries/ESP32/examples/FreeRTOS/Semaphore/Semaphore.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ void warehouse_worker_task(void *pvParameters) {
3636

3737
void setup() {
3838
Serial.begin(115200);
39-
while (!Serial) {
40-
delay(100);
41-
}
39+
4240
// Create the semaphore
4341
package_delivered_semaphore = xSemaphoreCreateCounting(10, 0);
4442

libraries/ESP32/examples/GPIO/FunctionalInterrupt/FunctionalInterrupt.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ Button button2(BUTTON2);
5656

5757
void setup() {
5858
Serial.begin(115200);
59-
while (!Serial) {
60-
delay(10);
61-
}
59+
6260
Serial.println("Starting Functional Interrupt example.");
6361
button1.begin();
6462
button2.begin();

libraries/ESP32/examples/MacAddress/GetMacAddress/GetMacAddress.ino

-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ esp_mac_type_t values:
3434
void setup() {
3535

3636
Serial.begin(115200);
37-
while (!Serial) {
38-
delay(100);
39-
}
4037

4138
Serial.println("Interface\t\t\t\t\t\tMAC address (6 bytes, 4 universally administered, default)");
4239

libraries/ESP32/examples/RMT/Legacy_RMT_Driver_Compatible/Legacy_RMT_Driver_Compatible.ino

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// add the file "build_opt.h" to your Arduino project folder with "-DESP32_ARDUINO_NO_RGB_BUILTIN" to use the RMT Legacy driver
1313
#error "ESP32_ARDUINO_NO_RGB_BUILTIN is not defined, this example is intended to demonstrate the RMT Legacy driver."
1414
#error "Please add the file 'build_opt.h' with '-DESP32_ARDUINO_NO_RGB_BUILTIN' to your Arduino project folder."
15-
#error "Another way to disable the RGB_BUILTIN is to define it in the platformio.ini file, for instance: '-D ESP32_ARDUINO_NO_RGB_BUILTIN'"
1615

1716
#else
1817

libraries/ESP32/examples/Serial/RS485_Echo_Demo/RS485_Echo_Demo.ino

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121

2222
void setup() {
2323
Serial.begin(115200);
24-
while (!Serial) {
25-
delay(10);
26-
}
2724

2825
RS485.begin(9600, SERIAL_8N1, RS485_RX_PIN, RS485_TX_PIN);
2926
while (!RS485) {

libraries/ESP32/examples/Template/ExampleTemplate/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ To get more information about the Espressif boards see [Espressif Development Ki
6464
* Before Compile/Verify, select the correct board: `Tools -> Board`.
6565
* Select the COM port: `Tools -> Port: xxx` where the `xxx` is the detected COM port.
6666

67-
#### Using Platform IO
68-
69-
* Select the COM port: `Devices` or set the `upload_port` option on the `platformio.ini` file.
70-
7167
## Example/Log Output ==(OPTIONAL)==
7268

7369
==*Add the log/serial output here!*==

libraries/ESP32/examples/Utilities/HEXBuilder/HEXBuilder.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
void setup() {
44
Serial.begin(115200);
5-
while (!Serial) {
6-
delay(10);
7-
}
5+
86
Serial.println("\n\n\nStart.");
97

108
// Convert a HEX string like 6c6c6f20576f726c64 to a binary buffer

libraries/ESP32/examples/Utilities/MD5Builder/MD5Builder.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212

1313
void setup() {
1414
Serial.begin(115200);
15-
while (!Serial) {
16-
delay(10);
17-
}
15+
1816
Serial.println("\n\n\nStart.");
1917

2018
// Check if a password obfuscated in an MD5 actually

libraries/ESP32/examples/Utilities/SHA1Builder/SHA1Builder.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313

1414
void setup() {
1515
Serial.begin(115200);
16-
while (!Serial) {
17-
delay(10);
18-
}
16+
1917
Serial.println("\n\n\nStart.");
2018

2119
// Check if a password obfuscated in an SHA1 actually

0 commit comments

Comments
 (0)