v2.2.0: Add bread-compact-nt26 board (#1663)
* Refactor application error handling and improve network task logic - Updated error handling for modem initialization failure in Application::Initialize(). - Added new error message for modem initialization in English and Chinese language files. - Simplified lambda captures in NetworkTask to avoid unnecessary references. - Set main task priority in Application::Run() for better performance. * Add support for Bread Compact NT26 board - Introduced new board configuration for Bread Compact NT26 in CMakeLists.txt and Kconfig. - Added board-specific implementation in compact_nt26_board.cc and nt26_board.cc. - Created configuration files for NT26, including config.h and config.json. - Updated dependencies in idf_component.yml to include uart-eth-modem. - Translated error messages in config.h for OLED display type selection to English. - Enhanced display and button initialization logic for NT26 board. * Update project version and improve build configuration - Updated project version from 2.1.0 to 2.2.0 in CMakeLists.txt. - Enabled minimal build configuration to include only essential components. - Updated README files to replace QQ group links with Discord links for community engagement. * Update Bread Compact NT26 board configuration name in config.json * fix compile errors * Update uart-eth-modem dependency format in idf_component.yml * fix esp32 compiling errors * Update CMakeLists.txt to change component dependency from REQUIRES to PRIV_REQUIRES for esp_pm, esp_psram, and esp_driver_gpio * Refactor CMakeLists.txt to explicitly list board common source files and update include directories for better clarity and organization. * Add esp_driver_ppa as a dependency in CMakeLists.txt
This commit is contained in:
@ -41,10 +41,29 @@ set(SOURCES "audio/audio_codec.cc"
|
||||
set(INCLUDE_DIRS "." "display" "display/lvgl_display" "display/lvgl_display/jpg" "audio" "protocols")
|
||||
|
||||
# Add board common files
|
||||
file(GLOB BOARD_COMMON_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/boards/common/*.cc)
|
||||
list(APPEND SOURCES ${BOARD_COMMON_SOURCES})
|
||||
list(APPEND SOURCES
|
||||
"boards/common/board.cc"
|
||||
"boards/common/wifi_board.cc"
|
||||
"boards/common/ml307_board.cc"
|
||||
"boards/common/nt26_board.cc"
|
||||
"boards/common/dual_network_board.cc"
|
||||
"boards/common/adc_battery_monitor.cc"
|
||||
"boards/common/afsk_demod.cc"
|
||||
"boards/common/axp2101.cc"
|
||||
"boards/common/backlight.cc"
|
||||
"boards/common/button.cc"
|
||||
"boards/common/esp32_camera.cc"
|
||||
"boards/common/i2c_device.cc"
|
||||
"boards/common/knob.cc"
|
||||
"boards/common/power_save_timer.cc"
|
||||
"boards/common/press_to_talk_mcp_tool.cc"
|
||||
"boards/common/sleep_timer.cc"
|
||||
"boards/common/sy6970.cc"
|
||||
"boards/common/system_reset.cc"
|
||||
)
|
||||
list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/boards/common)
|
||||
|
||||
|
||||
idf_build_get_property(build_components BUILD_COMPONENTS)
|
||||
# Function to find component dynamically by pattern
|
||||
function(find_component_by_pattern PATTERN COMPONENT_VAR PATH_VAR)
|
||||
@ -74,6 +93,10 @@ elseif(CONFIG_BOARD_TYPE_BREAD_COMPACT_ML307)
|
||||
set(BOARD_TYPE "bread-compact-ml307")
|
||||
set(BUILTIN_TEXT_FONT font_puhui_basic_14_1)
|
||||
set(BUILTIN_ICON_FONT font_awesome_14_1)
|
||||
elseif(CONFIG_BOARD_TYPE_BREAD_COMPACT_NT26)
|
||||
set(BOARD_TYPE "bread-compact-nt26")
|
||||
set(BUILTIN_TEXT_FONT font_puhui_basic_14_1)
|
||||
set(BUILTIN_ICON_FONT font_awesome_14_1)
|
||||
elseif(CONFIG_BOARD_TYPE_BREAD_COMPACT_ESP32)
|
||||
set(BOARD_TYPE "bread-compact-esp32")
|
||||
elseif(CONFIG_BOARD_TYPE_BREAD_COMPACT_ESP32_LCD)
|
||||
@ -732,9 +755,10 @@ if(CONFIG_IDF_TARGET_ESP32)
|
||||
"audio/codecs/es8388_audio_codec.cc"
|
||||
"audio/codecs/es8389_audio_codec.cc"
|
||||
"led/gpio_led.cc"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/boards/common/esp32_camera.cc"
|
||||
"display/lvgl_display/jpg/image_to_jpeg.cpp"
|
||||
"display/lvgl_display/jpg/jpeg_to_image.c"
|
||||
"boards/common/esp32_camera.cc"
|
||||
"boards/common/nt26_board.cc"
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -742,6 +766,21 @@ idf_component_register(SRCS ${SOURCES}
|
||||
EMBED_FILES ${LANG_SOUNDS} ${COMMON_SOUNDS}
|
||||
INCLUDE_DIRS ${INCLUDE_DIRS}
|
||||
WHOLE_ARCHIVE
|
||||
PRIV_REQUIRES
|
||||
esp_pm
|
||||
esp_psram
|
||||
esp_driver_gpio
|
||||
esp_driver_uart
|
||||
esp_driver_spi
|
||||
esp_driver_i2c
|
||||
esp_driver_i2s
|
||||
esp_driver_jpeg
|
||||
esp_driver_ppa
|
||||
esp_app_format
|
||||
app_update
|
||||
spi_flash
|
||||
console
|
||||
efuse
|
||||
)
|
||||
|
||||
# Use target_compile_definitions to define BOARD_TYPE, BOARD_NAME
|
||||
|
||||
Reference in New Issue
Block a user