Skip to content

Commit c248cec

Browse files
committed
Merge branch 'release/v5.3' of https://github.com/espressif/esp32-arduino-lib-builder into release/v5.3
2 parents aa2ae9f + 5309646 commit c248cec

24 files changed

+1404
-1475
lines changed

.github/workflows/cron.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
# │ │ │ │ │
1313
# * * * * *
1414
- cron: '0 */6 * * *'
15-
workflow_dispatch: # For testing
15+
workflow_dispatch: # For manually rebuilding the libraries
1616

1717
defaults:
1818
run:
@@ -21,6 +21,7 @@ defaults:
2121
jobs:
2222
build-libs:
2323
name: Build with IDF ${{ matrix.idf_branch }}
24+
if: github.repository_owner == 'espressif'
2425
uses: ./.github/workflows/cron_build.yml
2526
with:
2627
idf_branch: ${{ matrix.idf_branch }}
@@ -31,9 +32,15 @@ jobs:
3132
fail-fast: false
3233
matrix:
3334
include:
34-
- idf_branch: "release/v5.1"
35-
lib_builder_branch: "release/v5.1"
36-
targets: "esp32,esp32s2,esp32s3,esp32c3,esp32c6,esp32h2"
35+
# - idf_branch: "release/v5.1"
36+
# lib_builder_branch: "release/v5.1"
37+
# targets: "esp32,esp32s2,esp32s3,esp32c3,esp32c6,esp32h2"
3738
- idf_branch: "release/v5.3"
3839
lib_builder_branch: "release/v5.3"
3940
targets: "esp32,esp32s2,esp32s3,esp32c3,esp32c6,esp32h2,esp32p4"
41+
- idf_branch: "release/v5.4"
42+
lib_builder_branch: "release/v5.4"
43+
targets: "esp32,esp32s2,esp32s3,esp32c3,esp32c6,esp32h2,esp32p4"
44+
- idf_branch: "master"
45+
lib_builder_branch: "release/v5.5"
46+
targets: "esp32,esp32s2,esp32s3,esp32c3,esp32c6,esp32h2,esp32p4,esp32c5"

.github/workflows/cron_build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ jobs:
132132
compression-level: 0
133133

134134
- name: Push changes
135-
if: github.repository == 'espressif/esp32-arduino-lib-builder'
136135
env:
137136
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
138137
GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}

build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,14 @@ if [ "$BUILD_TYPE" = "all" ]; then
305305
if [ $? -ne 0 ]; then exit 1; fi
306306
fi
307307

308-
# Generate PlatformIO manifest file
308+
# Generate pioarduino manifest file
309309
if [ "$BUILD_TYPE" = "all" ]; then
310-
echo "* Generating PlatformIO manifest file..."
310+
echo "* Generating pioarduino manifest file..."
311311
pushd $IDF_PATH
312312
ibr=$(git describe --all 2>/dev/null)
313313
ic=$(git -C "$IDF_PATH" rev-parse --short HEAD)
314314
popd
315-
python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic"
315+
python3 ./tools/gen_pioarduino_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic"
316316
if [ $? -ne 0 ]; then exit 1; fi
317317
fi
318318

components/arduino_tinyusb/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ if(CONFIG_TINYUSB_ENABLED)
2727
# espressif:
2828
"${COMPONENT_DIR}/src/dcd_dwc2.c"
2929
# tusb:
30-
#"{COMPONENT_DIR}/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c"
30+
#"${COMPONENT_DIR}/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c"
31+
"${COMPONENT_DIR}/tinyusb/src/portable/synopsys/dwc2/dwc2_common.c"
3132
"${COMPONENT_DIR}/tinyusb/src/class/cdc/cdc_device.c"
3233
"${COMPONENT_DIR}/tinyusb/src/class/hid/hid_device.c"
3334
"${COMPONENT_DIR}/tinyusb/src/class/midi/midi_device.c"

components/arduino_tinyusb/Kconfig.projbuild

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ menu "Arduino TinyUSB"
4242
help
4343
CDC FIFO size of TX
4444

45+
config TINYUSB_CDC_MAX_PORTS
46+
int "Maximum enabled CDC ports"
47+
range 1 2
48+
default 1
49+
depends on TINYUSB_CDC_ENABLED
50+
help
51+
Maximum enabled CDC ports
52+
4553
endmenu
4654

4755
menu "Mass Storage (MSC) driver"

components/arduino_tinyusb/include/tusb_config.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ extern "C" {
115115
#define CFG_TUD_ENDOINT0_SIZE 64
116116

117117
// Enabled Drivers
118-
#define CFG_TUD_CDC CONFIG_TINYUSB_CDC_ENABLED
118+
#ifdef CONFIG_TINYUSB_CDC_MAX_PORTS
119+
#define CFG_TUD_CDC CONFIG_TINYUSB_CDC_MAX_PORTS
120+
#else
121+
#define CFG_TUD_CDC 0
122+
#endif
119123
#define CFG_TUD_MSC CONFIG_TINYUSB_MSC_ENABLED
120124
#define CFG_TUD_HID CONFIG_TINYUSB_HID_ENABLED
121125
#define CFG_TUD_MIDI CONFIG_TINYUSB_MIDI_ENABLED

components/arduino_tinyusb/patches/dcd_dwc2.patch

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/components/arduino_tinyusb/src/dcd_dwc2.c 2024-10-02 12:17:40.000000000 +0300
22
+++ b/components/arduino_tinyusb/src/dcd_dwc2.c 2024-10-02 12:19:48.000000000 +0300
3-
@@ -316,6 +316,16 @@
3+
@@ -243,6 +243,17 @@
44
//--------------------------------------------------------------------
55
// Endpoint
66
//--------------------------------------------------------------------
@@ -14,15 +14,16 @@
1414
+ return 0;
1515
+}
1616
+#endif
17-
18-
static void edpt_activate(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc) {
17+
+
18+
static void edpt_activate(uint8_t rhport, const tusb_desc_endpoint_t* p_endpoint_desc) {
1919
dwc2_regs_t* dwc2 = DWC2_REG(rhport);
20-
@@ -332,7 +342,19 @@
21-
(p_endpoint_desc->bmAttributes.xfer != TUSB_XFER_ISOCHRONOUS ? DOEPCTL_SD0PID_SEVNFRM : 0) |
22-
(xfer->max_size << DOEPCTL_MPSIZ_Pos);
20+
const uint8_t epnum = tu_edpt_number(p_endpoint_desc->bEndpointAddress);
21+
@@ -266,7 +277,18 @@
22+
depctl.bm.set_data0_iso_even = 1;
23+
}
2324
if (dir == TUSB_DIR_IN) {
24-
- epctl |= (epnum << DIEPCTL_TXFNUM_Pos);
25-
+ //epctl |= (epnum << DIEPCTL_TXFNUM_Pos);
25+
- depctl.bm.tx_fifo_num = epnum;
26+
+ //depctl.bm.tx_fifo_num = epnum;
2627
+ uint8_t fifo_num = epnum;
2728
+#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
2829
+ // Special Case for EP5, which is used by CDC but not actually called by the driver
@@ -32,13 +33,12 @@
3233
+ } else {
3334
+ fifo_num = get_free_fifo();
3435
+ }
35-
+ //TU_ASSERT(fifo_num != 0);
3636
+#endif
37-
+ epctl |= (fifo_num << DIEPCTL_TXFNUM_Pos);
37+
+ depctl.bm.tx_fifo_num = fifo_num;
3838
}
3939

40-
dwc2_dep_t* dep = &dwc2->ep[1 - dir][epnum];
41-
@@ -840,6 +862,10 @@
40+
dwc2_dep_t* dep = &dwc2->ep[dir == TUSB_DIR_IN ? 0 : 1][epnum];
41+
@@ -557,6 +579,10 @@
4242
}
4343
}
4444

@@ -49,19 +49,19 @@
4949
dfifo_flush_tx(dwc2, 0x10); // all tx fifo
5050
dfifo_flush_rx(dwc2);
5151

52-
@@ -1186,6 +1212,9 @@
53-
if (int_status & GINTSTS_USBRST) {
52+
@@ -997,6 +1023,9 @@
53+
if (gintsts & GINTSTS_USBRST) {
5454
// USBRST is start of reset.
5555
dwc2->gintsts = GINTSTS_USBRST;
5656
+#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
5757
+ _allocated_fifos = 1;
5858
+#endif
59-
bus_reset(rhport);
59+
handle_bus_reset(rhport);
6060
}
6161

62-
@@ -1217,7 +1246,11 @@
62+
@@ -1008,7 +1037,11 @@
6363

64-
if (int_status & GINTSTS_USBSUSP) {
64+
if (gintsts & GINTSTS_USBSUSP) {
6565
dwc2->gintsts = GINTSTS_USBSUSP;
6666
- dcd_event_bus_signal(rhport, DCD_EVENT_SUSPEND, true);
6767
+ //dcd_event_bus_signal(rhport, DCD_EVENT_SUSPEND, true);
@@ -71,8 +71,8 @@
7171
+#endif
7272
}
7373

74-
if (int_status & GINTSTS_WKUINT) {
75-
@@ -1234,6 +1267,9 @@
74+
if (gintsts & GINTSTS_WKUINT) {
75+
@@ -1025,6 +1058,9 @@
7676

7777
if (otg_int & GOTGINT_SEDET) {
7878
dcd_event_bus_signal(rhport, DCD_EVENT_UNPLUGGED, true);

0 commit comments

Comments
 (0)