summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-04-26 23:15:49 +0700
committerhathach <[email protected]>2026-04-28 16:38:36 +0700
commit3792a9a3871cad32d7f38bc831417f60aeb17aff (patch)
tree903921b57be34e546640c7b0801cd58e32a4ae7f
parentcf50ea245bb02fc5674ef2ba6a3593a27c005b82 (diff)
fix warning, change hil jlink for feather nrf52840
-rw-r--r--examples/device/cdc_msc_throughput/src/main.c6
-rwxr-xr-xtest/hil/hil_test.py3
-rw-r--r--test/hil/tinyusb.json2
3 files changed, 6 insertions, 5 deletions
diff --git a/examples/device/cdc_msc_throughput/src/main.c b/examples/device/cdc_msc_throughput/src/main.c
index b6a0705a3..116cbe13f 100644
--- a/examples/device/cdc_msc_throughput/src/main.c
+++ b/examples/device/cdc_msc_throughput/src/main.c
@@ -99,9 +99,9 @@ void tud_msc_inquiry_cb(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16
const char vid[] = "TinyUSB";
const char pid[] = "Mass Storage";
const char rev[] = "1.0";
- memcpy(vendor_id, vid, strlen(vid));
- memcpy(product_id, pid, strlen(pid));
- memcpy(product_rev, rev, strlen(rev));
+ (void) strncpy((char*) vendor_id, vid, 8);
+ (void) strncpy((char*) product_id, pid, 16);
+ (void) strncpy((char*) product_rev, rev, 4);
}
bool tud_msc_test_unit_ready_cb(uint8_t lun) {
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py
index 7d716e339..9b4a36c1c 100755
--- a/test/hil/hil_test.py
+++ b/test/hil/hil_test.py
@@ -782,7 +782,8 @@ def test_device_cdc_msc_throughput(board):
pass
# Put tty in raw mode so dd sees pure binary throughput.
- run_cmd(f'stty -F {tty} raw -echo')
+ rs = run_cmd(f'timeout 30 stty -F {tty} raw -echo')
+ assert rs.returncode == 0, f'stty failed: {rs.stdout.decode()}'
# Payload aim: ~5 s per direction at FS (~830 kB/s), much less at HS.
msc_count = 2 if is_fs else 16 # bs=1M
diff --git a/test/hil/tinyusb.json b/test/hil/tinyusb.json
index 5466cd534..e7cd435fa 100644
--- a/test/hil/tinyusb.json
+++ b/test/hil/tinyusb.json
@@ -43,7 +43,7 @@
},
"flasher": {
"name": "jlink",
- "uid": "000682804350",
+ "uid": "681295394",
"args": "-device nrf52840_xxaa"
}
},