Skip to content

Commit e1673e4

Browse files
committed
fix(build): IDF release/v5.3 466a392a and initial changes
1 parent def319a commit e1673e4

File tree

27 files changed

+368
-542
lines changed

27 files changed

+368
-542
lines changed

Diff for: .github/scripts/on-release.sh

+3-17
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,8 @@ find "$PKG_DIR" -name '*.git*' -type f -delete
219219
##
220220
RVTC_NAME="riscv32-esp-elf-gcc"
221221
RVTC_NEW_NAME="esp-rv32"
222-
X32TC_NAME="xtensa-esp32-elf-gcc"
222+
X32TC_NAME="xtensa-esp-elf-gcc"
223223
X32TC_NEW_NAME="esp-x32"
224-
XS2TC_NAME="xtensa-esp32s2-elf-gcc"
225-
XS2TC_NEW_NAME="esp-xs2"
226-
XS3TC_NAME="xtensa-esp32s3-elf-gcc"
227-
XS3TC_NEW_NAME="esp-xs3"
228224

229225
# Replace tools locations in platform.txt
230226
echo "Generating platform.txt..."
@@ -233,9 +229,7 @@ sed "s/version=.*/version=$RELEASE_TAG/g" | \
233229
sed 's/tools\.esp32-arduino-libs\.path\.windows=.*//g' | \
234230
sed 's/{runtime\.platform\.path}.tools.esp32-arduino-libs/\{runtime.tools.esp32-arduino-libs.path\}/g' | \
235231
sed 's/{runtime\.platform\.path}.tools.xtensa-esp-elf-gdb/\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \
236-
sed "s/{runtime\.platform\.path}.tools.xtensa-esp32-elf/\\{runtime.tools.$X32TC_NEW_NAME.path\\}/g" | \
237-
sed "s/{runtime\.platform\.path}.tools.xtensa-esp32s2-elf/\\{runtime.tools.$XS2TC_NEW_NAME.path\\}/g" | \
238-
sed "s/{runtime\.platform\.path}.tools.xtensa-esp32s3-elf/\\{runtime.tools.$XS3TC_NEW_NAME.path\\}/g" | \
232+
sed "s/{runtime\.platform\.path}.tools.xtensa-esp-elf/\\{runtime.tools.$X32TC_NEW_NAME.path\\}/g" | \
239233
sed 's/{runtime\.platform\.path}.tools.riscv32-esp-elf-gdb/\{runtime.tools.riscv32-esp-elf-gdb.path\}/g' | \
240234
sed "s/{runtime\.platform\.path}.tools.riscv32-esp-elf/\\{runtime.tools.$RVTC_NEW_NAME.path\\}/g" | \
241235
sed 's/{runtime\.platform\.path}.tools.esptool/\{runtime.tools.esptool_py.path\}/g' | \
@@ -355,15 +349,7 @@ rvtc_jq_arg="\
355349
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$X32TC_NAME\")).version = \"$RVTC_VERSION\" |\
356350
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$X32TC_NAME\")).name = \"$X32TC_NEW_NAME\" |\
357351
(.packages[0].tools[] | select(.name==\"$X32TC_NAME\")).version = \"$RVTC_VERSION\" |\
358-
(.packages[0].tools[] | select(.name==\"$X32TC_NAME\")).name = \"$X32TC_NEW_NAME\" |\
359-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS2TC_NAME\")).version = \"$RVTC_VERSION\" |\
360-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS2TC_NAME\")).name = \"$XS2TC_NEW_NAME\" |\
361-
(.packages[0].tools[] | select(.name==\"$XS2TC_NAME\")).version = \"$RVTC_VERSION\" |\
362-
(.packages[0].tools[] | select(.name==\"$XS2TC_NAME\")).name = \"$XS2TC_NEW_NAME\" |\
363-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS3TC_NAME\")).version = \"$RVTC_VERSION\" |\
364-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS3TC_NAME\")).name = \"$XS3TC_NEW_NAME\" |\
365-
(.packages[0].tools[] | select(.name==\"$XS3TC_NAME\")).version = \"$RVTC_VERSION\" |\
366-
(.packages[0].tools[] | select(.name==\"$XS3TC_NAME\")).name = \"$XS3TC_NEW_NAME\""
352+
(.packages[0].tools[] | select(.name==\"$X32TC_NAME\")).name = \"$X32TC_NEW_NAME\""
367353
cat "$PACKAGE_JSON_TEMPLATE" | jq "$rvtc_jq_arg" > "$OUTPUT_DIR/package-$LIBS_PROJ_NAME-rvfix.json"
368354
PACKAGE_JSON_TEMPLATE="$OUTPUT_DIR/package-$LIBS_PROJ_NAME-rvfix.json"
369355

Diff for: .github/workflows/push.yml

+22-21
Original file line numberDiff line numberDiff line change
@@ -194,28 +194,29 @@ jobs:
194194
- name: Build Sketches
195195
run: bash ./.github/scripts/on-push.sh
196196

197-
# PlatformIO on Windows, Ubuntu and Mac
198-
build-platformio:
199-
name: PlatformIO on ${{ matrix.os }}
200-
needs: gen-chunks
201-
if: |
202-
needs.gen-chunks.outputs.build_all == 'true' ||
203-
needs.gen-chunks.outputs.build_static_sketches == 'true' ||
204-
needs.gen-chunks.outputs.build_platformio == 'true'
205-
runs-on: ${{ matrix.os }}
206-
strategy:
207-
fail-fast: false
208-
matrix:
209-
os: [ubuntu-latest, windows-latest, macOS-latest]
197+
# # PlatformIO on Windows, Ubuntu and Mac
198+
# build-platformio:
199+
# name: PlatformIO on ${{ matrix.os }}
200+
# needs: gen-chunks
201+
# if: |
202+
# needs.gen-chunks.outputs.build_all == 'true' ||
203+
# needs.gen-chunks.outputs.build_static_sketches == 'true' ||
204+
# needs.gen-chunks.outputs.build_platformio == 'true'
205+
# runs-on: ${{ matrix.os }}
206+
# strategy:
207+
# fail-fast: false
208+
# matrix:
209+
# os: [ubuntu-latest, windows-latest, macOS-latest]
210210

211-
steps:
212-
- uses: actions/checkout@v4
213-
- uses: actions/setup-python@v5
214-
with:
215-
python-version: '3.x'
216-
- name: Build Sketches
217-
run: bash ./.github/scripts/on-push.sh 1 1 #equal and non-zero to trigger PIO
211+
# steps:
212+
# - uses: actions/checkout@v4
213+
# - uses: actions/setup-python@v5
214+
# with:
215+
# python-version: '3.x'
216+
# - name: Build Sketches
217+
# run: bash ./.github/scripts/on-push.sh 1 1 #equal and non-zero to trigger PIO
218218

219+
# ESP-IDF component build
219220
build-esp-idf-component:
220221
name: Build with ESP-IDF ${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
221222
needs: gen-chunks
@@ -231,7 +232,7 @@ jobs:
231232
# See https://hub.docker.com/r/espressif/idf/tags and
232233
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html
233234
# for details.
234-
idf_ver: ["release-v5.1"]
235+
idf_ver: ["release-v5.3"]
235236
idf_target: ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c6", "esp32h2"]
236237
container: espressif/idf:${{ matrix.idf_ver }}
237238
steps:

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
tools/esp32-arduino-libs
2+
tools/xtensa-esp-elf
23
tools/xtensa-esp32-elf
34
tools/xtensa-esp32s2-elf
45
tools/xtensa-esp32s3-elf

Diff for: CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# export ARDUINO_SKIP_IDF_VERSION_CHECK=1
66
# idf.py build
77

8-
set(min_supported_idf_version "5.1.0")
9-
set(max_supported_idf_version "5.1.99")
8+
set(min_supported_idf_version "5.3.0")
9+
set(max_supported_idf_version "5.3.99")
1010
set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH}")
1111

1212
if ("${idf_version}" AND NOT "$ENV{ARDUINO_SKIP_IDF_VERSION_CHECK}")
@@ -293,7 +293,7 @@ endforeach()
293293
set(includedirs variants/${CONFIG_ARDUINO_VARIANT}/ cores/esp32/ ${ARDUINO_LIBRARIES_INCLUDEDIRS})
294294
set(srcs ${CORE_SRCS} ${ARDUINO_LIBRARIES_SRCS})
295295
set(priv_includes cores/esp32/libb64)
296-
set(requires spi_flash esp_partition mbedtls wpa_supplicant esp_adc esp_eth http_parser espressif__network_provisioning)
296+
set(requires spi_flash esp_partition mbedtls wpa_supplicant esp_adc esp_eth http_parser esp_ringbuf esp_driver_gptimer esp_driver_usb_serial_jtag driver espressif__network_provisioning)
297297
set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support bt esp_hid usb esp_psram ${ARDUINO_LIBRARIES_REQUIRES})
298298

299299
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_OpenThread)

Diff for: cores/esp32/Client.h

+2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
class Client : public Stream {
2727
public:
2828
virtual int connect(IPAddress ip, uint16_t port) = 0;
29+
virtual int connect(IPAddress ip, uint16_t port, int32_t timeout) = 0;
2930
virtual int connect(const char *host, uint16_t port) = 0;
31+
virtual int connect(const char *host, uint16_t port, int32_t timeout) = 0;
3032
virtual size_t write(uint8_t) = 0;
3133
virtual size_t write(const uint8_t *buf, size_t size) = 0;
3234
virtual int available() = 0;

Diff for: cores/esp32/HWCDC.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,14 @@ bool HWCDC::deinit(void *busptr) {
286286
running = true;
287287
// Setting USB D+ D- pins
288288
bool retCode = true;
289-
retCode &= perimanClearPinBus(USB_DM_GPIO_NUM);
290-
retCode &= perimanClearPinBus(USB_DP_GPIO_NUM);
289+
retCode &= perimanClearPinBus(USB_INT_PHY0_DM_GPIO_NUM);
290+
retCode &= perimanClearPinBus(USB_INT_PHY0_DP_GPIO_NUM);
291291
if (retCode) {
292292
// Force the host to re-enumerate (BUS_RESET)
293-
pinMode(USB_DM_GPIO_NUM, OUTPUT_OPEN_DRAIN);
294-
pinMode(USB_DP_GPIO_NUM, OUTPUT_OPEN_DRAIN);
295-
digitalWrite(USB_DM_GPIO_NUM, LOW);
296-
digitalWrite(USB_DP_GPIO_NUM, LOW);
293+
pinMode(USB_INT_PHY0_DM_GPIO_NUM, OUTPUT_OPEN_DRAIN);
294+
pinMode(USB_INT_PHY0_DP_GPIO_NUM, OUTPUT_OPEN_DRAIN);
295+
digitalWrite(USB_INT_PHY0_DM_GPIO_NUM, LOW);
296+
digitalWrite(USB_INT_PHY0_DP_GPIO_NUM, LOW);
297297
}
298298
// release the flag
299299
running = false;
@@ -323,11 +323,11 @@ void HWCDC::begin(unsigned long baud) {
323323
// delay(10); // USB Host has to enumerate it again
324324

325325
// Peripheral Manager setting for USB D+ D- pins
326-
uint8_t pin = USB_DM_GPIO_NUM;
326+
uint8_t pin = USB_INT_PHY0_DM_GPIO_NUM;
327327
if (!perimanSetPinBus(pin, ESP32_BUS_TYPE_USB_DM, (void *)this, -1, -1)) {
328328
goto err;
329329
}
330-
pin = USB_DP_GPIO_NUM;
330+
pin = USB_INT_PHY0_DP_GPIO_NUM;
331331
if (!perimanSetPinBus(pin, ESP32_BUS_TYPE_USB_DP, (void *)this, -1, -1)) {
332332
goto err;
333333
}

Diff for: cores/esp32/HardwareSerial.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@
2626
void serialEvent(void) __attribute__((weak));
2727
void serialEvent(void) {}
2828

29-
#if SOC_UART_NUM > 1
29+
#if SOC_UART_HP_NUM > 1
3030
void serialEvent1(void) __attribute__((weak));
3131
void serialEvent1(void) {}
32-
#endif /* SOC_UART_NUM > 1 */
32+
#endif /* SOC_UART_HP_NUM > 1 */
3333

34-
#if SOC_UART_NUM > 2
34+
#if SOC_UART_HP_NUM > 2
3535
void serialEvent2(void) __attribute__((weak));
3636
void serialEvent2(void) {}
37-
#endif /* SOC_UART_NUM > 2 */
37+
#endif /* SOC_UART_HP_NUM > 2 */
3838

3939
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
4040
// There is always Seria0 for UART0
4141
HardwareSerial Serial0(0);
42-
#if SOC_UART_NUM > 1
42+
#if SOC_UART_HP_NUM > 1
4343
HardwareSerial Serial1(1);
4444
#endif
45-
#if SOC_UART_NUM > 2
45+
#if SOC_UART_HP_NUM > 2
4646
HardwareSerial Serial2(2);
4747
#endif
4848

@@ -72,12 +72,12 @@ void serialEventRun(void) {
7272
if (Serial0.available()) {
7373
serialEvent();
7474
}
75-
#if SOC_UART_NUM > 1
75+
#if SOC_UART_HP_NUM > 1
7676
if (Serial1.available()) {
7777
serialEvent1();
7878
}
7979
#endif
80-
#if SOC_UART_NUM > 2
80+
#if SOC_UART_HP_NUM > 2
8181
if (Serial2.available()) {
8282
serialEvent2();
8383
}
@@ -279,8 +279,8 @@ void HardwareSerial::_uartEventTask(void *args) {
279279
}
280280

281281
void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, int8_t txPin, bool invert, unsigned long timeout_ms, uint8_t rxfifo_full_thrhd) {
282-
if (_uart_nr >= SOC_UART_NUM) {
283-
log_e("Serial number is invalid, please use a number from 0 to %u", SOC_UART_NUM - 1);
282+
if (_uart_nr >= SOC_UART_HP_NUM) {
283+
log_e("Serial number is invalid, please use a number from 0 to %u", SOC_UART_HP_NUM - 1);
284284
return;
285285
}
286286

@@ -305,7 +305,7 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
305305
txPin = _txPin < 0 ? (int8_t)SOC_TX0 : _txPin;
306306
}
307307
break;
308-
#if SOC_UART_NUM > 1 // may save some flash bytes...
308+
#if SOC_UART_HP_NUM > 1 // may save some flash bytes...
309309
case UART_NUM_1:
310310
if (rxPin < 0 && txPin < 0) {
311311
// do not change RX1/TX1 if it has already been set before
@@ -314,7 +314,7 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
314314
}
315315
break;
316316
#endif
317-
#if SOC_UART_NUM > 2 // may save some flash bytes...
317+
#if SOC_UART_HP_NUM > 2 // may save some flash bytes...
318318
case UART_NUM_2:
319319
if (rxPin < 0 && txPin < 0) {
320320
// do not change RX2/TX2 if it has already been set before

Diff for: cores/esp32/HardwareSerial.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ typedef enum {
146146

147147
// Default pins for UART1 are arbitrary, and defined here for convenience.
148148

149-
#if SOC_UART_NUM > 1
149+
#if SOC_UART_HP_NUM > 1
150150
#ifndef RX1
151151
#if CONFIG_IDF_TARGET_ESP32
152152
#define RX1 (gpio_num_t)26
@@ -182,11 +182,11 @@ typedef enum {
182182
#define TX1 (gpio_num_t)1
183183
#endif
184184
#endif
185-
#endif /* SOC_UART_NUM > 1 */
185+
#endif /* SOC_UART_HP_NUM > 1 */
186186

187187
// Default pins for UART2 are arbitrary, and defined here for convenience.
188188

189-
#if SOC_UART_NUM > 2
189+
#if SOC_UART_HP_NUM > 2
190190
#ifndef RX2
191191
#if CONFIG_IDF_TARGET_ESP32
192192
#define RX2 (gpio_num_t)4
@@ -202,7 +202,7 @@ typedef enum {
202202
#define TX2 (gpio_num_t)20
203203
#endif
204204
#endif
205-
#endif /* SOC_UART_NUM > 2 */
205+
#endif /* SOC_UART_HP_NUM > 2 */
206206

207207
typedef std::function<void(void)> OnReceiveCb;
208208
typedef std::function<void(hardwareSerial_error_t)> OnReceiveErrorCb;
@@ -357,10 +357,10 @@ extern void serialEventRun(void) __attribute__((weak));
357357
#endif // ARDUINO_USB_CDC_ON_BOOT
358358
// There is always Seria0 for UART0
359359
extern HardwareSerial Serial0;
360-
#if SOC_UART_NUM > 1
360+
#if SOC_UART_HP_NUM > 1
361361
extern HardwareSerial Serial1;
362362
#endif
363-
#if SOC_UART_NUM > 2
363+
#if SOC_UART_HP_NUM > 2
364364
extern HardwareSerial Serial2;
365365
#endif
366366
#endif //!defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)

0 commit comments

Comments
 (0)