Re: Checking if code is compiled for Zephyr

Paul Sokolovsky

On Tue, 7 Mar 2017 14:38:16 +0000
Marcus Shawcroft <> wrote:

On 7 March 2017 at 14:35, Paul Sokolovsky
<> wrote:

I'm trying to #ifdef a part of cross-platform code for Zephyr, and I
didn't find a clear, self-describing way to do so. Am I missing
something? Can we have something like __ZEPHYR__, _ZEPHYR of
whatever preprocessor macro to check for?
The toplevel Makefile hardwires:

Cool, thanks for replies! I grepped include/* for anything like that, I
checked predefined macros in gcc. Who'd new I should grep Makefiles
too ;-).

I don't know if that symbol is documented somewhere, but it would be
nice if it was.
+1. doc/* doesn't mention it, I'll see where it fits and drop a patch
on occasion.

Best Regards,
Paul | Open source software for ARM SoCs
Follow Linaro:!/linaroorg -

Join to automatically receive all group messages.