I am aware of these annoyances, which is why I've made sure to always clean the build folder usingI have had this issue with undefined reference to _exit before. Each time I've had it, it was related to cmake debris being left over in my build/ directory after changing cmake toolchains, or not properly including the pico-sdk-import.cmake file, or not calling pico_sdk_init(). Simply deleting the build/ directory and reconfiguring has solved the problem for me. In particular, your assembler errors make it seem like you're using the wrong assembler for this .S file. This can be caused by having wrong things in the cmake cache.
The other thing to double-check is that you are including the Pico SDK before project() and calling pico_sdk_init() after project() in your CMakeLists. I do not know anything about Conan or how to make it do that.
Code:
rm -rf build/*
To emphasize:
My problem is not with my CMakeLists.txt, but with building it using conan.
If I build the CMakeLists.txt without conan in the regular way
Code:
cd buildcmake ..cmake --build . --parallel
The errors I'm having are introduced by conan and how it provides the toolchain information.
Something about the SDK doesn't like the way it is being compiled when using conan, but it is rather hard to figure out where exactly the problem lies.
In both the linked issues, I have detailed logs, since it is not clear to me where the source of the issue lies.
It obviously is caused by using Conan, but the behavior is rather weird and hard to decipher since the SDK is not really well documented in the CMake parts.
Statistics: Posted by HackXIt — Fri May 03, 2024 6:00 am