tools/memory: check existence of default ELF
When ELF option is not specified by user to g_var_profiler.sh, default ELF binary is used.
But in some board default ELF binary is not built resulting into empty output file by the script.
To avoid above scenario, we will check pre-existence of ELF binary.
@@ -81,6 +81,10 @@ fi
if [ -z ${ELF} ]; then
ELF="${MEMTOOL_PATH}/../../build/output/bin/tinyara"
+ if [ ! -f ${ELF} ]; then
+ echo "Unavailable Default ELF \"${ELF}\""
+ exit 1
+ fi
fi
if [ -z ${OUTPUT_FILE} ]; then
