Skip to content

enable hil test for mtp#3531

Merged
hathach merged 2 commits intomasterfrom
hil-mtp
Mar 7, 2026
Merged

enable hil test for mtp#3531
hathach merged 2 commits intomasterfrom
hil-mtp

Conversation

@hathach
Copy link
Owner

@hathach hathach commented Mar 6, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 6, 2026 15:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables the Hardware-in-the-Loop (HIL) MTP test path by improving MTP device open/enum handling and adding the MTP example back into the default device test list.

Changes:

  • Extend pymtp imports to access libmtp ctypes types and configure LIBMTP_Open_Raw_Device signature before use.
  • Proactively unmount any gvfs/gio MTP mount that can block libmtp access during enumeration.
  • Enable running the device/mtp HIL test by adding it to device_tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@github-actions
Copy link

github-actions bot commented Mar 6, 2026

Size Difference Report

Because TinyUSB code size varies by port and configuration, the metrics below represent the averaged totals across all example builds.

Note: If there is no change, only one value is shown.

Changes >1% in size

file .text .rodata .data .bss size % diff
cdc_device.c 1325 ➙ 1306 (-19) 16 19 661 ➙ 642 (-19) 1985 ➙ 1947 (-38) -1.9%
printer_device.c 0 ➙ 813 (+813) 0 0 ➙ 694 (+694) 0 ➙ 530 (+530) 0 ➙ 1341 (+1341) n/a
tusb.c 431 ➙ 451 (+20) 0 368 ➙ 384 (+16) 3 433 ➙ 453 (+20) +4.6%
TOTAL 1756 ➙ 2570 (+814) 16 387 ➙ 1097 (+710) 664 ➙ 1175 (+511) 2418 ➙ 3741 (+1323) +54.7%

Changes <1% in size

file .text .rodata .data .bss size % diff
dcd_ch32_usbfs.c 1472 ➙ 1473 (+1) 0 0 2444 3916 ➙ 3917 (+1) +0.0%
dcd_ch32_usbhs.c 1648 ➙ 1649 (+1) 0 0 448 2096 ➙ 2097 (+1) +0.0%
dcd_ci_hs.c 1762 ➙ 1760 (-2) 0 0 1344 2541 ➙ 2538 (-3) -0.1%
dcd_dwc2.c 4174 ➙ 4176 (+2) 25 0 265 4464 ➙ 4465 (+1) +0.0%
dcd_eptri.c 2270 ➙ 2271 (+1) 0 0 259 2529 ➙ 2530 (+1) +0.0%
dcd_lpc17_40.c 1470 ➙ 1474 (+4) 0 0 648 1794 ➙ 1798 (+4) +0.2%
dcd_msp430x5xx.c 1796 ➙ 1798 (+2) 0 0 176 1972 ➙ 1974 (+2) +0.1%
dcd_musb.c 2446 ➙ 2445 (-1) 0 0 160 2606 ➙ 2605 (-1) -0.0%
dcd_nrf5x.c 2919 ➙ 2918 (-1) 0 0 292 3211 ➙ 3210 (-1) -0.0%
dcd_nuc120.c 1093 ➙ 1094 (+1) 0 0 78 1171 ➙ 1172 (+1) +0.1%
dcd_nuc121.c 1167 ➙ 1168 (+1) 0 0 101 1268 ➙ 1269 (+1) +0.1%
dcd_nuc505.c 0 0 1529 ➙ 1531 (+2) 157 1686 ➙ 1688 (+2) +0.1%
dcd_rp2040.c 859 ➙ 858 (-1) 20 604 655 2138 ➙ 2137 (-1) -0.0%
dcd_rusb2.c 2917 ➙ 2919 (+2) 0 0 156 3073 ➙ 3075 (+2) +0.1%
dcd_samd.c 1032 ➙ 1034 (+2) 0 0 266 1298 ➙ 1300 (+2) +0.2%
dcd_samg.c 1319 ➙ 1320 (+1) 0 0 72 1391 ➙ 1392 (+1) +0.1%
rp2040_usb.c 172 75 718 ➙ 717 (-1) 4 969 ➙ 968 (-1) -0.1%
tusb_fifo.c 844 ➙ 848 (+4) 0 477 ➙ 480 (+3) 0 838 ➙ 842 (+4) +0.5%
usbd.c 3192 ➙ 3197 (+5) 57 89 276 ➙ 275 (-1) 3532 ➙ 3537 (+5) +0.1%
usbd_control.c 523 0 474 78 601 ➙ 600 (-1) -0.2%
TOTAL 33075 ➙ 33097 (+22) 177 3891 ➙ 3895 (+4) 7879 ➙ 7878 (-1) 43094 ➙ 43114 (+20) +0.0%
No changes
file .text .rodata .data .bss size % diff
audio_device.c 2850 0 1248 1673 4518 +0.0%
cdc_host.c 6610 487 15 1539 8371 +0.0%
dcd_ci_fs.c 1925 0 0 1290 3215 +0.0%
dcd_da146xx.c 3067 0 0 144 3211 +0.0%
dcd_khci.c 1953 0 0 1290 3243 +0.0%
dcd_lpc_ip3511.c 1463 0 0 264 1639 +0.0%
dcd_mm32f327x_otg.c 1478 0 0 1290 2768 +0.0%
dcd_stm32_fsdev.c 2557 0 0 291 2848 +0.0%
dfu_device.c 744 28 712 183 926 +0.0%
dfu_rt_device.c 156 0 134 0 156 +0.0%
dwc2_common.c 602 30 0 0 618 +0.0%
ecm_rndis_device.c 1037 0 1 2272 3310 +0.0%
ehci.c 2763 0 0 6043 7597 +0.0%
fsdev_common.c 180 0 0 0 180 +0.0%
hcd_ch32_usbfs.c 2484 0 0 498 2982 +0.0%
hcd_ci_hs.c 184 0 0 0 184 +0.0%
hcd_dwc2.c 4994 33 1 513 5540 +0.0%
hcd_khci.c 2442 0 0 449 2891 +0.0%
hcd_musb.c 3073 0 0 157 3230 +0.0%
hcd_pio_usb.c 262 0 240 0 502 +0.0%
hcd_rp2040.c 976 73 416 384 1849 +0.0%
hcd_rusb2.c 2923 0 0 245 3168 +0.0%
hcd_samd.c 2220 0 0 324 2544 +0.0%
hcd_stm32_fsdev.c 3287 0 1 420 3708 +0.0%
hid_device.c 1118 44 997 115 1233 +0.0%
hid_host.c 1206 0 0 1250 2456 +0.0%
hub.c 1235 8 8 29 1269 +0.0%
midi_device.c 1129 0 995 589 1716 +0.0%
midi_host.c 1353 7 7 3740 5097 +0.0%
msc_device.c 2518 108 2286 538 3056 +0.0%
msc_host.c 1589 0 0 394 1984 +0.0%
mtp_device.c 1689 22 1449 579 2275 +0.0%
ncm_device.c 1514 28 1408 5830 7358 +0.0%
ohci.c 1942 0 0 2414 4356 +0.0%
rusb2_common.c 160 0 16 0 176 +0.0%
typec_stm32.c 820 8 2 12 842 +0.0%
usbc.c 420 2 20 166 608 +0.0%
usbh.c 4563 55 99 964 5648 +0.0%
usbtmc_device.c 2176 24 69 291 2500 +0.0%
vendor_device.c 624 0 530 464 1087 +0.0%
video_device.c 4391 5 1851 472 4855 +0.0%
TOTAL 78677 962 12505 37116 115714 +0.0%

@hathach hathach merged commit 5f69034 into master Mar 7, 2026
296 of 297 checks passed
@hathach hathach deleted the hil-mtp branch March 7, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants