-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
I encountered some issues while trying to build parts of the pico sdk for MSVC (for host-based unit testing):
- using the
invalid_params_if
,valid_params_if
,hard_assert_if
macros triggers errors like[...]\pico-sdk\src\host\hardware_timer\include\hardware/timer.h(22): error C2059: syntax error: '{'
auto_init_mutex
uses__attribute__
which is a GCC extensionsem_available
usestypeof
which is a GCC extensionhw_divider_result_threadlocal
is declared with__thread
, butplatform.h
(which defines__thread
) is not included by the header file
I have workarounds for these issues in jonathangjertsen@0fa7da9, but they are hacks and only cover the parts I used in my application. A quick search through the code base reveals many other usages of GCC extensions under the "common" code.
To what extent is building for host with MSVC supported? It seems like at least some support was intended at some point, since there are a couple of checks for _MSC_VER
.