Description
The extern "C"
block inside "board.h" may cause incorrect symbols to be defined and linker issues. See:
Arduino_Core_STM32/cores/arduino/board.h
Lines 8 to 22 in e07c02a
For example, when I added a global function in my own "variant.cpp" file, the corresponding function declaration in "variant.h" ended up being exported as a "C" symbol, causing the linker to fail with an "undefined reference" error message.
This can potentially cause similar troubles in other places and anyway it does not seem correct: any other header file does already handle extern "C"
symbols and placing an "#include" directive inside an extern "C"
block should be avoided.
I think only the init()
function declaration in "board.h" should be made extern "C"
.