Skip to content

Commit d9c08c7

Browse files
committed
docs(flags): Add build system breaking changes to migration guide
1 parent cf44890 commit d9c08c7

File tree

1 file changed

+44
-29
lines changed

1 file changed

+44
-29
lines changed

docs/en/migration_guides/2.x_to_3.0.rst

+44-29
Original file line numberDiff line numberDiff line change
@@ -5,62 +5,77 @@ Migration from 2.x to 3.0
55
Introduction
66
------------
77

8-
This is a guide to highlight **breaking changes** in the API and to help the migration of projects from versions 2.X (based on ESP-IDF 4.4) to version 3.0 (based on ESP-IDF 5.1) of the Arduino ESP32 core.
8+
This is a guide to highlight **breaking changes** in the API and build system to help the migration of projects from versions 2.X (based on ESP-IDF 4.4) to version 3.0 (based on ESP-IDF 5.1) of the Arduino ESP32 core.
99

1010
All the examples on the version 3.0.0 were updated to be compatible to the new API. The old examples from the versions below 3.0.0 will be not compatible with the version 3.0.0 or newer releases.
1111

1212
For more information about all changes and new features, check project `RELEASE NOTES <https://github.com/espressif/arduino-esp32/releases>`_.
1313

14+
Build System
15+
------------
16+
17+
Compilation Flags
18+
*****************
19+
20+
Functional changes
21+
^^^^^^^^^^^^^^^^^^
22+
23+
* If your project uses extra flags in the compilation process, it will now overwrite `some required default flags <https://github.com/espressif/arduino-esp32/blob/e5330d1797accfc8334e645372595d1bfda07ba2/platform.txt#L66-L67>`_.
24+
To ensure your project compiles correctly, make sure to have the ``-MMD -c`` flags in your C and C++ extra flags.
25+
26+
APIs
27+
----
28+
1429
ADC
15-
---
30+
***
1631

1732
Removed APIs
18-
************
33+
^^^^^^^^^^^^
1934

2035
* ``analogSetClockDiv``
2136
* ``adcAttachPin``
2237
* ``analogSetVRefPin``
2338

2439
BLE
25-
---
40+
***
2641

2742
Changes in APIs
28-
***************
43+
^^^^^^^^^^^^^^^
2944

3045
* Changed APIs return and parameter type from ``std::string`` to Arduino style ``String``.
3146
* Changed UUID data type from ``uint16_t`` to ``BLEUUID`` class.
3247
* ``BLEScan::start`` and ``BLEScan::getResults`` methods return type changed from ``BLEScanResults`` to ``BLEScanResults*``.
3348

3449
Hall Sensor
35-
-----------
50+
***********
3651

3752
Hall sensor is no longer supported.
3853

3954
Removed APIs
40-
************
55+
^^^^^^^^^^^^
4156

4257
* ``hallRead``
4358

4459
I2S
45-
---
60+
***
4661

4762
The I2S driver has been completely redesigned and refactored to use the new ESP-IDF driver.
4863
For more information about the new API, check :doc:`/api/i2s`.
4964

5065
LEDC
51-
----
66+
****
5267

5368
The LEDC API has been changed in order to support the Peripheral Manager and make it easier to use, as LEDC channels are now automatically assigned to pins.
5469
For more information about the new API, check :doc:`/api/ledc`.
5570

5671
Removed APIs
57-
************
72+
^^^^^^^^^^^^
5873

5974
* ``ledcSetup``
6075
* ``ledcAttachPin``
6176

6277
New APIs
63-
********
78+
^^^^^^^^
6479

6580
* ``ledcAttach`` used to set up the LEDC pin (merged ``ledcSetup`` and ``ledcAttachPin`` functions).
6681
* ``ledcOutputInvert`` used to attach the interrupt to a timer using arguments.
@@ -69,18 +84,18 @@ New APIs
6984
* ``ledcFadeWithInterruptArg`` used to set up and start a fade on a given LEDC pin with an interrupt using arguments.
7085

7186
Changes in APIs
72-
***************
87+
^^^^^^^^^^^^^^^
7388

7489
* ``ledcDetachPin`` renamed to ``ledcDetach``.
7590
* In all functions, input parameter ``channel`` has been changed to ``pin``.
7691

7792
RMT
78-
---
93+
***
7994

8095
For more information about the new API, check :doc:`/api/rmt`.
8196

8297
Removed APIs
83-
************
98+
^^^^^^^^^^^^
8499

85100
* ``_rmtDumpStatus``
86101
* ``rmtSetTick``
@@ -90,7 +105,7 @@ Removed APIs
90105
* ``rmtReadData``
91106

92107
New APIs
93-
********
108+
^^^^^^^^
94109

95110
* ``rmtSetEOT``
96111
* ``rmtWriteAsync``
@@ -99,7 +114,7 @@ New APIs
99114

100115

101116
Changes in APIs
102-
***************
117+
^^^^^^^^^^^^^^^
103118

104119
* In all functions, input parameter ``rmt_obj_t* rmt`` has been changed to ``int pin``.
105120
* ``rmtInit`` return parameter changed to bool.
@@ -114,37 +129,37 @@ Changes in APIs
114129
* ``rmtSetCarrier`` input parameters ``uint32_t low, uint32_t high`` have been changed to ``uint32_t frequency_Hz, float duty_percent``.
115130

116131
SigmaDelta
117-
----------
132+
**********
118133

119134
SigmaDelta has been refactored to use the new ESP-IDF driver.
120135
For more information about the new API, check :doc:`/api/sigmadelta`.
121136

122137
Removed APIs
123-
************
138+
^^^^^^^^^^^^
124139

125140
* ``sigmaDeltaSetup``
126141
* ``sigmaDeltaRead``
127142

128143
New APIs
129-
********
144+
^^^^^^^^
130145

131146
* ``sigmaDeltaAttach`` used to set up the SigmaDelta pin (channel is acquired automatically).
132147
* ``timerGetFrequency`` used to get the actual frequency of the timer.
133148
* ``timerAttachInterruptArg`` used to attach the interrupt to a timer using arguments.
134149

135150
Changes in APIs
136-
***************
151+
^^^^^^^^^^^^^^^
137152

138153
* ``sigmaDeltaDetachPin`` renamed to ``sigmaDeltaDetach``.
139154
* ``sigmaDeltaWrite`` input parameter ``channel`` has been changed to ``pin``.
140155

141156
Timer
142-
-----
157+
*****
143158

144159
Timer has been refactored to use the new ESP-IDF driver and its API got simplified. For more information about the new API check :doc:`/api/timer`.
145160

146161
Removed APIs
147-
************
162+
^^^^^^^^^^^^
148163

149164
* ``timerGetConfig``
150165
* ``timerSetConfig``
@@ -164,30 +179,30 @@ Removed APIs
164179
* ``timerAttachInterruptFlag``
165180

166181
New APIs
167-
********
182+
^^^^^^^^
168183

169184
* ``timerAlarm`` used to set up Alarm for the timer and enable it automatically (merged ``timerAlarmWrite`` and ``timerAlarmEnable`` functions).
170185
* ``timerGetFrequency`` used to get the actual frequency of the timer.
171186
* ``timerAttachInterruptArg`` used to attach the interrupt to a timer using arguments.
172187

173188
Changes in APIs
174-
***************
189+
^^^^^^^^^^^^^^^
175190

176191
* ``timerBegin`` has now only 1 parameter (frequency). There is an automatic calculation of the divider using different clock sources
177192
to achieve the selected frequency.
178193
* ``timerAttachInterrupt`` has now only 2 parameters. The ``edge`` parameter has been removed.
179194

180195
UART (HardwareSerial)
181-
---------------------
196+
*********************
182197

183198
Changes in APIs
184-
***************
199+
^^^^^^^^^^^^^^^
185200

186201
* ``setHwFlowCtrlMode`` input parameter ``uint8_t mode`` has been changed to ``SerialHwFlowCtrl mode``.
187202
* ``setMode`` input parameter ``uint8_t mode`` has been changed to ``SerialMode mode``.
188203

189204
Functional changes
190-
******************
205+
^^^^^^^^^^^^^^^^^^
191206

192207
* Default pins for some SoCs have been changed to avoid conflicts with other peripherals:
193208
* ESP32's UART1 RX and TX pins are now GPIO26 and GPIO27, respectively;
@@ -203,10 +218,10 @@ Functional changes
203218
* If the application only uses RX or TX, ``begin(baud, -1, tx)`` or ``begin(baud, rx)`` will change only the assigned pin and keep the other unchanged.
204219

205220
WiFi
206-
----
221+
****
207222

208223
Functional changes
209-
******************
224+
^^^^^^^^^^^^^^^^^^
210225

211226
* In Arduino (and other frameworks) the method named ``flush()`` is intended to send out the transmit buffer content. ``WiFiClient`` and ``WiFiUDP`` method ``flush()`` won't clear the receive buffer anymore. A new method called ``clear()`` is now used for that. Currently ``flush()`` does nothing in ``WiFiClient``, ``WiFiClientSecure`` and ``WiFiUDP``.
212227
* ``WiFiServer`` has functions ``accept()`` and ``available()`` with the same functionality. In Arduino, ``available()`` should work differently so it is now deprecated.

0 commit comments

Comments
 (0)