From d68ad1a59c3320cf550ce2d7c0bb53becb130742 Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Fri, 3 Apr 2026 13:41:50 +0200 Subject: [PATCH] Add UART capture script, Makefile, updated README with prerequisites Co-Authored-By: Claude Opus 4.6 (1M context) --- capture_uart.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 capture_uart.sh diff --git a/capture_uart.sh b/capture_uart.sh new file mode 100755 index 0000000..f6d7545 --- /dev/null +++ b/capture_uart.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# RK3588 DDR Training UART Capture +# Connect USB-UART to Rock 5 ITX+ debug header (1.5Mbaud, 3.3V) +# Run this BEFORE booting/rebooting the board + +UART=${1:-/dev/ttyUSB0} +BAUD=1500000 +LOGDIR=~/src/rk3588-ddr-decompiled/uart_logs +TIMESTAMP=$(date +%Y%m%d_%H%M%S) +LOGFILE="$LOGDIR/ddr_training_${TIMESTAMP}.log" + +mkdir -p "$LOGDIR" + +echo "Capturing DDR training output from $UART at ${BAUD}baud" +echo "Log: $LOGFILE" +echo "Press Ctrl+C to stop after boot completes" +echo "" + +stty -F "$UART" "$BAUD" cs8 -cstopb -parenb raw -echo +cat "$UART" | tee "$LOGFILE"