Open stoberblog opened 4 years ago
Have you tried re-building the index after building the project? This might fix the issue.
Alas that hasn't helped. Also I flashed the build onto the dev board (nRF51-DK) and works properly, thus compiling is definitely setting the SW0_* values correctly.
The code parser uses pre-processed source files produced by the toolchain, where those device tree macros should have been expanded. So it is possible that the pre-processed files cannot be parsed by Eclipse correctly. Let me take a look.
Hi,
I'm new to Zephyr, so this may already be possible, but I'm wondering if the device tree can be expanded, using the board file.
My example use case is I started a project using the "samples/basic/button/" sample, and with the "nrf51dk_nrf51422" board, however, the preprocessor line #if DT_NODE_HAS_STATUS(SW0_NODE, okay), is failing and thus eclipse has blocked out sections of code, which is incorrect (it compiles fine, and I know sw0 is in board file).
For background details, I'm using Eclipse 2020-06, newest plugin (I downloaded from the marketplace), Windows 10, latest Zephyr (downloaded today).
Thanks in advance.