From f22a61515899832db0494c001cc5442dccf0f737 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 20 Oct 2023 10:07:24 +0200 Subject: [PATCH] WIP: hack simtrace2-tool for USB testing of rp2040 firmware Command used for continuous cycles of board_info messages: ./simtrace2-tool -V 1d50 -P aaaa -C 1 -I 0 -S 0 generic board-info Change-Id: I577a0266b68c8161b9eaec653c3c7d17d320faaf --- host/src/simtrace2-tool.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/host/src/simtrace2-tool.c b/host/src/simtrace2-tool.c index 6b81bce6..40b4f4c5 100644 --- a/host/src/simtrace2-tool.c +++ b/host/src/simtrace2-tool.c @@ -99,9 +99,15 @@ static void run_mainloop(struct osmo_st2_cardem_inst *ci) fprintf(stderr, "BULK IN transfer error; rc=%d\n", rc); return; } + if (rc >= 0) { + printf("Rx(%u): %s\n", xfer_len, osmo_hexdump(buf, xfer_len)); + osmo_st2_generic_request_board_info(ci->slot); + } +#if 0 /* break the loop if no new messages arrive within 100ms */ if (rc == LIBUSB_ERROR_TIMEOUT) return; +#endif } } @@ -220,6 +226,9 @@ static int do_subsys_modem(int argc, char **argv) static int do_generic_board_info(int argc, char **argv) { + printf("ci: %p\n", ci); + printf("ci->slot: %p\n", ci->slot); + printf("ci->slot->transp: %p\n", ci->slot->transp); return osmo_st2_generic_request_board_info(ci->slot); }