bolar_2 backup
This commit is contained in:
39
CMakeLists.txt
Normal file
39
CMakeLists.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
set(PROJECT_VER "2.0.0-dev")
|
||||
project(borla-firmware2 VERSION ${PROJECT_VER})
|
||||
|
||||
# ESP-SR creates its selected model image first. The Borla product WakeNet
|
||||
# model is private to this firmware, so inject it into that generated image
|
||||
# and repack without making firmware2 depend on the legacy firmware sources.
|
||||
idf_build_get_property(build_dir BUILD_DIR)
|
||||
set(pack_model_py
|
||||
"${CMAKE_SOURCE_DIR}/managed_components/espressif__esp-sr/model/pack_model.py")
|
||||
add_custom_command(
|
||||
OUTPUT "${build_dir}/srmodels/.borla_custom_done"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"${CMAKE_SOURCE_DIR}/model_data/wn9l_ni3hao3bo1le4"
|
||||
"${build_dir}/srmodels/wn9l_ni3hao3bo1le4"
|
||||
COMMAND python "${pack_model_py}"
|
||||
-m "${build_dir}/srmodels" -o srmodels.bin
|
||||
COMMAND ${CMAKE_COMMAND} -E touch
|
||||
"${build_dir}/srmodels/.borla_custom_done"
|
||||
DEPENDS
|
||||
"${build_dir}/srmodels/srmodels.bin"
|
||||
"${CMAKE_SOURCE_DIR}/model_data/wn9l_ni3hao3bo1le4/_MODEL_INFO_"
|
||||
"${CMAKE_SOURCE_DIR}/model_data/wn9l_ni3hao3bo1le4/wn9_data"
|
||||
"${CMAKE_SOURCE_DIR}/model_data/wn9l_ni3hao3bo1le4/wn9_index"
|
||||
WORKING_DIRECTORY "${build_dir}/srmodels"
|
||||
COMMENT "Injecting Borla WakeNet model"
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(
|
||||
firmware2_custom_wakeword ALL
|
||||
DEPENDS "${build_dir}/srmodels/.borla_custom_done")
|
||||
add_dependencies(firmware2_custom_wakeword srmodels_bin)
|
||||
add_dependencies(flash firmware2_custom_wakeword)
|
||||
Reference in New Issue
Block a user