NCS v2.4.0
I want to try TARGET example
samples/bluetooth/mesh/mesh_dfu/target
, but the example compiles with errors.
I attach the log in a file:4048.error.rar
What should I do to make the project compile successfully?
Thank you.
samples/bluetooth/mesh/mesh_dfu/target
, Add this:
https://github.com/zephyrproject-rtos/zephyr/pull/57886
https://github.com/nrfconnect/sdk-zephyr/commit/b57a7488aa3a49fe71b9a042a3d54f2d463b352b
remained:
CMake Error at C:/ncs/v2.4.0/zephyr/cmake/modules/extensions.cmake:424 (add_library):
Cannot find source file:
C:/my/common/src/dfu_target.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .h .hh .h++
.hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .ispc
Call Stack (most recent call first):
C:/ncs/v2.4.0/zephyr/cmake/modules/kernel.cmake:210 (zephyr_library_named)
C:/ncs/v2.4.0/zephyr/cmake/modules/zephyr_default.cmake:124 (include)
C:/ncs/v2.4.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/ncs/v2.4.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:4 (find_package)
CMake Error at C:/ncs/v2.4.0/zephyr/cmake/modules/extensions.cmake:424 (add_library):
No SOURCES given to target: app
Call Stack (most recent call first):
C:/ncs/v2.4.0/zephyr/cmake/modules/kernel.cmake:210 (zephyr_library_named)
C:/ncs/v2.4.0/zephyr/cmake/modules/zephyr_default.cmake:124 (include)
C:/ncs/v2.4.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/ncs/v2.4.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:4 (find_package)
I'm waiting for your help.
Thank you.
Hi Serhii, sorry to let you wait. We are going into our summer vacation period where we have less staffing. I'll try to answer you soon, hopefully tomorrow!
Best regards,
Raoul
Thank you. I'm waiting for your help.
Hi again!
You were right to suggest those pull requests, they fix some warnings that are unrelated to this dfu mesh sample.
The remaining issue can be fixed by copying the "common" folder here:
C:\ncs\v2.4.0\nrf\samples\bluetooth\mesh\dfu\common\
And placing it next to the "target" folder that you are currently trying to build.
I assume you have used the VS Code extension to create a new application based on the dfu mesh target sample. Unfortunately the extension doesn't pick up that this particular sample has a "common" folder with necessary source files, which should ideally be copied over as well.
So this sample will either build if you build it in it's original location, or if you copy the common folder as I suggested above.
I'll inform our developers that we should do this automatically in the future.
Thanks for your patience.
Best regards,
Raoul