Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/host build #538

Merged
merged 4 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions modules/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@


## Add frameworks
add_subdirectory(core)
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)
add_subdirectory(voice)

if(${CMAKE_SYSTEM_NAME} STREQUAL XCORE_XS3A)
## Need to guard so host targets will not be built
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)

2 changes: 1 addition & 1 deletion modules/core
32 changes: 16 additions & 16 deletions tools/ci/build_host_apps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '******************************************************'
Expand All @@ -17,19 +24,12 @@ echo '******************************************************'

(cd ${path}; rm -rf build_host)
(cd ${path}; mkdir -p build_host)
(cd ${path}/build_host; log_errors cmake ../ ; log_errors make -j)

# copy example_freertos_device_control_host to dist
name=device_control/host
make_target=example_freertos_device_control_host
(cd ${path}/build_host; cp examples/freertos/${name}/${make_target} ${DIST_DIR})

# copy fatfs_mkimage to dist
name=fatfs/host
make_target=fatfs_mkimage
(cd ${path}/build_host; cp modules/rtos/modules/sw_services/${name}/${make_target} ${DIST_DIR})

# copy xscope_host_endpoint to dist
name=xscope_fileio/host
make_target=xscope_host_endpoint
(cd ${path}/build_host; cp modules/xscope_fileio/${name}/${make_target} ${DIST_DIR})
(cd ${path}/build_host; log_errors cmake ../)

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