Reference: JTAG/SWD debugging? -> [SOLVED] Is there a way to load a program directly into SRAM using USB OTG?
So I just worked around my UART mux-change issue by altering the UART mux in the TPL instead of figuring out why u-boot wasn’t honoring my change in arch/arm/dts/rk3588-rock-5b.dts
.
With that done, and displaying the output on the changed mux instead of the original mux, I connected my STM32 SWD lines to the pins that were previously the original UART2 mux0 pins.
No clue if that’s all it’ll take (eg. if I have to enable jtag the way uart was, or even if jtag drivers are made for u-boot), but it’s not working for me.
$ openocd -f /usr/share/openocd/scripts/interface/stlink-dap.cfg -f <pathToCustom>/rk3308.cfg -d3
simply results in
...
Debug: 67 78 stlink_usb.c:2609 stlink_dump_speed_map(): 5 kHz
Debug: 68 370 stlink_usb.c:748 stlink_usb_error_check(): STLINK_JTAG_GET_IDCODE_ERROR
Error: 69 370 stlink_usb.c:2959 stlink_usb_open(): init mode failed (unable to connect to the target)
Debug: 70 370 stlink_usb.c:1323 stlink_usb_exit_mode(): MODE: 0x01
...
rk3308.cfg only contains transport select dapdirect_swd
since I was only looking for ANY good connection before adding other needed customizations.
And in case anyone doubts using STM32 SWD to do the job, know that I’ve already done it with other boards like my nrf52840 dongle.
EDIT0: Looking at the dtb decompiled, I see
...
pinctrl {
#address-cells = <0x02>;
#size-cells = <0x02>;
compatible = "rockchip,rk3588-pinctrl";
...
jtag {
};
...
so definitely looks like I need to enable it in some way…
EDIT1: Actually, ya know, I don’t think I do need to “enable” it in u-boot. I ought to be able to use it with BOOTROM(/maskrom), but the result is the same.