Build: Refine control on TF-M dependencies

This patch makes the following changes:
1. Rename "QCBOR" to "qcbor" in CI workspace to keep align with the one
   defined in TF-M CMake system.
2. Define "QA_TOOLS_PROJECT" in clone.sh for a better format.
3. Set local path of tf-m-extras and in build command to avoid the
   redundant git clone during the build stage.
4. Download FreeRTOS kernel by CMake during the build stage. Because
   there are only 3 build configs depend on this repo.

Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: Ib63659e4287b027810d973546f776a7aa0fbf0bd
diff --git a/build_helper/build_helper_config_maps.py b/build_helper/build_helper_config_maps.py
index e8b12d6..d6a0c65 100644
--- a/build_helper/build_helper_config_maps.py
+++ b/build_helper/build_helper_config_maps.py
@@ -105,13 +105,9 @@
                                 "-DCONFIG_TFM_ENABLE_MVE=ON -DCONFIG_TFM_SPM_BACKEND=IPC "
                                 "-DPLATFORM_HAS_FIRMWARE_UPDATE_SUPPORT=ON -DTFM_PARTITION_PLATFORM=ON "
                                 "-DTFM_PARTITION_CRYPTO=ON -DTFM_PARTITION_INTERNAL_TRUSTED_STORAGE=ON "
-                                "-DTFM_PARTITION_PROTECTED_STORAGE=ON  -DMCUBOOT_CONFIRM_IMAGE=ON "
-                                "-DFREERTOS_KERNEL_SRC_PATH=%(codebase_root_dir)s/../freertos-kernel"),
-    "EXAMPLE_DMA350_TRIGGER"  : ("-DNS_EVALUATION_APP_PATH=%(codebase_root_dir)s/../tf-m-extras/examples/corstone310_fvp_dma/triggering_example "
-                                "-DFREERTOS_KERNEL_SRC_PATH=%(codebase_root_dir)s/../freertos-kernel"),
+                                "-DTFM_PARTITION_PROTECTED_STORAGE=ON  -DMCUBOOT_CONFIRM_IMAGE=ON "),
+    "EXAMPLE_DMA350_TRIGGER"  : ("-DNS_EVALUATION_APP_PATH=%(codebase_root_dir)s/../tf-m-extras/examples/corstone310_fvp_dma/triggering_example "),
     "EXAMPLE_DMA350_NS"       : ("-DDEFAULT_NS_SCATTER=OFF -DPLATFORM_SVC_HANDLERS=ON "
-                                "-DNS_EVALUATION_APP_PATH=%(codebase_root_dir)s/../tf-m-extras/examples/corstone310_fvp_dma/dma350_ns "
-                                "-DFREERTOS_KERNEL_SRC_PATH=%(codebase_root_dir)s/../freertos-kernel"),
+                                "-DNS_EVALUATION_APP_PATH=%(codebase_root_dir)s/../tf-m-extras/examples/corstone310_fvp_dma/dma350_ns "),
     "EXAMPLE_DMA350_S"        : "-DEXTRA_S_TEST_SUITE_PATH=%(codebase_root_dir)s/../tf-m-extras/examples/corstone310_fvp_dma/dma350_s"
-
 }
diff --git a/build_helper/build_helper_configs.py b/build_helper/build_helper_configs.py
index 4acfc43..44643cf 100755
--- a/build_helper/build_helper_configs.py
+++ b/build_helper/build_helper_configs.py
@@ -59,7 +59,8 @@
         "-DMBEDCRYPTO_PATH=%(codebase_root_dir)s/../mbedtls " + \
         "-DPSA_ARCH_TESTS_PATH=%(codebase_root_dir)s/../psa-arch-tests " + \
         "-DMCUBOOT_PATH=%(codebase_root_dir)s/../mcuboot " + \
-        "-DQCBOR_PATH=%(codebase_root_dir)s/../QCBOR " + \
+        "-DQCBOR_PATH=%(codebase_root_dir)s/../qcbor " + \
+        "-DTFM_EXTRAS_REPO_PATH=%(codebase_root_dir)s/../tf-m-extras " + \
         "%(codebase_root_dir)s",
 
     "set_compiler_path": "export PATH=$PATH:$%(compiler)s_PATH",