ESP-IDF Native Component #494
Replies: 1 comment
-
For those having the same issues, the solution for now is to include the repository as a submodule and on the parent directory add the necessary files to the CMakeLists.txt using set(agisostack_priv_requires "cxx driver")
set(agisostack_include_dirs "AgIsoStack-plus-plus/hardware_integration/include" "AgIsoStack-plus-plus/isobus/include" "AgIsoStack-plus-plus/utility/include")
set(hardware_interface_sources "AgIsoStack-plus-plus/hardware_integration/src/can_hardware_interface.cpp"
"AgIsoStack-plus-plus/hardware_integration/src/mcp2515_can_interface.cpp"
"AgIsoStack-plus-plus/hardware_integration/src/spi_interface_esp.cpp"
"AgIsoStack-plus-plus/hardware_integration/src/spi_transaction_frame.cpp"
"AgIsoStack-plus-plus/hardware_integration/src/twai_plugin.cpp"
)
file(GLOB_RECURSE isobus_sources ${COMPONENT_DIR}/AgIsoStack-plus-plus/isobus/src/*.*)
file(GLOB_RECURSE utility_sources ${COMPONENT_DIR}/AgIsoStack-plus-plus/utility/src/*.*)
idf_component_register(SRCS ${hardware_interface_sources} ${isobus_sources} ${utility_sources}
INCLUDE_DIRS "${agisostack_include_dirs}"
PRIV_REQUIRES "${agisostack_priv_requires}"
) When using a driver different than the ESP TWAI, changes are needed in the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does anyone have an idea or suggestions on how to integrate this library as a native idf component without using PlatformIO?
I made a way for it to compile but I am not a CMake expert, thus while linking the main file there were some undefined references.
First, I added the project as a submodule, then create a parent CMakeLists.txt kind of following the idf example:
I can see the
libHardwareIntegration.a
libIsobus.a
andlibUtility.a
inside the build folder, but when linking I got a bunch of undefined references for all the library functions, like:Beta Was this translation helpful? Give feedback.
All reactions