Skip to content

Commit 4fb5a2c

Browse files
committed
Merge branch 'master' into esp-idf-v5.1-libs
2 parents ee9a71d + 720be75 commit 4fb5a2c

Some content is hidden

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

45 files changed

+3038
-364
lines changed

Diff for: .github/ISSUE_TEMPLATE/Issue-report.yml

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ body:
4141
options:
4242
- latest master (checkout manually)
4343
- latest development Release Candidate (RC-X)
44+
- v2.0.11
4445
- v2.0.10
4546
- v2.0.9
4647
- v2.0.8

Diff for: .github/workflows/allboards.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ jobs:
3232
test-chunks: ${{ steps['set-test-chunks'].outputs['test-chunks'] }}
3333

3434
steps:
35-
- uses: actions/checkout@v3
35+
- name: Checkout repository
36+
uses: actions/checkout@v3
37+
with:
38+
ref: ${{ github.event.client_payload.branch }}
39+
3640
- run: npm install
3741
- name: Setup jq
3842
uses: dcarbone/[email protected]
@@ -63,6 +67,8 @@ jobs:
6367
steps:
6468
- name: Checkout repository
6569
uses: actions/checkout@v3
70+
with:
71+
ref: ${{ github.event.client_payload.branch }}
6672

6773
- name: Echo FQBNS to file
6874
run:

Diff for: boards.txt

+1,741-240
Large diffs are not rendered by default.

Diff for: cores/esp32/HWCDC.cpp

+12-3
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,18 @@ void HWCDC::begin(unsigned long baud)
200200
if(tx_lock == NULL) {
201201
tx_lock = xSemaphoreCreateMutex();
202202
}
203-
setRxBufferSize(256);//default if not preset
204-
setTxBufferSize(256);//default if not preset
205-
203+
//RX Buffer default has 256 bytes if not preset
204+
if(rx_queue == NULL) {
205+
if (!setRxBufferSize(256)) {
206+
log_e("HW CDC RX Buffer error");
207+
}
208+
}
209+
//TX Buffer default has 256 bytes if not preset
210+
if (tx_ring_buf == NULL) {
211+
if (!setTxBufferSize(256)) {
212+
log_e("HW CDC TX Buffer error");
213+
}
214+
}
206215
usb_serial_jtag_ll_disable_intr_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
207216
usb_serial_jtag_ll_clr_intsts_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
208217
usb_serial_jtag_ll_ena_intr_mask(USB_SERIAL_JTAG_INTR_SERIAL_IN_EMPTY | USB_SERIAL_JTAG_INTR_SERIAL_OUT_RECV_PKT | USB_SERIAL_JTAG_INTR_BUS_RESET);

Diff for: cores/esp32/esp32-hal-bt.c

+4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717
#if SOC_BT_SUPPORTED
1818
#ifdef CONFIG_BT_ENABLED
1919

20+
#if CONFIG_IDF_TARGET_ESP32
21+
bool btInUse(){ return true; }
22+
#else
2023
// user may want to change it to free resources
2124
__attribute__((weak)) bool btInUse(){ return true; }
25+
#endif
2226

2327
#include "esp_bt.h"
2428

Diff for: cores/esp32/esp32-hal-gpio.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extern "C" {
5151
#define PULLDOWN 0x08
5252
#define INPUT_PULLDOWN 0x09
5353
#define OPEN_DRAIN 0x10
54-
#define OUTPUT_OPEN_DRAIN 0x12
54+
#define OUTPUT_OPEN_DRAIN 0x13
5555
#define ANALOG 0xC0
5656

5757
//Interrupt Modes

Diff for: cores/esp32/esp32-hal-misc.c

+6
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,15 @@ bool verifyRollbackLater() { return false; }
243243
#endif
244244

245245
#ifdef CONFIG_BT_ENABLED
246+
#if CONFIG_IDF_TARGET_ESP32
247+
//overwritten in esp32-hal-bt.c
248+
bool btInUse() __attribute__((weak));
249+
bool btInUse(){ return false; }
250+
#else
246251
//from esp32-hal-bt.c
247252
extern bool btInUse();
248253
#endif
254+
#endif
249255

250256
void initArduino()
251257
{

Diff for: docs/source/api/adc.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ This function will return analog value in millivolts (calibrated).
4848
analogReadResolution
4949
^^^^^^^^^^^^^^^^^^^^
5050

51-
This function is used to set the resolution of ``analogRead`` return value. Default is 12 bits (range from 0 to 4096)
52-
for all chips except ESP32S3 where default is 13 bits (range from 0 to 8192).
51+
This function is used to set the resolution of ``analogRead`` return value. Default is 12 bits (range from 0 to 4095)
52+
for all chips except ESP32S3 where default is 13 bits (range from 0 to 8191).
5353
When different resolution is set, the values read will be shifted to match the given resolution.
5454

5555
Range is 1 - 16 .The default value will be used, if this function is not used.
@@ -158,4 +158,4 @@ Here is an example of how to use the ADC.
158158
.. literalinclude:: ../../../libraries/ESP32/examples/AnalogRead/AnalogRead.ino
159159
:language: arduino
160160

161-
Or you can run Arduino example 01.Basics -> AnalogReadSerial.
161+
Or you can run Arduino example 01.Basics -> AnalogReadSerial.

Diff for: docs/source/faq.rst

+1-18
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,4 @@ Note that modifying ``sdkconfig`` or ``sdkconfig.h`` files found in the arduino-
1414
How to compile libs with different debug level?
1515
-----------------------------------------------
1616

17-
The short answer is ``esp32-arduino-lib-builder/configs/defconfig.common:44``. A guide explaining the process can be found here <guides/core_debug>
18-
19-
SPIFFS mount failed
20-
-------------------
21-
When you come across and error like this:
22-
23-
.. code-block:: shell
24-
25-
E (588) SPIFFS: mount failed, -10025
26-
[E][SPIFFS.cpp:47] begin(): Mounting SPIFFS failed! Error: -1
27-
28-
Try enforcing format on fail in your code by adding ``true`` in the ``begin`` method such as this:
29-
30-
.. code-block:: c++
31-
32-
SPIFFS.begin(true);
33-
34-
See the method prototype for reference: ``bool begin(bool formatOnFail=false, const char * basePath="/spiffs", uint8_t maxOpenFiles=10, const char * partitionLabel=NULL);``
17+
The short answer is ``esp32-arduino-lib-builder/configs/defconfig.common:44``. A guide explaining the process can be found here <guides/core_debug>

Diff for: docs/source/troubleshooting.rst

+132-12
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Solution
3333
To avoid this error, you can install the ``python-is-python3`` package to create the symbolic links.
3434

3535
.. code-block:: bash
36-
36+
3737
sudo apt install python-is-python3
3838
3939
If you are not using Ubuntu, you can check if you have the Python correctly installed or the presence of the symbolic links/environment variables.
@@ -44,7 +44,7 @@ Flashing
4444
Why is my board not flashing/uploading when I try to upload my sketch?
4545
**********************************************************************
4646

47-
To be able to upload the sketch via serial interface, the ESP32 must be in the download mode. The download mode allows you to upload the sketch over the serial port and to get into it, you need to keep the **GPIO0** in LOW while a resetting (**EN** pin) cycle.
47+
To be able to upload the sketch via the serial interface, the ESP32 must be in the download mode. The download mode allows you to upload the sketch over the serial port, and to get into it, you need to keep the **GPIO0** in LOW while resetting (**EN** pin) the cycle.
4848
If you are trying to upload a new sketch and your board is not responding, there are some possible reasons.
4949

5050
Possible fatal error message from the Arduino IDE:
@@ -54,23 +54,26 @@ Possible fatal error message from the Arduino IDE:
5454
Solution
5555
^^^^^^^^
5656

57-
Here are some steps that you can try to:
57+
Here are some steps that you can try:
5858

59-
* Check your USB cable and try a new one.
60-
* Change the USB port.
59+
* Check your USB cable and try a new one (some cables are only for charging and there is no data connection).
60+
* Change the USB port - prefer direct connection to the computer and avoid USB hubs. Some USB ports may share the power source with other ports used, for example, for charging a phone.
6161
* Check your power supply.
62+
* Make sure that nothing is connected to pins labeled **TX** and **RX**. Please refer to the pin layout table - some TX and RX pins may not be labeled on the dev board.
6263
* In some instances, you must keep **GPIO0** LOW during the uploading process via the serial interface.
63-
* Hold down the **“BOOT”** button in your ESP32 board while uploading/flashing.
64+
* Hold down the **“BOOT”** button on your ESP32 board while uploading/flashing.
65+
* Solder a **10uF** capacitor in parallel with **RST** and **GND**.
66+
* If you are using external power connected to pins, it is easy to confuse pins **CMD** (which is usually next to the 5V pin) and **GND**.
6467

65-
In some development boards, you can try adding the reset delay circuit, as described in the *Power-on Sequence* section on the `ESP32 Hardware Design Guidelines <https://www.espressif.com/sites/default/files/documentation/esp32_hardware_design_guidelines_en.pdf>`_ in order to get into the download mode automatically.
68+
In some development boards, you can try adding the reset delay circuit, as described in the *Power-on Sequence* section on the `ESP32 Hardware Design Guidelines <https://www.espressif.com/sites/default/files/documentation/esp32_hardware_design_guidelines_en.pdf>`_ to get into the download mode automatically.
6669

6770
Hardware
6871
--------
6972

7073
Why is my computer not detecting my board?
71-
**************************************************
74+
******************************************
7275

73-
If your board is not being detected after connecting to the USB, you can try to:
76+
If your board is not being detected after connecting to the USB, you can try the following:
7477

7578
Solution
7679
^^^^^^^^
@@ -87,8 +90,8 @@ Wi-Fi
8790
Why does the board not connect to WEP/WPA-"encrypted" Wi-Fi?
8891
************************************************************
8992

90-
Please note that WEP/WPA has significant security vulnerabilities and its use is strongly discouraged.
91-
The support may therefore be removed in the future. Please migrate to WPA2 or newer.
93+
Please note that WEP/WPA has significant security vulnerabilities, and its use is strongly discouraged.
94+
The support may, therefore, be removed in the future. Please migrate to WPA2 or newer.
9295

9396
Solution
9497
^^^^^^^^
@@ -104,7 +107,7 @@ Nevertheless, it may be necessary to connect to insecure networks. To do this, t
104107
Why does the board not connect to WPA3-encrypted Wi-Fi?
105108
*******************************************************
106109

107-
WPA3 support is resource intensive and may not be compiled into the used SDK.
110+
WPA3 support is resource-intensive and may not be compiled into the used SDK.
108111

109112
Solution
110113
^^^^^^^^
@@ -119,3 +122,120 @@ Sample code to check SDK WPA3 support at compile time:
119122
#ifndef CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE
120123
#warning "No WPA3 support."
121124
#endif
125+
126+
SPIFFS mount failed
127+
-------------------
128+
When you come across an error like this:
129+
130+
.. code-block:: shell
131+
132+
E (588) SPIFFS: mount failed, -10025
133+
[E][SPIFFS.cpp:47] begin(): Mounting SPIFFS failed! Error: -1
134+
135+
Try enforcing format on fail in your code by adding ``true`` in the ``begin`` method such as this:
136+
137+
.. code-block:: c++
138+
139+
SPIFFS.begin(true);
140+
141+
See the method prototype for reference: ``bool begin(bool formatOnFail=false, const char * basePath="/spiffs", uint8_t maxOpenFiles=10, const char * partitionLabel=NULL);``
142+
143+
SD card mount fail
144+
------------------
145+
Even though you made sure that the pins are correctly connected, and not using restricted pins, you may still get an error such as this:
146+
147+
.. code-block:: shell
148+
149+
[ 1065][E][sd_diskio.cpp:807] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
150+
151+
Most of the problems originate from a poor connection caused by prototyping cables/wires, and one of the best solutions is to **solder all the connections** or use good quality connectors.
152+
153+
Note that with SD_MMC lib all the data pins need to be pulled up with an external 10k to 3.3V. This applies especially to card's D3 which needs to be pulled up even when using 1-bit line connection and the D3 is not used.
154+
155+
If you want to try the software approach before soldering, try manually specifying SPI pins, like this:
156+
157+
.. code-block:: c++
158+
159+
int SD_CS_PIN = 19;
160+
SPI.begin(18, 36, 26, SD_CS_PIN);
161+
SPI.setDataMode(SPI_MODE0);
162+
SD.begin(SD_CS_PIN);
163+
164+
165+
ESP32-S3 is rebooting even with a bare minimum sketch
166+
*****************************************************
167+
Some ESP32-S3 boards are equipped with Quad SPI (QSPI) or Octal SPI (OPI) PSRAM. If you upload such a board with default settings for ESP32-S3, it will result in rebooting with a message similar to this:
168+
169+
https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/flash_psram_config.html
170+
171+
.. code-block:: bash
172+
173+
E (124) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0
174+
Rebooting...
175+
⸮⸮⸮ESP-ROM:esp32s3-20210327
176+
Build:Mar 27 2021
177+
rst:0xc (RTC_SW_CPU_RST),boot:0x18 (SPI_FAST_FLASH_BOOT)
178+
Saved PC:0x40376af0
179+
SPIWP:0xee
180+
Octal Flash Mode Enabled
181+
For OPI Flash, Use Default Flash Boot Mode
182+
mode:SLOW_RD, clock div:1
183+
load:0x3fce3808,len:0x44c
184+
load:0x403c9700,len:0xbec
185+
load:0x403cc700,len:0x2920
186+
entry 0x403c98d8
187+
188+
assert failed: do_core_init startup.c:326 (flash_ret == ESP_OK)
189+
190+
191+
To fix the issue, you will need to find out the precise module you are using and set **PSRAM** in the Arduino IDE Tools according to the following table.
192+
193+
How to determine the module version:
194+
------------------------------------
195+
196+
* First determine if you have a `WROOM-1 <https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf>`_ or `WROOM-2 <https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-2_datasheet_en.pdf>`_ module - this is written on the module shielding almost at the top, right under the ESP logo and company name (Espresif) right after the ESP32-S3 - for example ESP32-S3-WROOM-2.
197+
* Then locate the version code on left bottom corner on the module shielding. The markings are very small and it might be really difficult to read with naked eyes - try using a camera with careful lighting.
198+
199+
With this knowledge find your module in the table and note what is written in the **PSRAM** column.
200+
201+
- If the results is empty (-) you don't need to change anything
202+
- For QSPI go to Tools > PSRAM > QSPI PSRAM
203+
- For OPI go to Tools > PSRAM > OPI PSRAM
204+
205+
Note that WROOM-2 has always OPI.
206+
207+
+---------+--------+------------+-------+
208+
| Module | Code | Flash Mode | PSRAM |
209+
+=========+========+============+=======+
210+
| WROOM-1 | N4 | QSPI | - |
211+
+---------+--------+------------+-------+
212+
| WROOM-1 | N8 | QSPI | - |
213+
+---------+--------+------------+-------+
214+
| WROOM-1 | N16 | QSPI | - |
215+
+---------+--------+------------+-------+
216+
| WROOM-1 | H4 | QSPI | - |
217+
+---------+--------+------------+-------+
218+
| WROOM-1 | N4R2 | QSPI | QSPI |
219+
+---------+--------+------------+-------+
220+
| WROOM-1 | N8R2 | QSPI | QSPI |
221+
+---------+--------+------------+-------+
222+
| WROOM-1 | N16R2 | QSPI | QSPI |
223+
+---------+--------+------------+-------+
224+
| WROOM-1 | N4R8 | QSPI | OPI |
225+
+---------+--------+------------+-------+
226+
| WROOM-1 | N8R8 | QSPI | OPI |
227+
+---------+--------+------------+-------+
228+
| WROOM-1 | N16R8 | QSPI | OPI |
229+
+---------+--------+------------+-------+
230+
| WROOM-2 | N16R8V | OPI | OPI |
231+
+---------+--------+------------+-------+
232+
| WROOM-2 | N16R8V | OPI | OPI |
233+
+---------+--------+------------+-------+
234+
| WROOM-2 | N32R8V | OPI | OPI |
235+
+---------+--------+------------+-------+
236+
237+
238+
Further Help
239+
------------
240+
241+
If you encounter any other issues or need further assistance, please consult the `ESP32 Arduino Core <https://github.com/espressif/arduino-esp32>`_ documentation or seek help from the `ESP32 community forums <https://esp32.com>`_.

Diff for: docs/source/tutorials/cdc_dfu_flash.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ESP32-S3 CDC and DFU
2323

2424
It's important that your board includes the USB connector attached to the embedded USB from the SoC. If your board doesn't have the USB connector, you can attach an external one to the USB pins.
2525

26-
These instructions it will only work on the supported devices with the embedded USB peripheral. This tutorial will not work if you are using an external USB-to-serial converter like FTDI, CP2102, CH340, etc.
26+
These instructions will only work on the supported devices with the embedded USB peripheral. This tutorial will not work if you are using an external USB-to-serial converter like FTDI, CP210x, CH340, etc.
2727

2828
For a complete reference to the Arduino IDE tools menu, please see the `Tools Menus <../guides/tools_menu.html>`_ reference guide.
2929

Diff for: docs/source/tutorials/io_mux.rst

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ To use this functionality, we must be aware of some precautions:
3535
* Some of the GPIOs are **INPUT** only.
3636
* Some peripherals have output signals and must be used on GPIO's capable to be configured as **OUTPUT**.
3737
* Some peripherals, mostly the high speed ones, ADC, DAC, Touch, and JTAG use dedicated GPIOs pins.
38+
* Some pins are used to connect flash memory on the module - this prevents them from any other use - if a peripheral is routed to one of these pins the device will not be able to boot.
3839

3940
.. warning::
4041
Before assigning the peripheral pins in your design, double check if the pins you're using are appropriate.

Diff for: docs/source/tutorials/partition_table.rst

+15-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,21 @@ Here is an example you can use for a custom partition table:
131131
132132
This partition will use about 12MB of the 16MB flash. The offset will be automatically calculated after the first application partition and the units are in K and M.
133133

134-
A alternative is to create the new partition table as a new file in the `tools/partitions <https://github.com/espressif/arduino-esp32/tree/master/tools/partitions>`_ folder and edit the `boards.txt <https://github.com/espressif/arduino-esp32/tree/master/boards.txt>`_ file to add your custom partition table.
134+
An alternative is to create the new partition table as a new file in the `tools/partitions <https://github.com/espressif/arduino-esp32/tree/master/tools/partitions>`_ folder and edit the `boards.txt <https://github.com/espressif/arduino-esp32/tree/master/boards.txt>`_ file to add your custom partition table.
135+
136+
Another alternative is to create the new partition table as a new file, and place it in the `variants <https://github.com/espressif/arduino-esp32/tree/master/variants>`_ folder under your boards folder, and edit the `boards.txt <https://github.com/espressif/arduino-esp32/tree/master/boards.txt>`_ file to add your custom partition table, noting that in order for the compiler to find your custom partition table file you must use the '.build.custom_partitions=' option in the boards.txt file, rather than the standard '.build.partitions=' option. The '.build.variant=' option has the name of the folder holding your custom partition table in the variants folder.
137+
138+
An example of the PartitionScheme listing using the ESP32S3 Dev Module as a reference, would be to have the following:
139+
140+
**Custom Partition - CSV file in /variants/custom_esp32s3/ folder**
141+
142+
.. code-block::
143+
144+
esp32s3.build.variant=custom_esp32s3
145+
--
146+
esp32s3.menu.PartitionScheme.huge_app=Custom Huge APP (3MB No OTA/1MB SPIFFS)
147+
esp32s3.menu.PartitionScheme.huge_app.build.custom_partitions=custom_huge_app
148+
esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
135149
136150
Examples
137151
--------

Diff for: libraries/HTTPUpdateServer/examples/WebUpdater/WebUpdater.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ void setup(void) {
3333
Serial.println("WiFi failed, retrying.");
3434
}
3535

36-
MDNS.begin(host);
37-
if (MDNS.begin("esp32")) {
36+
if (MDNS.begin(host)) {
3837
Serial.println("mDNS responder started");
3938
}
4039

0 commit comments

Comments
 (0)