aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/check-blobs.sh
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-08-25 17:15:41 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-08-25 17:15:41 +0200
commit0806a1e2ae31fec34dcc6b9c502bf5b8cd5da1be (patch)
treebdca7ddf9d0835b4acc5632b06805bc71713d491 /cortex-m-rt/check-blobs.sh
parent6b1cb44eb0504d1cd27e02fc79de0c7b86a32092 (diff)
downloadcortex-m-0806a1e2ae31fec34dcc6b9c502bf5b8cd5da1be.tar.gz
cortex-m-0806a1e2ae31fec34dcc6b9c502bf5b8cd5da1be.tar.zst
cortex-m-0806a1e2ae31fec34dcc6b9c502bf5b8cd5da1be.zip
check that the blobs are up to date
Diffstat (limited to 'cortex-m-rt/check-blobs.sh')
-rwxr-xr-xcortex-m-rt/check-blobs.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/cortex-m-rt/check-blobs.sh b/cortex-m-rt/check-blobs.sh
new file mode 100755
index 0000000..e1d0d80
--- /dev/null
+++ b/cortex-m-rt/check-blobs.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# Checks that the blobs are up to date with the committed assembly files
+
+set -euxo pipefail
+
+for lib in $(ls bin/*.a); do
+ filename=$(basename $lib)
+ arm-none-eabi-objdump -Cd $lib > bin/${filename%.a}.before
+done
+
+./assemble.sh
+
+for lib in $(ls bin/*.a); do
+ filename=$(basename $lib)
+ arm-none-eabi-objdump -Cd $lib > bin/${filename%.a}.after
+done
+
+for cksum in $(ls bin/*.after); do
+ diff -u $cksum ${cksum%.after}.before
+done