From d6157e06b78ddf971794aacbf8d528a7add655d4 Mon Sep 17 00:00:00 2001 From: keithm-xmos <35048036+keithm-xmos@users.noreply.github.com> Date: Tue, 18 Oct 2022 22:26:57 -0400 Subject: [PATCH 1/4] updated core module --- modules/core | 2 +- tools/ci/build_host_apps.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/core b/modules/core index 601e574b..aff12cbd 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit 601e574b1baaa3aa6c64ec78543c3cc9ad2d23d4 +Subproject commit aff12cbdb549caaae4d0c514d0aa98fe9e9ff9dd diff --git a/tools/ci/build_host_apps.sh b/tools/ci/build_host_apps.sh index 5f2de0cc..0e8f4fdf 100755 --- a/tools/ci/build_host_apps.sh +++ b/tools/ci/build_host_apps.sh @@ -17,7 +17,8 @@ echo '******************************************************' (cd ${path}; rm -rf build_host) (cd ${path}; mkdir -p build_host) -(cd ${path}/build_host; log_errors cmake ../ ; log_errors make -j) +#(cd ${path}/build_host; log_errors cmake ../ ; log_errors make -j) +(cd ${path}/build_host; cmake ../ ; make) # copy example_freertos_device_control_host to dist name=device_control/host From 11b078f7065f7b8d234550b1b57699b3489d09a5 Mon Sep 17 00:00:00 2001 From: keithm-xmos <35048036+keithm-xmos@users.noreply.github.com> Date: Tue, 18 Oct 2022 23:04:03 -0400 Subject: [PATCH 2/4] updated host build script --- modules/core | 2 +- tools/ci/build_host_apps.sh | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/core b/modules/core index aff12cbd..1983b117 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit aff12cbdb549caaae4d0c514d0aa98fe9e9ff9dd +Subproject commit 1983b1173333d6bde099e09a21bc3f83ef70e5c6 diff --git a/tools/ci/build_host_apps.sh b/tools/ci/build_host_apps.sh index 0e8f4fdf..abc31254 100755 --- a/tools/ci/build_host_apps.sh +++ b/tools/ci/build_host_apps.sh @@ -17,20 +17,22 @@ echo '******************************************************' (cd ${path}; rm -rf build_host) (cd ${path}; mkdir -p build_host) -#(cd ${path}/build_host; log_errors cmake ../ ; log_errors make -j) -(cd ${path}/build_host; cmake ../ ; make) +(cd ${path}/build_host; log_errors cmake ../) -# copy example_freertos_device_control_host to dist +# example_freertos_device_control_host name=device_control/host make_target=example_freertos_device_control_host +(cd ${path}/build_host; log_errors make ${make_target} -j) (cd ${path}/build_host; cp examples/freertos/${name}/${make_target} ${DIST_DIR}) -# copy fatfs_mkimage to dist +# fatfs_mkimage name=fatfs/host make_target=fatfs_mkimage +(cd ${path}/build_host; log_errors make ${make_target} -j) (cd ${path}/build_host; cp modules/rtos/modules/sw_services/${name}/${make_target} ${DIST_DIR}) -# copy xscope_host_endpoint to dist +# xscope_host_endpoint name=xscope_fileio/host make_target=xscope_host_endpoint +(cd ${path}/build_host; log_errors make ${make_target} -j) (cd ${path}/build_host; cp modules/xscope_fileio/${name}/${make_target} ${DIST_DIR}) From 7b04973b2f7e7f1cefe90efa1276fe5f18bf1546 Mon Sep 17 00:00:00 2001 From: keithm-xmos <35048036+keithm-xmos@users.noreply.github.com> Date: Tue, 18 Oct 2022 23:36:12 -0400 Subject: [PATCH 3/4] build_host_apps.sh now iterates array --- modules/CMakeLists.txt | 17 ++++++++++------- tools/ci/build_host_apps.sh | 31 ++++++++++++++----------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 6ccc5220..0d4ce267 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -1,15 +1,18 @@ ## Add frameworks -add_subdirectory(core) add_subdirectory(io) add_subdirectory(rtos) -add_subdirectory(voice) + +if(${CMAKE_SYSTEM_NAME} STREQUAL XCORE_XS3A) + ## Need to guard so host targets will not be built + add_subdirectory(core) + add_subdirectory(voice) + + ## The following alias is added to support in intermediate version of fwk_voick + ## This can be removed once fwk_voice is updated to use the new, core::lib_tflite_micro alias + add_library(sdk::inferencing::lib_tflite_micro ALIAS inferencing_tflite_micro) +endif() ## Add additional modules add_subdirectory(sample_rate_conversion) add_subdirectory(xscope_fileio) - -## The following alias is added to support in intermediate version of fwk_voick -## This can be removed once fwk_voice is updated to use the new, core::lib_tflite_micro alias -add_library(sdk::inferencing::lib_tflite_micro ALIAS inferencing_tflite_micro) - diff --git a/tools/ci/build_host_apps.sh b/tools/ci/build_host_apps.sh index abc31254..489f8354 100755 --- a/tools/ci/build_host_apps.sh +++ b/tools/ci/build_host_apps.sh @@ -9,6 +9,13 @@ source ${XCORE_SDK_ROOT}/tools/ci/helper_functions.sh DIST_DIR=${XCORE_SDK_ROOT}/dist_host mkdir -p ${DIST_DIR} +# row format is: "target copy_path" +applications=( + "example_freertos_device_control_host examples/freertos/device_control/host" + "fatfs_mkimage modules/rtos/modules/sw_services/fatfs/host" + "xscope_host_endpoint modules/xscope_fileio/xscope_fileio/host" +) + # perform builds path="${XCORE_SDK_ROOT}" echo '******************************************************' @@ -19,20 +26,10 @@ echo '******************************************************' (cd ${path}; mkdir -p build_host) (cd ${path}/build_host; log_errors cmake ../) -# example_freertos_device_control_host -name=device_control/host -make_target=example_freertos_device_control_host -(cd ${path}/build_host; log_errors make ${make_target} -j) -(cd ${path}/build_host; cp examples/freertos/${name}/${make_target} ${DIST_DIR}) - -# fatfs_mkimage -name=fatfs/host -make_target=fatfs_mkimage -(cd ${path}/build_host; log_errors make ${make_target} -j) -(cd ${path}/build_host; cp modules/rtos/modules/sw_services/${name}/${make_target} ${DIST_DIR}) - -# xscope_host_endpoint -name=xscope_fileio/host -make_target=xscope_host_endpoint -(cd ${path}/build_host; log_errors make ${make_target} -j) -(cd ${path}/build_host; cp modules/xscope_fileio/${name}/${make_target} ${DIST_DIR}) +for ((i = 0; i < ${#applications[@]}; i += 1)); do + read -ra FIELDS <<< ${applications[i]} + target="${FIELDS[0]}" + copy_path="${FIELDS[1]}" + (cd ${path}/build_host; log_errors make ${target} -j) + (cd ${path}/build_host; cp ${copy_path}/${target} ${DIST_DIR}) +done From 35b741bed5730b05f68c66ac8424945b2d11d15a Mon Sep 17 00:00:00 2001 From: keithm-xmos <35048036+keithm-xmos@users.noreply.github.com> Date: Tue, 18 Oct 2022 23:43:20 -0400 Subject: [PATCH 4/4] fixed module include order --- modules/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 0d4ce267..c4e1a6b9 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -1,11 +1,16 @@ + ## Add frameworks +if(${CMAKE_SYSTEM_NAME} STREQUAL XCORE_XS3A) + ## Need to guard so host targets will not be built + add_subdirectory(core) +endif() + add_subdirectory(io) add_subdirectory(rtos) if(${CMAKE_SYSTEM_NAME} STREQUAL XCORE_XS3A) ## Need to guard so host targets will not be built - add_subdirectory(core) add_subdirectory(voice) ## The following alias is added to support in intermediate version of fwk_voick