diff options
author | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2022-03-14 09:26:48 +0000 |
---|---|---|
committer | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2022-03-14 17:18:25 +0000 |
commit | c22e80e25521bdd291fdef9ba20194ce9d2a8544 (patch) | |
tree | b8ffe314220d4d04e84dbd6a240f77271c1e5e70 /scripts/cmake | |
parent | 1716efd0b35889b580276e27c8b6f661c9858cd0 (diff) | |
download | ml-embedded-evaluation-kit-c22e80e25521bdd291fdef9ba20194ce9d2a8544.tar.gz |
MLECO-2919: Restructuring to standardise HAL APIs
* LCD module component created (removed from individual
platform packs).
* retarget.c moved out into its own component that wraps
the uart module. It also have the native stub for
GetLine => paved the way for removing data_acq module
from profiles.
* shortened names for components' dir for npu and ta
* remove peripheral_memmap and peripheral_irqs headers
from platform_drivers.h. There should be no need for
these to be included in the top level now. These should
be private headers.
* cmsis_device moved in as a component.
* Pyenv created by set_up_default_resource.py will also
install packages that CMake's source generator needs.
TODO's:
* Remove timer from profiles (MLECO-3096)
Change-Id: I9d6ea2f4f291788f40a16ed507019563c8d7f205
Diffstat (limited to 'scripts/cmake')
-rw-r--r-- | scripts/cmake/source_gen_utils.cmake | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/scripts/cmake/source_gen_utils.cmake b/scripts/cmake/source_gen_utils.cmake index ccce7e7..cd2698c 100644 --- a/scripts/cmake/source_gen_utils.cmake +++ b/scripts/cmake/source_gen_utils.cmake @@ -258,13 +258,23 @@ endfunction() # outlined above. ############################################################################## 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) + else() + set(DEFAULT_VENV_DIR ${CMAKE_BINARY_DIR}/venv) + endif() + if (${CMAKE_HOST_WIN32}) -# windows python3 has python.exe + # Windows Python3 is python.exe set(PY_EXEC python) - set(PYTHON ${CMAKE_BINARY_DIR}/pyenv/Scripts/${PY_EXEC}) + set(PYTHON ${DEFAULT_VENV_DIR}/Scripts/${PY_EXEC}) else() set(PY_EXEC python3) - set(PYTHON ${CMAKE_BINARY_DIR}/pyenv/bin/${PY_EXEC}) + set(PYTHON ${DEFAULT_VENV_DIR}/bin/${PY_EXEC}) endif() set(PYTHON ${PYTHON} PARENT_SCOPE) @@ -276,7 +286,7 @@ function(setup_source_generator) message(STATUS "Configuring python environment at ${PYTHON}") execute_process( - COMMAND ${PY_EXEC} -m venv ${CMAKE_BINARY_DIR}/pyenv + COMMAND ${PY_EXEC} -m venv ${DEFAULT_VENV_DIR} RESULT_VARIABLE return_code ) if (NOT return_code STREQUAL "0") |