Skip to content

Commit 766ac4f

Browse files
authored
Merge pull request #3557 from hathach/hil-host-cdc
add more hil tests
2 parents 8f7f286 + 0521e66 commit 766ac4f

File tree

22 files changed

+465
-52
lines changed

22 files changed

+465
-52
lines changed

.github/actions/get_deps/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ runs:
99
using: "composite"
1010
steps:
1111
- name: Checkout pico-sdk for rp2040
12-
if: contains(inputs.arg, 'rp2040') || contains(inputs.arg, 'raspberry_pi_pico')
13-
uses: actions/checkout@v4
12+
if: >-
13+
contains(inputs.arg, 'rp2040') ||
14+
contains(inputs.arg, 'rp2350') ||
15+
contains(inputs.arg, 'raspberry_pi_pico') ||
16+
contains(inputs.arg, 'adafruit_fruit_jam')
17+
uses: actions/checkout@v6
1418
with:
1519
repository: raspberrypi/pico-sdk
1620
ref: master

.github/actions/setup_toolchain/download/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
steps:
1414
- name: Cache Toolchain
1515
if: ${{ !startsWith(inputs.toolchain_url, 'https://github.com') }}
16-
uses: actions/cache@v4
16+
uses: actions/cache@v5
1717
id: cache-toolchain-download
1818
with:
1919
path: ~/cache/${{ inputs.toolchain }}

.github/actions/setup_toolchain/espressif/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ runs:
2121
shell: bash
2222

2323
- name: Cache Docker Image
24-
uses: actions/cache@v4
24+
uses: actions/cache@v5
2525
id: cache-toolchain-espressif
2626
with:
2727
path: ${{ env.DOCKER_ESP_IDF }}

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- uses: actions/checkout@v6
3030
with:
3131
fetch-depth: 2 # Needed for push commit comparison
32-
- uses: dorny/paths-filter@v3
32+
- uses: dorny/paths-filter@v4
3333
id: filter
3434
with:
3535
filters: |
@@ -124,7 +124,7 @@ jobs:
124124
125125
- name: Upload Metrics Artifact
126126
if: github.event_name == 'push' || github.event_name == 'release'
127-
uses: actions/upload-artifact@v5
127+
uses: actions/upload-artifact@v7
128128
with:
129129
name: metrics-tinyusb
130130
path: metrics.json
@@ -179,7 +179,7 @@ jobs:
179179

180180
- name: Upload Metrics Comment Artifact
181181
if: github.event_name == 'pull_request'
182-
uses: actions/upload-artifact@v5
182+
uses: actions/upload-artifact@v7
183183
with:
184184
name: metrics-comment
185185
path: |

.github/workflows/build_util.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ jobs:
9090

9191
- name: Upload Artifacts for Metrics
9292
if: inputs.upload-metrics == true && inputs.code-changed == true
93-
uses: actions/upload-artifact@v5
93+
uses: actions/upload-artifact@v7
9494
with:
9595
name: metrics-${{ matrix.arg }}
9696
path: cmake-build/cmake-build-*/metrics.json
9797

9898
- name: Upload Artifacts for Hardware Testing
9999
if: inputs.upload-artifacts == true && inputs.code-changed == true
100-
uses: actions/upload-artifact@v5
100+
uses: actions/upload-artifact@v7
101101
with:
102102
name: binaries-${{ matrix.arg }}
103103
path: |

.github/workflows/cifuzz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
fuzz-seconds: 400
3030

3131
- name: Upload Crash
32-
uses: actions/upload-artifact@v5
32+
uses: actions/upload-artifact@v7
3333
if: failure() && steps.build.outcome == 'success'
3434
with:
3535
name: artifacts

.github/workflows/static_analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
category: CodeQL
8585

8686
- name: Upload artifact
87-
uses: actions/upload-artifact@v5
87+
uses: actions/upload-artifact@v7
8888
with:
8989
name: codeql-${{ matrix.board }}
9090
path: ${{ steps.analyze.outputs.sarif-output }}
@@ -136,7 +136,7 @@ jobs:
136136
category: PVS-Studio
137137

138138
- name: Upload artifact
139-
uses: actions/upload-artifact@v5
139+
uses: actions/upload-artifact@v7
140140
with:
141141
name: pvs-studio-${{ matrix.board }}
142142
path: pvs-studio-${{ matrix.board }}.sarif
@@ -236,7 +236,7 @@ jobs:
236236
category: IAR-CStat
237237

238238
- name: Upload artifact
239-
uses: actions/upload-artifact@v5
239+
uses: actions/upload-artifact@v7
240240
with:
241241
name: iar-cstat-${{ matrix.board }}
242242
path: iar-cstat-${{ matrix.board }}.sarif

AGENTS.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ information that does not match the info here.
2727
## Build Examples
2828

2929
Choose ONE of these approaches:
30-
3130
**Option 1: Individual Example with CMake and Ninja (RECOMMENDED)**
3231

3332
```bash
@@ -152,6 +151,13 @@ openocd -f interface/stlink.cfg -f target/stm32h7x.cfg
152151
openocd -f interface/jlink.cfg -f target/stm32h7x.cfg
153152
```
154153

154+
For **rp2040/rp2350** with a CMSIS-DAP probe (e.g. Picoprobe, debugprobe):
155+
```bash
156+
openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000"
157+
# or for rp2350:
158+
openocd -f interface/cmsis-dap.cfg -f target/rp2350.cfg -c "adapter speed 5000"
159+
```
160+
155161
For boards that define `OPENOCD_OPTION` in `board.cmake`, use those options directly:
156162
```bash
157163
openocd $(cat hw/bsp/FAMILY/boards/BOARD/board.cmake | grep OPENOCD_OPTION | ...)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018, hathach (tinyusb.org)
3+
Copyright (c) 2012-2026, hathach (tinyusb.org)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

examples/device/hid_generic_inout/src/usb_descriptors.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,23 @@ enum
9797

9898
#define CONFIG_TOTAL_LEN (TUD_CONFIG_DESC_LEN + TUD_HID_INOUT_DESC_LEN)
9999

100-
#define EPNUM_HID 0x01
100+
#if defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY)
101+
// MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h
102+
// e.g EP1 OUT & EP1 IN cannot exist together
103+
#define EPNUM_HID_OUT 0x01
104+
#define EPNUM_HID_IN 0x82
105+
#else
106+
#define EPNUM_HID_OUT 0x01
107+
#define EPNUM_HID_IN 0x81
108+
#endif
101109

102110
uint8_t const desc_configuration[] =
103111
{
104112
// Config number, interface count, string index, total length, attribute, power in mA
105113
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0x00, 100),
106114

107115
// Interface number, string index, protocol, report descriptor len, EP Out & In address, size & polling interval
108-
TUD_HID_INOUT_DESCRIPTOR(ITF_NUM_HID, 0, HID_ITF_PROTOCOL_NONE, sizeof(desc_hid_report), EPNUM_HID, 0x80 | EPNUM_HID, CFG_TUD_HID_EP_BUFSIZE, 10)
116+
TUD_HID_INOUT_DESCRIPTOR(ITF_NUM_HID, 0, HID_ITF_PROTOCOL_NONE, sizeof(desc_hid_report), EPNUM_HID_OUT, EPNUM_HID_IN, CFG_TUD_HID_EP_BUFSIZE, 10)
109117
};
110118

111119
// Invoked when received GET CONFIGURATION DESCRIPTOR

0 commit comments

Comments
 (0)