create shell script for collecting AVS/ABB info
authorBrad Griffis <bgriffis@ti.com>
Fri, 22 Jan 2021 15:01:08 +0000 (09:01 -0600)
committerBrad Griffis <bgriffis@ti.com>
Fri, 22 Jan 2021 20:30:59 +0000 (14:30 -0600)
am57xx-avs-abb-rd1.sh [new file with mode: 0755]

diff --git a/am57xx-avs-abb-rd1.sh b/am57xx-avs-abb-rd1.sh
new file mode 100755 (executable)
index 0000000..77aa8b0
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/bash
+today=`date '+%Y-%m-%d_%H%M%S'`;
+OUTPUT_FILE=am57xx-avs-abb_$today.rd1
+
+id_code=`devmem2 0x4AE0C204 | sed '1d2ds/.*: 0x[0-9a-fA-F]\([0-9a-fA-F]\{3\}\)[0-9a-fA-F]\{4\}/\1/'`
+
+echo "AVS-ABB AM57xx" > $OUTPUT_FILE
+
+# Append to file
+while IFS='' read -r line || [[ -n "$line" ]]; do
+    devmem2 $line | sed '1d2ds/.*\s\(0x[0-9a-fA-F]*\)\s.*: \(0x[0-9a-fA-F]*\)*/\1 \2/' >> $OUTPUT_FILE
+done << EOM
+0x4AE0C200
+0x4AE0C204
+0x4AE0C208
+0x4AE0C20C
+0x4AE0C210
+0x4A0025CC
+0x4A0025D0
+0x4A0025D4
+0x4A0025C4
+0x4A0025E0
+0x4A0025E4
+0x4A0025E8
+0x4A0025D8
+0x4A0025F4
+0x4A003B08
+0x4A003B0C
+0x4A003B10
+0x4A003B14
+0x4A003B1C
+0x4A003B20
+0x4A003B24
+0x4A003B28
+0x4A003B2C
+0x4A002470
+0x4A00246C
+0x4AE0C154
+0x4AE0C158
+EOM