Skip to content

Commit

Permalink
fit the memory usage for esp32c3
Browse files Browse the repository at this point in the history
  • Loading branch information
78 committed Nov 29, 2024
1 parent ff28586 commit 436ff2b
Show file tree
Hide file tree
Showing 35 changed files with 754 additions and 360 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(PROJECT_VER "0.9.2")
set(PROJECT_VER "0.9.3")

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(xiaozhi)
10 changes: 7 additions & 3 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set(SOURCES "audio_codecs/audio_codec.cc"
"audio_codecs/no_audio_codec.cc"
"audio_codecs/box_audio_codec.cc"
"audio_codecs/es8311_audio_codec.cc"
"display/display.cc"
"display/no_display.cc"
"display/st7789_display.cc"
Expand All @@ -12,10 +13,11 @@ set(SOURCES "audio_codecs/audio_codec.cc"
"application.cc"
"ota.cc"
"settings.cc"
"background_task.cc"
"main.cc"
)

set(INCLUDE_DIRS "." "display" "audio_codecs" "protocols")
set(INCLUDE_DIRS "." "display" "audio_codecs" "protocols" "audio_processing")

# 字体
file(GLOB FONT_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/fonts/*.c)
Expand All @@ -38,14 +40,16 @@ elseif(CONFIG_BOARD_TYPE_KEVIN_BOX_1)
set(BOARD_TYPE "kevin-box-1")
elseif(CONFIG_BOARD_TYPE_KEVIN_BOX_2)
set(BOARD_TYPE "kevin-box-2")
elseif(CONFIG_BOARD_TYPE_KEVIN_C3)
set(BOARD_TYPE "kevin-c3")
elseif(CONFIG_BOARD_TYPE_LICHUANG_DEV)
set(BOARD_TYPE "lichuang-dev")
endif()
file(GLOB BOARD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD_TYPE}/*.cc)
list(APPEND SOURCES ${BOARD_SOURCES})

if(CONFIG_USE_AFE_SR)
list(APPEND SOURCES "audio_processor.cc" "wake_word_detect.cc")
if(CONFIG_IDF_TARGET_ESP32S3)
list(APPEND SOURCES "audio_processing/audio_processor.cc" "audio_processing/wake_word_detect.cc")
endif()

idf_component_register(SRCS ${SOURCES}
Expand Down
2 changes: 2 additions & 0 deletions main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ choice BOARD_TYPE
bool "Kevin Box 1"
config BOARD_TYPE_KEVIN_BOX_2
bool "Kevin Box 2"
config BOARD_TYPE_KEVIN_C3
bool "Kevin C3"
config BOARD_TYPE_LICHUANG_DEV
bool "立创开发板"
endchoice
Expand Down
Loading

0 comments on commit 436ff2b

Please sign in to comment.