<:Nami2:939038794794020874>

This commit is contained in:
ClaraCrazy
2023-07-17 16:46:04 +02:00
parent 315691b13c
commit bcb8468e27
73 changed files with 29 additions and 29 deletions

View File

@@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.5)
if (CONFIG_ESP_SERIAL_FLASHER)
zephyr_include_directories(
"${ZEPHYR_CURRENT_MODULE_DIR}/include"
"${ZEPHYR_CURRENT_MODULE_DIR}/port"
"${ZEPHYR_CURRENT_MODULE_DIR}/private_include"
)
zephyr_interface_library_named(esp_flasher)
zephyr_library()
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/src/esp_loader.c
${ZEPHYR_CURRENT_MODULE_DIR}/src/esp_targets.c
${ZEPHYR_CURRENT_MODULE_DIR}/src/protocol_common.c
${ZEPHYR_CURRENT_MODULE_DIR}/src/protocol_uart.c
${ZEPHYR_CURRENT_MODULE_DIR}/src/slip.c
${ZEPHYR_CURRENT_MODULE_DIR}/src/md5_hash.c
${ZEPHYR_CURRENT_MODULE_DIR}/port/zephyr_port.c
)
target_compile_definitions(esp_flasher INTERFACE SERIAL_FLASHER_INTERFACE_UART)
zephyr_library_link_libraries(esp_flasher)
if(DEFINED MD5_ENABLED OR CONFIG_SERIAL_FLASHER_MD5_ENABLED)
target_compile_definitions(esp_flasher INTERFACE -DMD5_ENABLED=1)
endif()
endif()

View File

@@ -0,0 +1,16 @@
config ESP_SERIAL_FLASHER
bool "Enable ESP serial flasher library"
default y
select CONSOLE_SUBSYS
help
Select this option to enable the ESP serial flasher library.
config ESP_SERIAL_FLASHER_UART_BUFSIZE
int "ESP Serial Flasher UART buffer size"
default 512
help
Buffer size for UART TX and RX packets
if ESP_SERIAL_FLASHER
rsource "../Kconfig"
endif

View File

@@ -0,0 +1,5 @@
name: esp-flasher
build:
cmake: zephyr
kconfig: zephyr/Kconfig