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
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>"
14 if ! command -v $OPENRABBITFU &> /dev
/null
; then
15 echo "$OPENRABBITFU not found!";
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
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
29 if [[ "$line" == "Loops:"* ]]; then
33 if [[ "$line" == "Dhrystones per Second"* ]]; then
37 if [[ "$line" == "Total ticks"* ]]; then
41 if [[ "$line" == "stdcbench final score"* ]]; then
44 done < <($OPENRABBITFU --run --serialout /home
/philipp
/OpenRabbit
/coldboot
/coldload.bin
/home
/philipp
/OpenRabbit
/coldboot
/pilot.bin
"$2" $1)