run-cppcheck: use TFM_TOOLCHAIN_FILE instead of CMAKE_TOOLCHAIN_FILE

CMAKE_TOOLCHAIN_FILE is deprecated in favor of TFM_TOOLCHAIN_FILE.
In addition, TFM_TOOLCHAIN_FILE does accept relative paths.

This changes only get rid of the deprecation warning:

CMake Deprecation Warning at CMakeLists.txt:41 (message):
  SETTING CMAKE_TOOLCHAIN_FILE is deprecated.  It has been replaced with
  TFM_TOOLCHAIN_FILE.

CMake Deprecation Warning at CMakeLists.txt:42 (message):
  INTERPRETING -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake as
  -DTFM_TOOLCHAIN_FILE=toolchain_GNUARM.cmake

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Change-Id: I0395ea45815644d1657ab6b9c64c1df730806da7
diff --git a/build_helper/build_helper_configs.py b/build_helper/build_helper_configs.py
index 781571f..549af08 100755
--- a/build_helper/build_helper_configs.py
+++ b/build_helper/build_helper_configs.py
@@ -47,7 +47,7 @@
 
     "config_template": "cmake " + \
         "-DTFM_PLATFORM=%(tfm_platform)s " + \
-        "-DCMAKE_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(toolchain_file)s " + \
+        "-DTFM_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(toolchain_file)s " + \
         "-DTFM_PSA_API=%(psa_api)s " + \
         "-DTFM_ISOLATION_LEVEL=%(isolation_level)s " + \
         "-DTEST_NS=%(test_regression)s -DTEST_S=%(test_regression)s " + \
@@ -899,7 +899,7 @@
                   "config_type": "tf-m_documents",
                   "codebase_root_dir": "tf-m",
                   "build_cmds": {"all": ["-DTFM_PLATFORM=mps2/an521 "
-                                         "-DCMAKE_TOOLCHAIN_FILE=%(_tfm_code_dir_)s/toolchain_GNUARM.cmake"
+                                         "-DTFM_TOOLCHAIN_FILE=%(_tfm_code_dir_)s/toolchain_GNUARM.cmake"
                                          "-DCMAKE_BUILD_TYPE=Debug "
                                          "%(_tbm_code_dir_)s/",
                                          "cmake --build ./ -- docs"]},
diff --git a/run-cppcheck.sh b/run-cppcheck.sh
index 0723204..66de5e7 100755
--- a/run-cppcheck.sh
+++ b/run-cppcheck.sh
@@ -80,7 +80,7 @@
 echo
 echo '******* Generating compile_commands.json ***************'
 echo
-generate_project $(fix_win_path $(get_full_path ./)) "./" "cppcheck" "-DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DTFM_PLATFORM=mps2/an521 -DCMAKE_TOOLCHAIN_FILE=toolchain_GNUARM.cmake"
+generate_project $(fix_win_path $(get_full_path ./)) "./" "cppcheck" "-DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DTFM_PLATFORM=mps2/an521 -DTFM_TOOLCHAIN_FILE=toolchain_GNUARM.cmake"
 
 #Enter the build directory
 bdir=$(make_build_dir_name "./" "cppcheck")