Open Memotech-Bill opened 3 days ago
@will-v-pi Would a similar thing also affect #2113 ?
@will-v-pi Would a similar thing also affect #2113 ?
I don't think so. If it did I would have obtained a failure in CMake before getting to compiling compile_time_choice.S.
I assumed that you weren't testing #2113 with custom header files in a user-defined PICO_BOARD_HEADER_DIRS
location? :shrug:
Perhaps I should have made the question in my previous comment more explicit: if there's an #include
of a custom header file in a user-defined PICO_BOARD_HEADER_DIRS
location, and that custom header file contains // pico_cmake_set
declaations, will those declarations get included or ignored by the code in #2113 ?
I assumed that you weren't testing #2113 with custom header files in a user-defined
PICO_BOARD_HEADER_DIRS
location? 🤷
For my first test, the primary board header file was in a user defined location, but the secondary board header file was pico2_w.h in the standard location. That all worked, hence my report of success.
Perhaps I should have made the question in my previous comment more explicit: if there's an
#include
of a custom header file in a user-definedPICO_BOARD_HEADER_DIRS
location, and that custom header file contains// pico_cmake_set
declaations, will those declarations get included or ignored by the code in #2113 ?
I then went on to do a test with both primary and secondary board header files in a user defined location. I could see from the CMake output that this had correctly picked up the pico_cmake_set declarations from the secondary header file but then failed on compiling compile_time_choice.
if there's an
#include
of a custom header file in a user-definedPICO_BOARD_HEADER_DIRS
location, and that custom header file contains// pico_cmake_set
declaations, will those declarations get included or ignored by the code in #2113 ?
They will still be included by #2113 - it searches all of PICO_BOARD_HEADER_DIRS
in the same way that the SDK currently does when searching for included board files.
A board header file may include another (secondary) header file.
Providing the secondary header file is in pico-sdk/src/boards/include, then everything works.
However if the secondary header file is in a user defined folder, which is specified in PICO_BOARD_HEADER_DIRS, then the compilation of compile_time_choice.S fails:
My user defined directory:
config_autogen.h