struct / union in initializer, RFE #901.
[sdcc.git] / sdcc-extra / historygraphs / execute_benchmark-r3ka
blob4a2a481eb7a42d3dd7235e89447f65861b1f4a1a
1 #!/bin/bash
2 # Takes a few seconds to execute
3 # RCM3319 board must be attached.
4 # Must be able to access the programming cable.
6 OPENRABBITFU=/home/philipp/OpenRabbit/src/openrabbitfu
8 if [ $# != 2 ]; then
9 echo "execute_benchmark-r3ka: Execute a benchmark on an RCM3319 and report the results line"
10 echo "Wrong number of parameters. Usage: execute_benchmark-r3ka <serial device> <benchmark file>"
11 exit 1
14 if ! command -v $OPENRABBITFU &> /dev/null; then
15 echo "$OPENRABBITFU not found!";
16 exit 1
19 # Ensure that we don't get any leftover results from an old benchmark still running on the device
20 while read -r line; do
21 if [ "$line" == "Hello, World!" ]; then
22 break
24 done < <($OPENRABBITFU --run --serialout /home/philipp/OpenRabbit/coldboot/coldload.bin /home/philipp/OpenRabbit/coldboot/pilot.bin hello-r3ka/hello.ihx $1)
26 # Load benchmark onto the board
27 while read -r line; do
28 # Whetstone result
29 if [[ "$line" == "Loops:"* ]]; then
30 break
32 # Dhrystone result
33 if [[ "$line" == "Dhrystones per Second"* ]]; then
34 break
36 # Coremark result
37 if [[ "$line" == "Total ticks"* ]]; then
38 break
40 # stdcbench result
41 if [[ "$line" == "stdcbench final score"* ]]; then
42 break
44 done < <($OPENRABBITFU --run --serialout /home/philipp/OpenRabbit/coldboot/coldload.bin /home/philipp/OpenRabbit/coldboot/pilot.bin "$2" $1)
45 echo $line