target/arm_adi_v5: fix sync CSW cache on apreg write
[openocd.git] / src / helper / bin2char.sh
blob85a0fd6a88546cd61d33683f53a22d55568cb8ef
1 #!/bin/sh
3 [ $# != 0 ] && {
4 echo "Usage: $0"
5 echo
6 echo "Read binary data from standard input and write it as a comma separated"
7 echo "list of hexadecimal byte values to standard ouput. The output is usable"
8 echo "as a C array initializer. It is terminated with a comma so it can be"
9 echo "continued e.g. for zero termination."
10 exit 1
13 echo "/* Autogenerated with $0 */"
14 od -v -A n -t x1 | sed 's/ *\(..\) */0x\1,/g'