summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKshitij Sisodia <kshitij.sisodia@arm.com>2024-05-16 09:15:12 +0100
committerKshitij Sisodia <kshitij.sisodia@arm.com>2024-05-16 13:54:41 +0100
commit72377a431847ea2037603e9dda88d0b6b39364ce (patch)
treefaeb279f70c62a53ba0ea0e19a8ab37cae3f47bf
parent755bcc5f78df8ca179990cc1490ce7167b032e23 (diff)
downloadml-embedded-evaluation-kit-72377a431847ea2037603e9dda88d0b6b39364ce.tar.gz
MLECO-4937: Adding top level MlekModule.cmake
For projects wrapping ml-embedded-eval-kit, this helper module file makes it easier to import some top level variables and to call into functions exposed by utility scripts as part of their env setup. Change-Id: I1cf8d2513776d653590871dc791c68349a38a884 Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
-rw-r--r--CMakeLists.txt52
-rw-r--r--MlekModule.cmake81
-rw-r--r--docs/sections/customizing.md2
-rw-r--r--scripts/cmake/configuration_options/cmsis_opts.cmake6
-rw-r--r--scripts/cmake/configuration_options/common_opts.cmake2
-rw-r--r--scripts/cmake/configuration_options/npu_opts.cmake4
-rw-r--r--scripts/cmake/platforms/mps3/build_configuration.cmake4
-rw-r--r--scripts/cmake/platforms/mps4/build_configuration.cmake4
-rw-r--r--scripts/cmake/platforms/native/build_configuration.cmake6
-rw-r--r--scripts/cmake/platforms/simple_platform/build_configuration.cmake4
-rw-r--r--scripts/cmake/source_gen_utils.cmake18
-rw-r--r--scripts/cmake/util_functions.cmake9
-rw-r--r--source/hal/source/components/stdout/CMakeLists.txt6
13 files changed, 116 insertions, 82 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 65119fd..0320448 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,54 +37,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_CXX_EXTENSIONS OFF)
-set(SCRIPTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/scripts)
-set(CMAKE_TOOLCHAIN_DIR ${SCRIPTS_DIR}/cmake/toolchains)
-set(DOWNLOAD_DEP_DIR ${CMAKE_BINARY_DIR}/dependencies)
-set(DEPENDENCY_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dependencies)
-set(CORE_PLATFORM_DIR ${DEPENDENCY_ROOT_DIR}/core-platform)
-
-set(RESOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/resources_downloaded
- CACHE PATH "Resources directory")
-set(HAL_PLATFORM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source/hal/source/platform)
-list(APPEND CMAKE_MODULE_PATH
- "${SCRIPTS_DIR}/cmake"
- "${SCRIPTS_DIR}/cmake/configuration_options"
- "${SCRIPTS_DIR}/cmake/timing_adapter")
-
-include(source_gen_utils)
-
-enable_testing()
-
-if (${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
- message(FATAL_ERROR "Source and build are in the same directory")
-else()
- message(STATUS "Source directory: ${CMAKE_SOURCE_DIR}")
- message(STATUS "Binary directory: ${CMAKE_BINARY_DIR}")
-endif()
-
-# Include common configuration options
-include(common_opts)
-
-# Check if the resources_downloaded needs update
-check_update_public_resources(${RESOURCES_DIR})
-
-add_platform_build_configuration(TARGET_PLATFORM ${TARGET_PLATFORM})
-
-set_platform_global_defaults()
-
-message(STATUS "Using CMAKE_TOOLCHAIN_FILE: ${CMAKE_TOOLCHAIN_FILE}")
-
-# Make sure the following options are defined before proceeding:
-assert_defined(LOG_LEVEL)
-assert_defined(TENSORFLOW_SRC_PATH)
-assert_defined(TARGET_PLATFORM)
-assert_defined(USE_CASE_BUILD)
-assert_defined(CPU_PROFILE_ENABLED)
-assert_defined(CMAKE_TOOLCHAIN_FILE)
-
-if(POLICY CMP0123)
- cmake_policy(SET CMP0123 NEW)
-endif()
+# Initialise global settings
+include("${CMAKE_CURRENT_SOURCE_DIR}/MlekModule.cmake")
project(arm_ml_embedded_evaluation_kit
VERSION 24.02.0
@@ -173,7 +127,7 @@ foreach(use_case ${USE_CASES})
# Executable application:
set(TARGET_NAME "ethos-u-${use_case}")
- set(DEFAULT_MODEL_DIR ${RESOURCES_DIR}/${use_case})
+ set(DEFAULT_MODEL_DIR ${MLEK_RESOURCES_DIR}/${use_case})
set(DEFAULT_TEST_DATA_DIR ${DEFAULT_MODEL_DIR})
set(SRC_GEN_DIR ${CMAKE_BINARY_DIR}/generated/${use_case}/src)
set(INC_GEN_DIR ${CMAKE_BINARY_DIR}/generated/${use_case}/include)
diff --git a/MlekModule.cmake b/MlekModule.cmake
new file mode 100644
index 0000000..887ee29
--- /dev/null
+++ b/MlekModule.cmake
@@ -0,0 +1,81 @@
+#----------------------------------------------------------------------------
+# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its
+# affiliates <open-source-office@arm.com>
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#----------------------------------------------------------------------------
+
+# For any CMake project wrapping ml-embedded-eval-kit, it should include this before
+# to get the default directory settings and set up the environment.
+include_guard(GLOBAL)
+
+# Variables used by all other scripts
+set(MLEK_SCRIPTS_DIR ${CMAKE_CURRENT_LIST_DIR}/scripts)
+set(MLEK_DEPENDENCY_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/dependencies)
+set(MLEK_RESOURCES_DIR ${CMAKE_CURRENT_LIST_DIR}/resources_downloaded)
+set(MLEK_HAL_PLATFORM_DIR ${CMAKE_CURRENT_LIST_DIR}/source/hal/source/platform)
+set(MLEK_DOWNLOAD_DEP_DIR ${CMAKE_BINARY_DIR}/dependencies)
+set(MLEK_CMAKE_TOOLCHAIN_DIR ${MLEK_SCRIPTS_DIR}/cmake/toolchains)
+set(MLEK_CORE_PLATFORM_DIR ${MLEK_DEPENDENCY_ROOT_DIR}/core-platform)
+
+# The list of directories where platform build configurations are searched for.
+# Any project including this file, should append to this list before inclusion
+# to allow searching additional directories for target configurations.
+list(APPEND MLEK_PLATFORM_BUILD_CONFIG_DIRS ${MLEK_SCRIPTS_DIR}/cmake/platforms)
+
+# Append to CMAKE_MODULE_PATH to allow top level scripts to find and include
+# utility functions.
+list(APPEND CMAKE_MODULE_PATH
+ "${MLEK_SCRIPTS_DIR}/cmake"
+ "${MLEK_SCRIPTS_DIR}/cmake/configuration_options"
+ "${MLEK_SCRIPTS_DIR}/cmake/timing_adapter")
+
+# Include source generator.
+include(source_gen_utils)
+
+# Enable testing - allows top level to add tests.
+enable_testing()
+
+# Check that the source and build directories are different.
+if (${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
+ message(FATAL_ERROR "Source and build are in the same directory")
+else()
+ message(STATUS "Source directory: ${CMAKE_SOURCE_DIR}")
+ message(STATUS "Binary directory: ${CMAKE_BINARY_DIR}")
+endif()
+
+# Include common configuration options.
+include(common_opts)
+
+# Check if the resources_downloaded needs update.
+check_update_public_resources(${MLEK_RESOURCES_DIR})
+
+# Find the platform's build configuration and then add it.
+add_platform_build_configuration(TARGET_PLATFORM ${TARGET_PLATFORM})
+set_platform_global_defaults()
+
+message(STATUS "Using CMAKE_TOOLCHAIN_FILE: ${CMAKE_TOOLCHAIN_FILE}")
+
+# Make sure the following options are defined before proceeding.
+assert_defined(LOG_LEVEL)
+assert_defined(TENSORFLOW_SRC_PATH)
+assert_defined(TARGET_PLATFORM)
+assert_defined(USE_CASE_BUILD)
+assert_defined(CPU_PROFILE_ENABLED)
+assert_defined(CMAKE_TOOLCHAIN_FILE)
+
+# Explicit policy definitions.
+if(POLICY CMP0123)
+ cmake_policy(SET CMP0123 NEW)
+endif()
diff --git a/docs/sections/customizing.md b/docs/sections/customizing.md
index 2a946aa..1a5e3ce 100644
--- a/docs/sections/customizing.md
+++ b/docs/sections/customizing.md
@@ -672,7 +672,7 @@ Platform build configuration script must have 2 functions:
The function `set_platform_global_defaults` must set `PLATFORM_DRIVERS_DIR` variable
```cmake
- set(PLATFORM_DRIVERS_DIR "${HAL_PLATFORM_DIR}/mps3" PARENT_SCOPE)
+ set(PLATFORM_DRIVERS_DIR "${MLEK_HAL_PLATFORM_DIR}/mps3" PARENT_SCOPE)
```
location of the platform library sources.
diff --git a/scripts/cmake/configuration_options/cmsis_opts.cmake b/scripts/cmake/configuration_options/cmsis_opts.cmake
index 86eedbc..8da8c05 100644
--- a/scripts/cmake/configuration_options/cmsis_opts.cmake
+++ b/scripts/cmake/configuration_options/cmsis_opts.cmake
@@ -27,15 +27,15 @@ message(STATUS "Assessing CMSIS configuration options...")
USER_OPTION(CMSIS_SRC_PATH
"Path to CMSIS-5 sources"
- "${DEPENDENCY_ROOT_DIR}/cmsis"
+ "${MLEK_DEPENDENCY_ROOT_DIR}/cmsis"
PATH)
USER_OPTION(CMSIS_DSP_SRC_PATH
"Path to CMSIS-5 DSP sources"
- "${DEPENDENCY_ROOT_DIR}/cmsis-dsp"
+ "${MLEK_DEPENDENCY_ROOT_DIR}/cmsis-dsp"
PATH)
USER_OPTION(CMSIS_NN_SRC_PATH
"Path to CMSIS-5 NN sources"
- "${DEPENDENCY_ROOT_DIR}/cmsis-nn"
+ "${MLEK_DEPENDENCY_ROOT_DIR}/cmsis-nn"
PATH)
diff --git a/scripts/cmake/configuration_options/common_opts.cmake b/scripts/cmake/configuration_options/common_opts.cmake
index 52c254e..2c620c2 100644
--- a/scripts/cmake/configuration_options/common_opts.cmake
+++ b/scripts/cmake/configuration_options/common_opts.cmake
@@ -33,7 +33,7 @@ USER_OPTION(LOG_LEVEL "Log level for the application"
## TensorFlow options
USER_OPTION(TENSORFLOW_SRC_PATH "Path to the root of the TensorFlow Lite Micro sources"
- "${DEPENDENCY_ROOT_DIR}/tensorflow"
+ "${MLEK_DEPENDENCY_ROOT_DIR}/tensorflow"
PATH)
USER_OPTION(TENSORFLOW_LITE_MICRO_BUILD_TYPE "TensorFlow Lite Mirco build type (release/debug etc.)"
diff --git a/scripts/cmake/configuration_options/npu_opts.cmake b/scripts/cmake/configuration_options/npu_opts.cmake
index dc0123b..c947ac9 100644
--- a/scripts/cmake/configuration_options/npu_opts.cmake
+++ b/scripts/cmake/configuration_options/npu_opts.cmake
@@ -35,13 +35,13 @@ message(STATUS "Assessing NPU configuration options...")
USER_OPTION(ETHOS_U_NPU_TIMING_ADAPTER_SRC_PATH
"Path to Ethos-U NPU timing adapter sources"
- "${DEPENDENCY_ROOT_DIR}/core-platform/drivers/timing_adapter"
+ "${MLEK_DEPENDENCY_ROOT_DIR}/core-platform/drivers/timing_adapter"
PATH
)
USER_OPTION(ETHOS_U_NPU_DRIVER_SRC_PATH
"Path to Ethos-U NPU core driver sources"
- "${DEPENDENCY_ROOT_DIR}/core-driver"
+ "${MLEK_DEPENDENCY_ROOT_DIR}/core-driver"
PATH
)
diff --git a/scripts/cmake/platforms/mps3/build_configuration.cmake b/scripts/cmake/platforms/mps3/build_configuration.cmake
index 8613f50..c29531f 100644
--- a/scripts/cmake/platforms/mps3/build_configuration.cmake
+++ b/scripts/cmake/platforms/mps3/build_configuration.cmake
@@ -43,7 +43,7 @@ function(set_platform_global_defaults)
endif()
if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)
- set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_DIR}/bare-metal-gcc.cmake
+ set(CMAKE_TOOLCHAIN_FILE ${MLEK_CMAKE_TOOLCHAIN_DIR}/bare-metal-gcc.cmake
CACHE FILEPATH "Toolchain file")
endif()
@@ -56,7 +56,7 @@ function(set_platform_global_defaults)
endif()
set(LINKER_SCRIPT_NAME "mps3-${TARGET_SUBSYSTEM}" PARENT_SCOPE)
- set(PLATFORM_DRIVERS_DIR "${HAL_PLATFORM_DIR}/mps3" PARENT_SCOPE)
+ set(PLATFORM_DRIVERS_DIR "${MLEK_HAL_PLATFORM_DIR}/mps3" PARENT_SCOPE)
endfunction()
diff --git a/scripts/cmake/platforms/mps4/build_configuration.cmake b/scripts/cmake/platforms/mps4/build_configuration.cmake
index 8230c1f..6ea34ef 100644
--- a/scripts/cmake/platforms/mps4/build_configuration.cmake
+++ b/scripts/cmake/platforms/mps4/build_configuration.cmake
@@ -43,7 +43,7 @@ function(set_platform_global_defaults)
endif()
if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)
- set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_DIR}/bare-metal-gcc.cmake
+ set(CMAKE_TOOLCHAIN_FILE ${MLEK_CMAKE_TOOLCHAIN_DIR}/bare-metal-gcc.cmake
CACHE FILEPATH "Toolchain file")
endif()
@@ -56,7 +56,7 @@ function(set_platform_global_defaults)
endif()
set(LINKER_SCRIPT_NAME "mps4-${TARGET_SUBSYSTEM}" PARENT_SCOPE)
- set(PLATFORM_DRIVERS_DIR "${HAL_PLATFORM_DIR}/mps4" PARENT_SCOPE)
+ set(PLATFORM_DRIVERS_DIR "${MLEK_HAL_PLATFORM_DIR}/mps4" PARENT_SCOPE)
endfunction()
diff --git a/scripts/cmake/platforms/native/build_configuration.cmake b/scripts/cmake/platforms/native/build_configuration.cmake
index 0519ec1..81e572e 100644
--- a/scripts/cmake/platforms/native/build_configuration.cmake
+++ b/scripts/cmake/platforms/native/build_configuration.cmake
@@ -18,11 +18,11 @@
function(set_platform_global_defaults)
message(STATUS "Platform: Native (Linux based x86_64/aarch64 system)")
if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)
- set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_DIR}/native-gcc.cmake
+ set(CMAKE_TOOLCHAIN_FILE ${MLEK_CMAKE_TOOLCHAIN_DIR}/native-gcc.cmake
CACHE FILEPATH "Toolchain file")
endif()
- set(PLATFORM_DRIVERS_DIR "${HAL_PLATFORM_DIR}/native" PARENT_SCOPE)
- set(TEST_TPIP ${DOWNLOAD_DEP_DIR}/test)
+ set(PLATFORM_DRIVERS_DIR "${MLEK_HAL_PLATFORM_DIR}/native" PARENT_SCOPE)
+ set(TEST_TPIP ${MLEK_DOWNLOAD_DEP_DIR}/test)
file(MAKE_DIRECTORY ${TEST_TPIP})
set(TEST_TPIP_INCLUDE ${TEST_TPIP}/include)
diff --git a/scripts/cmake/platforms/simple_platform/build_configuration.cmake b/scripts/cmake/platforms/simple_platform/build_configuration.cmake
index 07c9e05..72e1260 100644
--- a/scripts/cmake/platforms/simple_platform/build_configuration.cmake
+++ b/scripts/cmake/platforms/simple_platform/build_configuration.cmake
@@ -24,12 +24,12 @@ function(set_platform_global_defaults)
include(cmsis_opts)
if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)
- set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_DIR}/bare-metal-gcc.cmake
+ set(CMAKE_TOOLCHAIN_FILE ${MLEK_CMAKE_TOOLCHAIN_DIR}/bare-metal-gcc.cmake
CACHE FILEPATH "Toolchain file")
endif()
set(LINKER_SCRIPT_NAME "simple_platform" PARENT_SCOPE)
- set(PLATFORM_DRIVERS_DIR "${HAL_PLATFORM_DIR}/simple" PARENT_SCOPE)
+ set(PLATFORM_DRIVERS_DIR "${MLEK_HAL_PLATFORM_DIR}/simple" PARENT_SCOPE)
endfunction()
function(platform_custom_post_build)
diff --git a/scripts/cmake/source_gen_utils.cmake b/scripts/cmake/source_gen_utils.cmake
index 3406615..b60c85e 100644
--- a/scripts/cmake/source_gen_utils.cmake
+++ b/scripts/cmake/source_gen_utils.cmake
@@ -32,7 +32,7 @@ function(generate_images_code input_dir src_out hdr_out img_size)
message(STATUS "Generating image files from ${input_dir_abs}")
execute_process(
- COMMAND ${PYTHON} ${SCRIPTS_DIR}/py/gen_rgb_cpp.py
+ COMMAND ${PYTHON} ${MLEK_SCRIPTS_DIR}/py/gen_rgb_cpp.py
--image_path ${input_dir_abs}
--source_folder_path ${src_out_abs}
--header_folder_path ${hdr_out_abs}
@@ -60,7 +60,7 @@ function(generate_audio_code input_dir src_out hdr_out s_rate_opt mono_opt off_o
message(STATUS "Generating audio files from ${input_dir_abs}")
execute_process(
- COMMAND ${PYTHON} ${SCRIPTS_DIR}/py/gen_audio_cpp.py
+ COMMAND ${PYTHON} ${MLEK_SCRIPTS_DIR}/py/gen_audio_cpp.py
--audio_path ${input_dir_abs}
--source_folder_path ${src_out_abs}
--header_folder_path ${hdr_out_abs}
@@ -89,7 +89,7 @@ function(generate_default_input_code hdr_out)
message(STATUS "Generating default input files")
execute_process(
- COMMAND ${PYTHON} ${SCRIPTS_DIR}/py/gen_default_input_cpp.py
+ COMMAND ${PYTHON} ${MLEK_SCRIPTS_DIR}/py/gen_default_input_cpp.py
--header_folder_path ${hdr_out_abs}
RESULT_VARIABLE return_code
)
@@ -133,7 +133,7 @@ function(generate_tflite_code)
endforeach()
execute_process(
- COMMAND ${PYTHON} ${SCRIPTS_DIR}/py/gen_model_cpp.py
+ COMMAND ${PYTHON} ${MLEK_SCRIPTS_DIR}/py/gen_model_cpp.py
--tflite_path ${ABS_MODEL_PATH}
--output_dir ${ABS_DESTINATION} ${py_arg_exp}
RESULT_VARIABLE return_code
@@ -176,7 +176,7 @@ function(generate_labels_code)
message(STATUS "writing to ${hdr_out_abs}/${PARSED_OUTPUT_FILENAME}.hpp and ${src_out_abs}/${PARSED_OUTPUT_FILENAME}.cc")
execute_process(
- COMMAND ${PYTHON} ${SCRIPTS_DIR}/py/gen_labels_cpp.py
+ COMMAND ${PYTHON} ${MLEK_SCRIPTS_DIR}/py/gen_labels_cpp.py
--labels_file ${input_abs}
--source_folder_path ${src_out_abs}
--header_folder_path ${hdr_out_abs}
@@ -241,7 +241,7 @@ function(generate_test_data_code)
message(STATUS "Generating test ifm and ofm files from ${input_dir_abs}")
execute_process(
- COMMAND ${PYTHON} ${SCRIPTS_DIR}/py/gen_test_data_cpp.py
+ COMMAND ${PYTHON} ${MLEK_SCRIPTS_DIR}/py/gen_test_data_cpp.py
--data_folder_path ${input_dir_abs}
--source_folder_path ${src_out_abs}
--header_folder_path ${hdr_out_abs}
@@ -265,8 +265,8 @@ function(setup_source_generator)
# If a virtual env has been created in the resources_downloaded directory,
# use it for source generator. Else, fall back to creating a virtual env
# in the current build directory.
- if (EXISTS ${RESOURCES_DIR}/env)
- set(DEFAULT_VENV_DIR ${RESOURCES_DIR}/env)
+ if (EXISTS ${MLEK_RESOURCES_DIR}/env)
+ set(DEFAULT_VENV_DIR ${MLEK_RESOURCES_DIR}/env)
else()
set(DEFAULT_VENV_DIR ${CMAKE_BINARY_DIR}/venv)
endif()
@@ -326,7 +326,7 @@ function(setup_source_generator)
endif ()
execute_process(
- COMMAND ${PYTHON} -m pip install -r ${SCRIPTS_DIR}/py/requirements.txt
+ COMMAND ${PYTHON} -m pip install -r ${MLEK_SCRIPTS_DIR}/py/requirements.txt
RESULT_VARIABLE return_code
)
if (NOT return_code EQUAL "0")
diff --git a/scripts/cmake/util_functions.cmake b/scripts/cmake/util_functions.cmake
index 6966963..102c598 100644
--- a/scripts/cmake/util_functions.cmake
+++ b/scripts/cmake/util_functions.cmake
@@ -183,12 +183,11 @@ function(add_platform_build_configuration)
set(oneValueArgs TARGET_PLATFORM)
cmake_parse_arguments(PARSED "" "${oneValueArgs}" "" ${ARGN} )
message(STATUS "Searching for ${PARSED_TARGET_PLATFORM} build configuration")
- list(APPEND PLATFORM_BUILD_CONFIG_DIRS ${SCRIPTS_DIR}/cmake/platforms)
FIND_PATH(PLATFORM_BUILD_CONFIG
NAMES build_configuration.cmake
PATH_SUFFIXES ${PARSED_TARGET_PLATFORM}
- PATHS ${PLATFORM_BUILD_CONFIG_DIRS}
+ PATHS ${MLEK_PLATFORM_BUILD_CONFIG_DIRS}
)
message(STATUS "Found build configuration: ${PLATFORM_BUILD_CONFIG}")
@@ -199,9 +198,9 @@ function(check_update_public_resources resource_downloaded_dir)
string(JOIN "/" FILE_URL ${resource_downloaded_dir})
execute_process(
- COMMAND python3 ${SCRIPTS_DIR}/py/check_update_resources_downloaded.py
+ COMMAND python3 ${MLEK_SCRIPTS_DIR}/py/check_update_resources_downloaded.py
--resource_downloaded_dir ${resource_downloaded_dir}
- --setup_script_path ${SCRIPTS_DIR}/../set_up_default_resources.py
+ --setup_script_path ${MLEK_SCRIPTS_DIR}/../set_up_default_resources.py
RESULT_VARIABLE return_code
)
if (NOT return_code EQUAL "0")
@@ -228,4 +227,4 @@ function(set_input_file_path_user_option file_extension use_case)
${FIRST_INPUT_FILE}
PATH_OR_FILE)
endif()
-endfunction() \ No newline at end of file
+endfunction()
diff --git a/source/hal/source/components/stdout/CMakeLists.txt b/source/hal/source/components/stdout/CMakeLists.txt
index 9e70eab..55c0624 100644
--- a/source/hal/source/components/stdout/CMakeLists.txt
+++ b/source/hal/source/components/stdout/CMakeLists.txt
@@ -46,8 +46,8 @@ if (STDOUT_RETARGET)
# Check prerequisites
## Core platform directory is required to add the UART library project.
- if (NOT DEFINED CORE_PLATFORM_DIR)
- message(FATAL_ERROR "CORE_PLATFORM_DIR undefined")
+ if (NOT DEFINED MLEK_CORE_PLATFORM_DIR)
+ message(FATAL_ERROR "MLEK_CORE_PLATFORM_DIR undefined")
endif()
## UART0_BASE is the base address for UART configuration. The platform
@@ -57,7 +57,7 @@ if (STDOUT_RETARGET)
endif()
## Platform component: UART
- add_subdirectory(${CORE_PLATFORM_DIR}/drivers/uart ${CMAKE_BINARY_DIR}/uart)
+ add_subdirectory(${MLEK_CORE_PLATFORM_DIR}/drivers/uart ${CMAKE_BINARY_DIR}/uart)
## Component sources - public
target_sources(${STDOUT_COMPONENT_CMSDK}