Skip to content

Commit 418f489

Browse files
committed
Update IDF to v5.5.2
1 parent 3f81bb3 commit 418f489

File tree

156 files changed

+10448
-2380
lines changed

Some content is hidden

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

156 files changed

+10448
-2380
lines changed

builder/frameworks/espidf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,8 @@ def _get_installed_pip_packages(python_exe_path):
13201320
"cryptography": "~=44.0.0" if IDF5 else ">=2.1.4,<35.0.0",
13211321
"pyparsing": ">=3.1.0,<4" if IDF5 else ">=2.0.3,<2.4.0",
13221322
"idf-component-manager": "~=2.2" if IDF5 else "~=1.0",
1323-
"esp-idf-kconfig": "~=2.5.0"
1323+
"esp-idf-kconfig": "~=2.5.0",
1324+
"pydantic": "<2.12.0"
13241325
}
13251326

13261327
if not IDF5:

examples/espidf-peripherals-usb/components/esp_tinyusb/CHANGELOG.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,93 @@
1+
## 2.1.0
2+
3+
- Added configurable Suspend/Resume device event support using TinyUSB callbacks `tud_suspend_cb` and `tud_resume_cb`
4+
5+
## 2.0.1~1
6+
7+
- esp_tinyusb: Claim forward compatibility with TinyUSB 0.19
8+
- CDC: Added support for new VFS API (for esp-idf v5.4 and higher)
9+
10+
## 2.0.1
11+
12+
- esp_tinyusb: Added ESP32H4 support
13+
- esp_tinyusb: Fixed an assertion failure on the GetOtherSpeedDescriptor() request for ESP32P4 when the OTG1.1 port is used
14+
- MSC: Added dynamic member and storage operation multitask protection
15+
- MSC: Used `esp_vfs_fat_register_cfg` function prototype for esp-idf v5.3 and higher
16+
17+
## 2.0.0
18+
19+
- esp_tinyusb: Added USB Compliance Verification results
20+
- CDC-ACM: Added a configurable parameter for the endpoint DMA buffer
21+
22+
### Breaking changes
23+
24+
- esp_tinyusb: External PHY is no longer initialized automatically. If an external PHY is required, it must be explicitly initialized by the user with configuration parameter `phy.skip_setup = true`
25+
- esp_tinyusb: Added run-time configuration for peripheral port selection, task settings, and descriptors. For more details, refer to the [Espressif's Addition to TinyUSB Mirgation guide v2](../../docs/device/migration-guides/v2/tinyusb.md)
26+
- esp_tinyusb: Added USB Device event callback to handle different USB Device events. For the list of supported USB Device events, refer to to [Espressif's Addition to TinyUSB - README](../esp_tinyusb/README.md)
27+
- esp_tinyusb: Removed configuration option to handle TinyUSB events outside of this driver
28+
- NCM: Added possibility to deinit the driver
29+
- NCM: Updated public API; refer to the [NCM Class Migration guide v2](../../docs/device/migration-guides/v2/tinyusb_ncm.md)
30+
- MSC: Removed dedicated callbacks; introduced a single callback with an event ID for each storage
31+
- MSC: Added storage format support
32+
- MSC: Added dual storage support (SPI/Flash and SD/MMC)
33+
- MSC: Updated public API; refer to the [MSC Class Migration guide v2](../../docs/device/migration-guides/v2/tinyusb_msc.md)
34+
- Console: Updated public API; refer to the [Console Class Migration guide v2](../../docs/device/migration-guides/v2/tinyusb_console.md)
35+
- CDC-ACM: Updated public API; refer to the [CDC-ACM Class Migration guide v2](../../docs/device/migration-guides/v2/tinyusb_cdc_acm.md)
36+
37+
## 1.7.6~1
38+
39+
- esp_tinyusb: Added documentation to README.md
40+
41+
## 1.7.6
42+
43+
- MSC: Fixed the possibility to use SD/MMC storage with large capacity (more than 4 GB)
44+
45+
## 1.7.5
46+
47+
- esp_tinyusb: Provide forward compatibility with IDF 6.0
48+
49+
## 1.7.4~1
50+
51+
- esp_tinyusb: Claim forward compatibility with IDF 6.0
52+
53+
## 1.7.4
54+
55+
- MSC: WL Sector runtime check during spiflash init (fix for build time error check)
56+
57+
## 1.7.3 [yanked]
58+
59+
- MSC: Improved transfer speed to SD cards and SPI flash
60+
61+
## 1.7.2
62+
63+
- esp_tinyusb: Fixed crash on logging from ISR
64+
- PHY: Fixed crash with external_phy=true configuration
65+
66+
## 1.7.1
67+
68+
- NCM: Changed default NTB config to decrease DRAM memory usage (fix for DRAM overflow on ESP32S2)
69+
70+
## 1.7.0 [yanked]
71+
72+
- NCM: Added possibility to configure NCM Transfer Blocks (NTB) via menuconfig
73+
- esp_tinyusb: Added option to select TinyUSB peripheral on esp32p4 via menuconfig (USB_PHY_SUPPORTS_P4_OTG11 in esp-idf is required)
74+
- esp_tinyusb: Fixed uninstall tinyusb driver with not default task configuration
75+
76+
## 1.6.0
77+
78+
- CDC-ACM: Fixed memory leak on deinit
79+
- esp_tinyusb: Added Teardown
80+
81+
## 1.5.0
82+
83+
- esp_tinyusb: Added DMA mode option to tinyusb DCD DWC2 configuration
84+
- esp_tinyusb: Changed the default affinity mask of the task to CPU1
85+
86+
## 1.4.5
87+
88+
- CDC-ACM: Fixed memory leak at VFS unregister
89+
- Vendor specific: Provided default configuration
90+
191
## 1.4.4
292

393
- esp_tinyusb: Added HighSpeed and Qualifier device descriptors in tinyusb configuration

examples/espidf-peripherals-usb/components/esp_tinyusb/CMakeLists.txt

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,52 @@ set(srcs
22
"descriptors_control.c"
33
"tinyusb.c"
44
"usb_descriptors.c"
5+
"tinyusb_task.c"
56
)
67

7-
if(NOT CONFIG_TINYUSB_NO_DEFAULT_TASK)
8-
list(APPEND srcs "tusb_tasks.c")
9-
endif() # CONFIG_TINYUSB_NO_DEFAULT_TASK
8+
set(priv_req "")
9+
10+
if(${IDF_VERSION_MAJOR} LESS 6)
11+
list(APPEND priv_req "usb")
12+
endif()
1013

1114
if(CONFIG_TINYUSB_CDC_ENABLED)
1215
list(APPEND srcs
1316
"cdc.c"
14-
"tusb_cdc_acm.c"
17+
"tinyusb_cdc_acm.c"
1518
)
1619
if(CONFIG_VFS_SUPPORT_IO)
1720
list(APPEND srcs
18-
"tusb_console.c"
21+
"tinyusb_console.c"
1922
"vfs_tinyusb.c"
2023
)
2124
endif() # CONFIG_VFS_SUPPORT_IO
2225
endif() # CONFIG_TINYUSB_CDC_ENABLED
2326

2427
if(CONFIG_TINYUSB_MSC_ENABLED)
2528
list(APPEND srcs
26-
tusb_msc_storage.c
29+
"tinyusb_msc.c"
30+
"storage_spiflash.c"
2731
)
32+
if(CONFIG_SOC_SDMMC_HOST_SUPPORTED)
33+
list(APPEND srcs
34+
"storage_sdmmc.c"
35+
)
36+
endif() # CONFIG_SOC_SDMMC_HOST_SUPPORTED
2837
endif() # CONFIG_TINYUSB_MSC_ENABLED
2938

39+
3040
if(CONFIG_TINYUSB_NET_MODE_NCM)
3141
list(APPEND srcs
32-
tinyusb_net.c
42+
"tinyusb_net.c"
3343
)
3444
endif() # CONFIG_TINYUSB_NET_MODE_NCM
3545

3646
idf_component_register(SRCS ${srcs}
3747
INCLUDE_DIRS "include"
3848
PRIV_INCLUDE_DIRS "include_private"
39-
PRIV_REQUIRES usb
40-
REQUIRES fatfs vfs
49+
PRIV_REQUIRES ${priv_req}
50+
REQUIRES fatfs vfs
4151
)
4252

4353
# Determine whether tinyusb is fetched from component registry or from local path

examples/espidf-peripherals-usb/components/esp_tinyusb/Kconfig

Lines changed: 111 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -6,72 +6,57 @@ menu "TinyUSB Stack"
66
help
77
Specify verbosity of TinyUSB log output.
88

9-
choice TINYUSB_RHPORT
10-
depends on IDF_TARGET_ESP32P4
11-
prompt "TinyUSB PHY"
12-
default TINYUSB_RHPORT_HS
13-
help
14-
Allows set the USB PHY Controller for TinyUSB: HS (USB OTG2.0 PHY for HighSpeed)
9+
menu "TinyUSB DCD"
10+
choice TINYUSB_MODE
11+
prompt "DCD Mode"
12+
default TINYUSB_MODE_DMA
13+
help
14+
TinyUSB DCD DWC2 Driver supports two modes: Slave mode (based on IRQ) and Buffer DMA mode.
1515

16-
config TINYUSB_RHPORT_HS
17-
bool "HS"
18-
endchoice
16+
config TINYUSB_MODE_SLAVE
17+
bool "Slave/IRQ"
18+
config TINYUSB_MODE_DMA
19+
bool "Buffer DMA"
20+
endchoice
21+
endmenu # "TinyUSB DCD"
1922

20-
menu "TinyUSB task configuration"
21-
config TINYUSB_NO_DEFAULT_TASK
22-
bool "Do not create a TinyUSB task"
23+
menu "TinyUSB callbacks"
24+
config TINYUSB_SUSPEND_CALLBACK
25+
bool "Register suspend callback"
2326
default n
2427
help
25-
This option allows to not create the FreeRTOS task during the driver initialization.
26-
User will have to handle TinyUSB events manually.
28+
Register TinyUSB's suspend callback (tud_suspend_cb()) in esp_tinyusb.
2729

28-
config TINYUSB_TASK_PRIORITY
29-
int "TinyUSB task priority"
30-
default 5
31-
depends on !TINYUSB_NO_DEFAULT_TASK
32-
help
33-
Set the priority of the default TinyUSB main task.
30+
When enabled, esp_tinyusb provides a strong implementation of
31+
tud_suspend_cb() and dispatches TINYUSB_EVENT_SUSPENDED via the
32+
esp_tinyusb device event callback.
3433

35-
config TINYUSB_TASK_STACK_SIZE
36-
int "TinyUSB task stack size (bytes)"
37-
default 4096
38-
depends on !TINYUSB_NO_DEFAULT_TASK
39-
help
40-
Set the stack size of the default TinyUSB main task.
34+
When disabled, tinyusb provides weak implementation of the tud_suspend_cb(),
35+
and user can provide it's own strong implementation of the tud_suspend_cb().
36+
37+
NOTE: When this option is enabled, user applications MUST NOT
38+
define tud_suspend_cb() themselves. Defining tud_suspend_cb()
39+
in the application while this option is enabled will result in
40+
a linker error due to multiple definitions.
4141

42-
choice TINYUSB_TASK_AFFINITY
43-
prompt "TinyUSB task affinity"
44-
default TINYUSB_TASK_AFFINITY_NO_AFFINITY
45-
depends on !TINYUSB_NO_DEFAULT_TASK
42+
config TINYUSB_RESUME_CALLBACK
43+
bool "Register resume callback"
44+
default n
4645
help
47-
Allows setting TinyUSB tasks affinity, i.e. whether the task is pinned to
48-
CPU0, pinned to CPU1, or allowed to run on any CPU.
46+
Register TinyUSB's resume callback (tud_resume_cb()) in esp_tinyusb.
4947

50-
config TINYUSB_TASK_AFFINITY_NO_AFFINITY
51-
bool "No affinity"
52-
config TINYUSB_TASK_AFFINITY_CPU0
53-
bool "CPU0"
54-
config TINYUSB_TASK_AFFINITY_CPU1
55-
bool "CPU1"
56-
depends on !FREERTOS_UNICORE
57-
endchoice
48+
When enabled, esp_tinyusb provides a strong implementation of
49+
tud_resume_cb() and dispatches TINYUSB_EVENT_RESUMED via the
50+
esp_tinyusb device event callback.
5851

59-
config TINYUSB_TASK_AFFINITY
60-
hex
61-
default FREERTOS_NO_AFFINITY if TINYUSB_TASK_AFFINITY_NO_AFFINITY
62-
default 0x0 if TINYUSB_TASK_AFFINITY_CPU0
63-
default 0x1 if TINYUSB_TASK_AFFINITY_CPU1
52+
When disabled, tinyusb provides weak implementation of the tud_resume_cb(),
53+
and user can provide it's own strong implementation of the tud_resume_cb().
6454

65-
config TINYUSB_INIT_IN_DEFAULT_TASK
66-
bool "Initialize TinyUSB stack within the default TinyUSB task"
67-
default n
68-
depends on !TINYUSB_NO_DEFAULT_TASK
69-
help
70-
Run TinyUSB stack initialization just after starting the default TinyUSB task.
71-
This is especially useful in multicore scenarios, when we need to pin the task
72-
to a specific core and, at the same time initialize TinyUSB stack
73-
(i.e. install interrupts) on the same core.
74-
endmenu
55+
NOTE: When this option is enabled, user applications MUST NOT
56+
define tud_resume_cb() themselves. Defining tud_resume_cb()
57+
in the application while this option is enabled will result in
58+
a linker error due to multiple definitions.
59+
endmenu # "TinyUSB callbacks"
7560

7661
menu "Descriptor configuration"
7762
comment "You can provide your custom descriptors via tinyusb_driver_install()"
@@ -141,7 +126,7 @@ menu "TinyUSB Stack"
141126
Name of the MSC device.
142127
endmenu # "Descriptor configuration"
143128

144-
menu "Massive Storage Class (MSC)"
129+
menu "Mass Storage Class (MSC)"
145130
config TINYUSB_MSC_ENABLED
146131
bool "Enable TinyUSB MSC feature"
147132
default n
@@ -151,8 +136,10 @@ menu "TinyUSB Stack"
151136
config TINYUSB_MSC_BUFSIZE
152137
depends on TINYUSB_MSC_ENABLED
153138
int "MSC FIFO size"
154-
default 512
155-
range 64 10000
139+
default 512 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32H4
140+
default 8192 if IDF_TARGET_ESP32P4
141+
range 64 8192 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32H4
142+
range 64 32768 if IDF_TARGET_ESP32P4
156143
help
157144
MSC FIFO size, in bytes.
158145

@@ -162,7 +149,7 @@ menu "TinyUSB Stack"
162149
default "/data"
163150
help
164151
MSC Mount Path of storage.
165-
endmenu # "Massive Storage Class"
152+
endmenu # "Mass Storage Class"
166153

167154
menu "Communication Device Class (CDC)"
168155
config TINYUSB_CDC_ENABLED
@@ -185,14 +172,23 @@ menu "TinyUSB Stack"
185172
default 512
186173
range 64 10000
187174
help
188-
CDC FIFO size of RX channel.
175+
This buffer size defines maximum data length in bytes that you can receive at once.
176+
Must be greater or equal to TINYUSB_CDC_EP_BUFSIZE for correct receiving.
189177

190178
config TINYUSB_CDC_TX_BUFSIZE
191179
depends on TINYUSB_CDC_ENABLED
192180
int "CDC FIFO size of TX channel"
193181
default 512
194182
help
195-
CDC FIFO size of TX channel.
183+
This buffer size defines maximum data length in bytes that you can transmit at once.
184+
185+
config TINYUSB_CDC_EP_BUFSIZE
186+
depends on TINYUSB_CDC_ENABLED
187+
int "CDC Endpoint buffer size"
188+
default 512
189+
help
190+
This low layer buffer has the most significant impact on performance. Set to 8192 for best performance.
191+
Sizes above 8192 bytes bring only little performance improvement.
196192
endmenu # "Communication Device Class"
197193

198194
menu "Musical Instrument Digital Interface (MIDI)"
@@ -268,5 +264,59 @@ menu "TinyUSB Stack"
268264
config TINYUSB_NET_MODE_NONE
269265
bool "None"
270266
endchoice
267+
268+
config TINYUSB_NCM_OUT_NTB_BUFFS_COUNT
269+
int "Number of NCM NTB buffers for reception side"
270+
depends on TINYUSB_NET_MODE_NCM
271+
default 3
272+
range 1 6
273+
help
274+
Number of NTB buffers for reception side.
275+
Can be increased to improve performance and stability with the cost of additional RAM requirements.
276+
Helps to mitigate "tud_network_can_xmit: request blocked" warning message when running NCM device.
277+
278+
config TINYUSB_NCM_IN_NTB_BUFFS_COUNT
279+
int "Number of NCM NTB buffers for transmission side"
280+
depends on TINYUSB_NET_MODE_NCM
281+
default 3
282+
range 1 6
283+
help
284+
Number of NTB buffers for transmission side.
285+
Can be increased to improve performance and stability with the cost of additional RAM requirements.
286+
Helps to mitigate "tud_network_can_xmit: request blocked" warning message when running NCM device.
287+
288+
config TINYUSB_NCM_OUT_NTB_BUFF_MAX_SIZE
289+
int "NCM NTB Buffer size for reception size"
290+
depends on TINYUSB_NET_MODE_NCM
291+
default 3200
292+
range 1600 10240
293+
help
294+
Size of NTB buffers on the reception side. The minimum size used by Linux is 2048 bytes.
295+
NTB buffer size must be significantly larger than the MTU (Maximum Transmission Unit).
296+
The typical default MTU size for Ethernet is 1500 bytes, plus an additional packet overhead.
297+
To improve performance, the NTB buffer size should be large enough to fit multiple MTU-sized
298+
frames in a single NTB buffer and it's length should be multiple of 4.
299+
300+
config TINYUSB_NCM_IN_NTB_BUFF_MAX_SIZE
301+
int "NCM NTB Buffer size for transmission size"
302+
depends on TINYUSB_NET_MODE_NCM
303+
default 3200
304+
range 1600 10240
305+
help
306+
Size of NTB buffers on the transmission side. The minimum size used by Linux is 2048 bytes.
307+
NTB buffer size must be significantly larger than the MTU (Maximum Transmission Unit).
308+
The typical default MTU size for Ethernet is 1500 bytes, plus an additional packet overhead.
309+
To improve performance, the NTB buffer size should be large enough to fit multiple MTU-sized
310+
frames in a single NTB buffer and it's length should be multiple of 4.
311+
271312
endmenu # "Network driver (ECM/NCM/RNDIS)"
313+
314+
menu "Vendor Specific Interface"
315+
config TINYUSB_VENDOR_COUNT
316+
int "TinyUSB Vendor specific interfaces count"
317+
default 0
318+
range 0 2
319+
help
320+
Setting value greater than 0 will enable TinyUSB Vendor specific feature.
321+
endmenu # "Vendor Specific Interface"
272322
endmenu # "TinyUSB Stack"

0 commit comments

Comments
 (0)