I added a custom library
As seen it is detected by the vscode intellisense or autosuggest?
And still shows undefined in compilation
Is their anything I should add in cmake or config or folder structure problem?
TIA
I added a custom library
As seen it is detected by the vscode intellisense or autosuggest?
And still shows undefined in compilation
Is their anything I should add in cmake or config or folder structure problem?
TIA
Fixed it, need to add in CmakeLists.txt.
# # Copyright (c) 2018 Nordic Semiconductor # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # cmake_minimum_required(VERSION 3.20.0) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(NONE) # NORDIC SDK APP START target_sources(app PRIVATE src/main.c lib/analog_read.c ) # Include UART ASYNC API adapter target_sources_ifdef(CONFIG_BT_NUS_UART_ASYNC_ADAPTER app PRIVATE src/uart_async_adapter.c ) # NORDIC SDK APP END zephyr_library_include_directories(.)
Hello,
I am glad to read that you were able to resolve this! :)
Your resolution is correct - you must indeed add it to the CmakeLists.txt for the build to be able to find it.
Best regards,
Karl