I have a code which is generating static library, the toolchain is generating the .a but i'm getting error as the following
- error.png (85.48 KiB) Viewed 1359 times
the file structure is as the following
- file structure.png (37.43 KiB) Viewed 1359 times
and here is the content of main CMake file
cmake_minimum_required(VERSION 3.5)
set(COMPONENTS CBUF esptool_py)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(CBUF C)
while the content of the component CMake file
idf_component_register(SRCS
"src/CBUF_CORE.c"
"src/CBUF_ELOG.c"
"src/CBUF_FCFG.c"
"src/CBUF_OS.c"
INCLUDE_DIRS
"include"
"D:/temp1/GESAF_STACK/Environment/StdLog"
"D:/temp1/GESAF_STACK/Environment/StdType"
"D:/temp1/GESAF_STACK/Environment/EnvironmentAbstraction/include"
"D:/temp1/GESAF_STACK/ServiceLayer/Diagnostic/ELOG/components/ELOG/include"
"D:/temp1/GESAF_STACK/ServiceLayer/Diagnostic/PROBE/components/PROBE/include"
PRIV_REQUIRES app_update spi_flash log)
# After build, copy the archive file and header file to parent example directory's main component
add_custom_command(TARGET ${COMPONENT_LIB}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${COMPONENT_LIB}> ${CMAKE_SOURCE_DIR}/lib
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/include/CBUF.h ${CMAKE_SOURCE_DIR}/lib
COMMENT "Copying built archive file and header to parent example directory...")