Feature flags

The code can be substantially changed in its behaviour with compile time build flags (sometimes also refered to as feature flags).

The following keywords can be used in the platform.ini file as in the following example line:

build_flags = -DANABRID_DEBUG_INIT -DANABRID_UNSAFE_INTERNET -DANABRID_SKIP_DHCP

On this page is a list of all keywords used so far. Note that all our flags are prepended with ANABRID_ in order to distinguish them for instance from PlatformIO flags (PIO_...) or flags related to third party libraries.

Note

PlatformIO recompiles the complete code base if it detects a change in the platform.ini. If you want to go sure, you can also run pio run -t clean manually.

Note

If you are not familiar with C style preprocessor macros: -DFOOBAR means basically the same as #define FOOBAR within the code, but available in all compile units. Do not be confused by the -D prefix. Furthermore, do not be confused that putting a single #define FOOBAR in a single compile unit (i.e. some file_a.cpp) even at the top will not be sufficient to have that definition to be available in any other compilation unit, such as when compiling file_b.cpp. Therefore, compile time build flags should only be defined centrally, i.e. within the platform.ini file.