I was adding libcanard as a module and following your template. One thing I noticed was that the library was not getting included even though I added add_subdirectory(.. build) to CMakelists.txt under zephyr directory. I tested out yours and it was working as I could see it in build.ninja. After removing bits of your CMakelists.txt like conditional statement and Kconfig did it give me some error while building.
Only when Kconfig is defined under zephyr/ and is included in prj.conf does it build the module. I dont know the specific reason. Why does it happen?
Also I had another query regarding using libcanard. Will macros like CANARD_ASSERT which is basically assert() create any problems and should i change it to something similar to zephyr's implementation of assert?
Thanks @yashi for the quick help. I was talking about this libcanard but this example was helpful. This is my forked repo which compiles fine now from the guidelines of your example module-sample just that I needed to include Kconfig.
I was adding
libcanard
as a module and following your template. One thing I noticed was that the library was not getting included even though I addedadd_subdirectory(.. build)
to CMakelists.txt under zephyr directory. I tested out yours and it was working as I could see it in build.ninja. After removing bits of your CMakelists.txt like conditional statement and Kconfig did it give me some error while building. Only whenKconfig
is defined under zephyr/ and is included inprj.conf
does it build the module. I dont know the specific reason. Why does it happen?Also I had another query regarding using
libcanard
. Will macros like CANARD_ASSERT which is basically assert() create any problems and should i change it to something similar to zephyr's implementation of assert?