bolar_2 backup
This commit is contained in:
183
main/CMakeLists.txt
Normal file
183
main/CMakeLists.txt
Normal file
@@ -0,0 +1,183 @@
|
||||
set(SRCS
|
||||
"main.cc"
|
||||
"activation/activation_replay_service.cc"
|
||||
"app/application.cc"
|
||||
"app/composition_root.cc"
|
||||
"audio/capture_pipeline.cc"
|
||||
"audio/embedded_prompt_catalog.cc"
|
||||
"audio/local_prompt_player.cc"
|
||||
"audio/packed_opus_reader.cc"
|
||||
"audio/playback_controller.cc"
|
||||
"audio/playback_pipeline.cc"
|
||||
"audio/opus_frame_decoder.cc"
|
||||
"audio/opus_frame_encoder.cc"
|
||||
"audio/pcm_rate_converter.cc"
|
||||
"audio/voice_activity_detector.cc"
|
||||
"audio/voice_dsp.cc"
|
||||
"audio/voice_frontend.cc"
|
||||
"audio/wake_word_detector.cc"
|
||||
"connectivity/connectivity_manager.cc"
|
||||
"connectivity/connectivity_policy.cc"
|
||||
"connectivity/dual_network_policy.cc"
|
||||
"connectivity/dual_network_transport.cc"
|
||||
"connectivity/ml307_at_parser.cc"
|
||||
"connectivity/reconnect_backoff.cc"
|
||||
"connectivity/wifi_credential_store.cc"
|
||||
"configuration/remote_behavior_config.cc"
|
||||
"diagnostics/audio_tap.cc"
|
||||
"diagnostics/runtime_diagnostics_service.cc"
|
||||
"diagnostics/device_log_formatter.cc"
|
||||
"diagnostics/trace_context.cc"
|
||||
"core/app_effect.cc"
|
||||
"core/app_event.cc"
|
||||
"core/playback_types.cc"
|
||||
"core/remote_behavior.cc"
|
||||
"core/runtime_state.cc"
|
||||
"core/state_reducer.cc"
|
||||
"friend/friend_service.cc"
|
||||
"friend/friend_store.cc"
|
||||
"friend/friend_types.cc"
|
||||
"memory/memory_cache.cc"
|
||||
"memory/memory_types.cc"
|
||||
"adapters/effect_router.cc"
|
||||
"adapters/esp_audio_engine.cc"
|
||||
"platform/borla_s3/borla_s3_platform.cc"
|
||||
"platform/borla_s3/battery_monitor.cc"
|
||||
"platform/borla_s3/ble_friend_exchange.cc"
|
||||
"platform/borla_s3/ble_provisioning_gatt.cc"
|
||||
"platform/borla_s3/bmi270_sensor.cc"
|
||||
"platform/borla_s3/button_input.cc"
|
||||
"platform/borla_s3/capacitive_touch_input.cc"
|
||||
"platform/borla_s3/es8311_audio_output.cc"
|
||||
"platform/borla_s3/esp_websocket_transport.cc"
|
||||
"platform/borla_s3/esp_wifi_transport.cc"
|
||||
"platform/borla_s3/i2c_bus.cc"
|
||||
"platform/borla_s3/ml307_transport.cc"
|
||||
"platform/borla_s3/ws2812_led.cc"
|
||||
"ota/ota_endpoint.cc"
|
||||
"ota/ota_response_parser.cc"
|
||||
"ota/ota_service.cc"
|
||||
"ota/ota_types.cc"
|
||||
"protocol/binary_audio_protocol.cc"
|
||||
"protocol/protocol_message_builder.cc"
|
||||
"protocol/realtime_config.cc"
|
||||
"protocol/realtime_protocol.cc"
|
||||
"protocol/server_message_dispatcher.cc"
|
||||
"protocol/websocket_uri.cc"
|
||||
"provisioning/ble_provisioning_codec.cc"
|
||||
"provisioning/ble_provisioning_service.cc"
|
||||
"power/idle_service.cc"
|
||||
"power/power_service.cc"
|
||||
"schedule/alarm_schedule.cc"
|
||||
"schedule/alarm_service.cc"
|
||||
"schedule/alarm_store.cc"
|
||||
"schedule/alert_ringer.cc"
|
||||
"schedule/reminder_schedule.cc"
|
||||
"schedule/reminder_service.cc"
|
||||
"schedule/schedule_coordinator.cc"
|
||||
"sensor/battery_estimator.cc"
|
||||
"sensor/imu_processor.cc"
|
||||
"sensor/sensor_message_codec.cc"
|
||||
"sensor/sensor_service.cc"
|
||||
"sensor/sensor_types.cc"
|
||||
"sensor/touch_channel.cc"
|
||||
"platform/borla_s3/tca9555.cc"
|
||||
)
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SRCS}
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES
|
||||
button
|
||||
bt
|
||||
driver
|
||||
app_update
|
||||
esp-opus
|
||||
espressif__esp-dsp
|
||||
esp_adc
|
||||
esp_app_format
|
||||
esp_codec_dev
|
||||
esp_driver_gpio
|
||||
esp_driver_i2c
|
||||
esp_driver_i2s
|
||||
esp_event
|
||||
esp_http_client
|
||||
esp_hw_support
|
||||
esp_netif
|
||||
esp_system
|
||||
esp_timer
|
||||
esp_wifi
|
||||
esp-sr
|
||||
freertos
|
||||
json
|
||||
led_strip
|
||||
mbedtls
|
||||
nvs_flash
|
||||
tcp_transport
|
||||
)
|
||||
|
||||
# Reuse Espressif's Apache-2.0 BMI270 context image from the explicitly
|
||||
# versioned esp-dsp component. Only the immutable sensor configuration blob is
|
||||
# compiled here; firmware2 has its own I2C driver and does not link old code.
|
||||
idf_component_get_property(
|
||||
ESP_DSP_COMPONENT_DIR espressif__esp-dsp COMPONENT_DIR)
|
||||
target_sources(
|
||||
${COMPONENT_LIB}
|
||||
PRIVATE
|
||||
"${ESP_DSP_COMPONENT_DIR}/applications/m5stack_core_s3/apps/kalman_filter/main/bmi270_context.c"
|
||||
)
|
||||
|
||||
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
|
||||
idf_build_get_property(python PYTHON)
|
||||
set(PROMPT_GENERATOR
|
||||
"${CMAKE_CURRENT_LIST_DIR}/../assets/gen_audio_prompts.py")
|
||||
set(PROMPT_ASSET_DIR
|
||||
"${CMAKE_CURRENT_LIST_DIR}/../assets/prompts")
|
||||
file(
|
||||
GLOB PROMPT_ASSETS
|
||||
"${PROMPT_ASSET_DIR}/*.ogg"
|
||||
"${PROMPT_ASSET_DIR}/*.opus"
|
||||
)
|
||||
set(GENERATED_PROMPT_DIR
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/generated")
|
||||
set(GENERATED_PROMPT_HEADER
|
||||
"${GENERATED_PROMPT_DIR}/audio_prompts_data.h")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${GENERATED_PROMPT_HEADER}"
|
||||
COMMAND
|
||||
"${python}" "${PROMPT_GENERATOR}"
|
||||
"${PROMPT_ASSET_DIR}" "${GENERATED_PROMPT_HEADER}"
|
||||
DEPENDS
|
||||
"${PROMPT_GENERATOR}"
|
||||
${PROMPT_ASSETS}
|
||||
COMMENT "Validating and packing local Ogg/Opus prompts"
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(
|
||||
firmware2_prompt_data
|
||||
DEPENDS "${GENERATED_PROMPT_HEADER}"
|
||||
)
|
||||
add_dependencies(${COMPONENT_LIB} firmware2_prompt_data)
|
||||
target_include_directories(
|
||||
${COMPONENT_LIB}
|
||||
PRIVATE "${GENERATED_PROMPT_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
# ESP-IDF 5.4 defaults chip targets to its newest supported C++ dialect.
|
||||
# Keep firmware2 on the project-wide C++17 contract explicitly.
|
||||
target_compile_options(
|
||||
${COMPONENT_LIB}
|
||||
PRIVATE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>
|
||||
)
|
||||
|
||||
# ServerCommand intentionally lives in PSRAM and is currently several KB.
|
||||
# Keep every production parser frame small so a future field cannot silently
|
||||
# recreate a task-stack copy of the whole command.
|
||||
set_source_files_properties(
|
||||
"protocol/server_message_dispatcher.cc"
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "-Wframe-larger-than=1024;-Werror"
|
||||
)
|
||||
Reference in New Issue
Block a user