MLECO-2948: Minor refactoring for platform modules.

Reducing dependency on cmsis-device sources as these will
be removed under MLECO-2944. Also, starting to refactor
to allow HAL to drop NPU and TA init routines - this will
happen in future CRs.

Added platform driver for native, and subsequent patches
will attempt to get rid of the HAL "profile" specific
sources and allow platform stub implementations at a level
below HAL. This will allow platforms drivers to only
override the range of functions that they actually want to
implement and will fall back on stubs for the rest. In this
CR only "utils" have been removed.

Change-Id: I09b4a28e20847a07a956c818c6f47c74aab89063
diff --git a/source/hal/CMakeLists.txt b/source/hal/CMakeLists.txt
index ea19de5..0d844b2 100644
--- a/source/hal/CMakeLists.txt
+++ b/source/hal/CMakeLists.txt
@@ -43,8 +43,7 @@
 target_include_directories(${HAL_TARGET}
     PUBLIC
     include
-    ${PLATFORM_PROFILE_DIR}/timer/include
-    ${PLATFORM_PROFILE_DIR}/utils/include)
+    ${PLATFORM_PROFILE_DIR}/timer/include)
 
 ## Common sources for all profiles
 target_sources(${HAL_TARGET}
@@ -52,8 +51,7 @@
     hal.c
     ${PLATFORM_PROFILE_DIR}/data_presentation/data_psn.c
     ${PLATFORM_PROFILE_DIR}/data_acquisition/data_acq.c
-    ${PLATFORM_PROFILE_DIR}/timer/platform_timer.c
-    ${PLATFORM_PROFILE_DIR}/utils/system_init.c)
+    ${PLATFORM_PROFILE_DIR}/timer/platform_timer.c)
 
 if (DEFINED VERIFY_TEST_OUTPUT)
     message(STATUS "Test output verification flag is: ${VERIFY_TEST_OUTPUT}")
@@ -61,13 +59,14 @@
         VERIFY_TEST_OUTPUT=${VERIFY_TEST_OUTPUT})
 endif ()
 
+if (NOT DEFINED PLATFORM_DRIVERS_DIR)
+    message(FATAL_ERROR "PLATFORM_DRIVERS_DIR need to be defined for this target")
+endif()
+
+
 ############################ bare-metal profile #############################
 if (PLATFORM_PROFILE STREQUAL bare-metal)
 
-    if (NOT DEFINED PLATFORM_DRIVERS_DIR)
-        message(FATAL_ERROR "PLATFORM_DRIVERS_DIR need to be defined for this target")
-    endif()
-
     ## Additional include directories - public
     target_include_directories(${HAL_TARGET}
         PUBLIC
@@ -96,15 +95,6 @@
     # Add dependencies for platform_driver first, in case they are needed by it.
     add_subdirectory(cmsis_device ${CMAKE_BINARY_DIR}/cmsis_device)
 
-    # Add platform-drivers target
-    add_subdirectory(${PLATFORM_DRIVERS_DIR} ${CMAKE_BINARY_DIR}/platform_driver)
-
-    # Link time library targets:
-    target_link_libraries(${HAL_TARGET}
-        PUBLIC
-        log
-        platform-drivers)
-
     # If Ethos-U is enabled, we need the driver library too
     if (ETHOS_U_NPU_ENABLED)
 
@@ -172,6 +162,7 @@
 
 ############################   native profile   #############################
 elseif (PLATFORM_PROFILE STREQUAL native)
+
     ## Additional include directories - private
     target_include_directories(${HAL_TARGET}
         PRIVATE
@@ -187,13 +178,17 @@
         PUBLIC
         PLATFORM_HAL=PLATFORM_UNKNOWN_LINUX_OS
         ACTIVATION_BUF_SRAM_SZ=0)
-
-    target_link_libraries(${HAL_TARGET}
-        PUBLIC
-        log)
-
 endif()
 
+# Add platform-drivers target
+add_subdirectory(${PLATFORM_DRIVERS_DIR} ${CMAKE_BINARY_DIR}/platform_driver)
+
+# Link time library targets:
+target_link_libraries(${HAL_TARGET}
+    PUBLIC
+    log
+    platform-drivers)
+
 # Display status:
 message(STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR})
 message(STATUS "*******************************************************")