eclair: Switch to use existing TF config encodings

To reuse existing infrastructure and provide clear migration path from
existing Coverity tests.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I8dae6b8b568f3b9967dc88239caf346ed8698d6a
diff --git a/eclair/analyze.sh b/eclair/analyze.sh
index 666a79b..f24f5c3 100755
--- a/eclair/analyze.sh
+++ b/eclair/analyze.sh
@@ -28,9 +28,12 @@
 # Directory where to put all ECLAIR output and temporary files.
 ECLAIR_OUTPUT_DIR="${WORKSPACE}/ECLAIR/out"
 
-export CROSS_COMPILE="/opt/gcc-arm-11.2-2022.02-x86_64-aarch64-none-elf/bin/aarch64-none-elf-"
+TF_CONFIG="$1"
 
-PLAT="$1"
+# Automatically export vars
+set -a
+source ${WORKSPACE}/tf-a-ci-scripts/tf_config/${TF_CONFIG}
+set +a
 
 export CC_ALIASES="${CROSS_COMPILE}gcc"
 export CXX_ALIASES="${CROSS_COMPILE}g++"
@@ -50,7 +53,7 @@
 export ECLAIR_DIAGNOSTICS_OUTPUT="${ECLAIR_OUTPUT_DIR}/DIAGNOSTICS.txt"
 
 # Identifies the particular build of the project.
-export ECLAIR_PROJECT_NAME="TF_A_${PLAT}"
+export ECLAIR_PROJECT_NAME="TF_A_${TF_CONFIG}"
 # All paths mentioned in ECLAIR reports that are below this directory
 # will be presented as relative to ECLAIR_PROJECT_ROOT.
 export ECLAIR_PROJECT_ROOT="${WORKSPACE}/trusted-firmware-a"
@@ -63,7 +66,7 @@
   # Perform the build (from scratch) in an ECLAIR environment.
   "${ECLAIR_BIN_DIR}/eclair_env"                   \
       "-eval_file='${SCRIPT_DIR}/MISRA_C_2012_selection.ecl'" \
-      -- "${SCRIPT_DIR}/build-tfa.sh" "${PLAT}"
+      -- "${SCRIPT_DIR}/build-tfa.sh" "${TF_CONFIG}"
 )
 
 # Create the project database.
diff --git a/eclair/build-tfa.sh b/eclair/build-tfa.sh
index 7954f6e..58b514f 100755
--- a/eclair/build-tfa.sh
+++ b/eclair/build-tfa.sh
@@ -7,7 +7,8 @@
 
 set -ex
 
-export CROSS_COMPILE=/opt/gcc-arm-11.2-2022.02-x86_64-aarch64-none-elf/bin/aarch64-none-elf-
+env
+
 cd ${WORKSPACE}/trusted-firmware-a
-make PLAT=$1 clean
-make PLAT=$1 ${MAKE_TARGET} -j3
+make clean
+make ${MAKE_TARGET} -j3