Adding CTest script

Adding script to run CTest on the Corstone-300 FVP. The script will
detect which version of the FVP that is used and pass the correct
command line arguments.

Updating README with instructions how to run tests, either using
CTest or calling the FVP directly.

Update FreeRTOS example to exit with the status of the inference.
Minor adjustments are needed to the output vectors.

Change-Id: I8a1a740b0dec2ce35d95e5c5d91f4b57a2c8e1fa
diff --git a/targets/corstone-300/CMakeLists.txt b/targets/corstone-300/CMakeLists.txt
index 2efd329..d41a7d3 100644
--- a/targets/corstone-300/CMakeLists.txt
+++ b/targets/corstone-300/CMakeLists.txt
@@ -26,32 +26,7 @@
     set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/toolchain/armclang.cmake")
 endif()
 
-execute_process(
-    COMMAND FVP_Corstone_SSE-300_Ethos-U55 --version
-    OUTPUT_VARIABLE FVP_VERSION_OUTPUT
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    COMMAND_ERROR_IS_FATAL ANY)
-
-if (${FVP_VERSION_OUTPUT} MATCHES "Fast Models \\[([0-9]+\\.[0-9]+\\.[0-9]+)")
-    set(FVP_VERSION ${CMAKE_MATCH_1})
-else()
-    message("Unknown version")
-endif()
-
-if (${FVP_VERSION} STREQUAL "11.13.41")
-    set(FVP_EXTRA_ARGS "ethosu.num_macs=128")
-elseif (${FVP_VERSION} STREQUAL "11.12.57")
-    set(FVP_EXTRA_ARGS "ethosu.config=H128")
-endif ()
-
-set(ETHOSU_COMMAND_DEFAULT
-    FVP_Corstone_SSE-300_Ethos-U55
-        -C ${FVP_EXTRA_ARGS}
-        -C mps3_board.visualisation.disable-visualisation=1
-        -C mps3_board.telnetterminal0.start_telnet=0
-        -C mps3_board.uart0.out_file="-"
-        -C mps3_board.uart0.unbuffered_output=1
-        -C mps3_board.uart0.shutdown_tag="EXITTHESIM")
+set(ETHOSU_COMMAND_DEFAULT ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/run_ctest.py -t corstone-300)
 
 #############################################################################
 # Project