From 8fc13ed12f711f1ad98025cc3397b64d05131b56 Mon Sep 17 00:00:00 2001 From: Igor Modesto Date: Wed, 11 Nov 2026 09:52:02 -0300 Subject: [PATCH 1/6] fix(webusb_serial): use v0.19-compatible tud_vendor_rx_cb signature --- examples/device/webusb_serial/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/device/webusb_serial/src/main.c b/examples/device/webusb_serial/src/main.c index 4be5e4db4b..fdabe84368 100644 --- a/examples/device/webusb_serial/src/main.c +++ b/examples/device/webusb_serial/src/main.c @@ -212,7 +212,7 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_requ return false; } -void tud_vendor_rx_cb(uint8_t idx, const uint8_t *buffer, uint32_t bufsize) { +void tud_vendor_rx_cb(uint8_t idx, const uint8_t *buffer, uint16_t bufsize) { (void)idx; (void)buffer; (void)bufsize; From b63a0d20e3f04b9bdecbfc696d9566b29ecc1200 Mon Sep 17 00:00:00 2001 From: Igor Modesto Date: Wed, 11 Nov 2026 10:46:34 -0300 Subject: [PATCH 2/6] fix(unit-test): reference usbd.c in msc ceedling test --- test/unit-test/test/device/msc/test_msc_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit-test/test/device/msc/test_msc_device.c b/test/unit-test/test/device/msc/test_msc_device.c index ea02b7050a..7f22bd135c 100644 --- a/test/unit-test/test/device/msc/test_msc_device.c +++ b/test/unit-test/test/device/msc/test_msc_device.c @@ -32,7 +32,7 @@ #include "tusb_fifo.h" #include "tusb.h" #include "usbd.h" -TEST_SOURCE_FILE("usbd_control.c") +TEST_SOURCE_FILE("usbd.c") TEST_SOURCE_FILE("msc_device.c") // Mock File From 850395dbe7e07c2c11ff21fe19d2884f1c9561e6 Mon Sep 17 00:00:00 2001 From: Igor Modesto Date: Wed, 11 Nov 2026 11:21:18 -0300 Subject: [PATCH 3/6] fix(ci): support compressed tar toolchain archives --- .github/actions/setup_toolchain/download/action.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup_toolchain/download/action.yml b/.github/actions/setup_toolchain/download/action.yml index 77d3bcf194..3b1a3d7157 100644 --- a/.github/actions/setup_toolchain/download/action.yml +++ b/.github/actions/setup_toolchain/download/action.yml @@ -41,12 +41,10 @@ runs: curl -L "$TOOLCHAIN_URL" -o toolchain.zip unzip -q toolchain.zip -d ~/cache/${TOOLCHAIN} ~/cache/${TOOLCHAIN}/xpack-arm-none-eabi-gcc-14.2.1-1.1/bin/arm-none-eabi-gcc.exe --version - elif [[ ${FILE_EXT} == gz ]]; then - wget --progress=dot:giga ${TOOLCHAIN_URL} -O toolchain.tar.gz - tar -C ~/cache/${TOOLCHAIN} -xaf toolchain.tar.gz else - echo "Unsupported toolchain file extension: ${FILE_EXT}" - exit 1 + # Handle tarballs regardless of compression suffix (.gz, .xz, .bz2, etc.). + wget --progress=dot:giga ${TOOLCHAIN_URL} -O toolchain.tar + tar -C ~/cache/${TOOLCHAIN} -xaf toolchain.tar fi shell: bash From d02852b70641293a9637c50750e3d392b3618ddc Mon Sep 17 00:00:00 2001 From: Igor Modesto Date: Wed, 11 Nov 2026 12:01:07 -0300 Subject: [PATCH 4/6] fix(unit-test): decouple midi2 device test from usbd.c --- test/unit-test/test/device/midi2/test_midi2_device.c | 2 +- test/unit-test/test/support/midi_descriptor_macros.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/unit-test/test/support/midi_descriptor_macros.h diff --git a/test/unit-test/test/device/midi2/test_midi2_device.c b/test/unit-test/test/device/midi2/test_midi2_device.c index 1314c25854..b59fec9938 100644 --- a/test/unit-test/test/device/midi2/test_midi2_device.c +++ b/test/unit-test/test/device/midi2/test_midi2_device.c @@ -26,7 +26,7 @@ #include "tusb_types.h" #include "class/audio/audio.h" #include "class/midi/midi.h" -#include "device/usbd.h" +#include "midi_descriptor_macros.h" void setUp(void) {} void tearDown(void) {} diff --git a/test/unit-test/test/support/midi_descriptor_macros.h b/test/unit-test/test/support/midi_descriptor_macros.h new file mode 100644 index 0000000000..05b47aa139 --- /dev/null +++ b/test/unit-test/test/support/midi_descriptor_macros.h @@ -0,0 +1,6 @@ +#ifndef MIDI_DESCRIPTOR_MACROS_H_ +#define MIDI_DESCRIPTOR_MACROS_H_ + +#include "device/usbd.h" + +#endif From 17648d478df0f12a5c1c9fe3752957cffd746fc5 Mon Sep 17 00:00:00 2001 From: Igor Modesto Date: Wed, 11 Nov 2026 13:38:30 -0300 Subject: [PATCH 5/6] fix(ci): harden pre-commit fuzzer dependency install --- .github/workflows/pre-commit.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index b9bfaf9b64..3812b32aa5 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -33,7 +33,18 @@ jobs: - name: Build Fuzzer run: | - sudo apt install libc++-dev libc++abi-dev + for attempt in 1 2 3; do + sudo apt-get update && \ + sudo apt-get install -y --no-install-recommends libc++-dev libc++abi-dev && break + + if [ "$attempt" -eq 3 ]; then + echo "apt install failed after $attempt attempts" + exit 1 + fi + + echo "apt install failed, retrying in 15s..." + sleep 15 + done clang --version export CC=clang export CXX=clang++ From d8d174c6e4bdb4fbe862217dd5b96cea385dd805 Mon Sep 17 00:00:00 2001 From: Igor Modesto Date: Wed, 11 Nov 2026 14:20:23 -0300 Subject: [PATCH 6/6] fix(ci): harden apt-based toolchain setup --- .../setup_toolchain/download/action.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup_toolchain/download/action.yml b/.github/actions/setup_toolchain/download/action.yml index 3b1a3d7157..f3cffdfe7c 100644 --- a/.github/actions/setup_toolchain/download/action.yml +++ b/.github/actions/setup_toolchain/download/action.yml @@ -52,12 +52,27 @@ runs: env: TOOLCHAIN: ${{ inputs.toolchain }} run: | + apt_install_with_retry() { + for attempt in 1 2 3; do + sudo apt-get update && \ + sudo apt-get install -y --no-install-recommends "$@" && return 0 + + if [[ "$attempt" -eq 3 ]]; then + echo "apt install failed after $attempt attempts: $*" + return 1 + fi + + echo "apt install failed, retrying in 15s..." + sleep 15 + done + } + if [[ ${TOOLCHAIN} == arm-iar ]]; then sudo dpkg -i ~/cache/${TOOLCHAIN}/iar-lmsc-tools.deb - sudo apt install -y ~/cache/${TOOLCHAIN}/cxarm.deb + apt_install_with_retry ~/cache/${TOOLCHAIN}/cxarm.deb TOOLCHAIN_PATH="/opt/iar/cxarm/arm/bin" elif [[ ${TOOLCHAIN} == ft9xx-gcc ]]; then - sudo apt install -y ~/cache/${TOOLCHAIN}/ft9xxtoolchain.deb + apt_install_with_retry ~/cache/${TOOLCHAIN}/ft9xxtoolchain.deb TOOLCHAIN_PATH="/opt/ft32/bin" else # Find the single toolchain bin directory