I am trying to understand what is compiled when "Device Tree Magic Macros" are used to extract information from the device tree. For example, I would like to see what is compiled when the following statements are encountered by the preprocessor:
#define DEVICE_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(ti_fdc2x1x)
int main(void)
{
struct sensor_value ch_buf[] = {
DT_FOREACH_CHILD(DEVICE_NODE, CH_BUF_INIT)
};
My purpose here is to understand how this works; I have found the documentation to be incomprehensible.
My intuition is to run the compiler with -E flag set but I can't figure out how to do that under vscode/nrf_sdk.
Any suggestions?
Regards,
Jerry