MLECO-2921: Minor changes for HAL projects

Ensuring individual HAL projects can be configured without the
need to be wrapped. Tests can now be added to build individual
components and check for any unintended dependencies creeping
in.

Change-Id: I057699c3c3cc0fc280615db30a25fbe4c28ae8ea
Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
diff --git a/source/hal/source/components/npu/CMakeLists.txt b/source/hal/source/components/npu/CMakeLists.txt
index 9d0bf42..48f21bc 100644
--- a/source/hal/source/components/npu/CMakeLists.txt
+++ b/source/hal/source/components/npu/CMakeLists.txt
@@ -40,6 +40,15 @@
 set(ETHOS_U_PRIV_ENABLED "1"             CACHE STRING "Ethos-U NPU Privilege enable")
 
 # Driver needs to know what MAC configuration to build for.
+if (NOT DEFINED ETHOS_U_NPU_CONFIG_ID)
+    set(ETHOS_U_NPU_CONFIG_ID "H128")
+endif()
+
+## Memory mode target definition
+if (NOT DEFINED ETHOS_U_NPU_ID)
+    set(ETHOS_U_NPU_ID U55)
+endif()
+
 if(ETHOS_U_NPU_CONFIG_ID MATCHES "^[A-Z]([0-9]+$)")
     set(ETHOSU_MACS ${CMAKE_MATCH_1})
 else()
@@ -48,11 +57,6 @@
 set(ETHOSU_TARGET_NPU_CONFIG
         "ethos-${ETHOS_U_NPU_ID}-${ETHOSU_MACS}" CACHE STRING "Target Ethos-U configuration for driver.")
 
-## Memory mode target definition
-if (NOT DEFINED ETHOS_U_NPU_ID)
-    set(ETHOS_U_NPU_ID U55)
-endif()
-
 if (NOT DEFINED ETHOS_U_NPU_MEMORY_MODE)
     set(ETHOS_U_NPU_MEMORY_MODE Shared_Sram)
 endif()
@@ -80,6 +84,14 @@
 # Include the build for Ethos-U driver
 add_subdirectory(${ETHOS_U_NPU_DRIVER_SRC_PATH} ${CMAKE_BINARY_DIR}/ethos-u-driver)
 
+## Logging utilities:
+if (NOT TARGET log)
+    if (NOT DEFINED LOG_PROJECT_DIR)
+        message(FATAL_ERROR "LOG_PROJECT_DIR needs to be defined.")
+    endif()
+    add_subdirectory(${LOG_PROJECT_DIR} ${CMAKE_BINARY_DIR}/log)
+endif()
+
 # For Ethos-U driver, we need to override the default region configs
 # Region numbers are decided by Vela and they do not need to conform to set rules.
 # Traditionally they have been used as: