This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Build error for example code of MAX30101 with nRF SDK v1.5.0

Hello,

I am using example code of MAX30101 Pulse Oximeter sensor with nRF SDK v1.5.0 on board NRF5240DK. I copied the example from the ncs \ v1.5.0 \ zephyr \ samples \ sensor \ max30101 folder to the ncs \ v1.5.0 \ nrf \ samples \ sensor \ max3010 folder. I also created a file nrf5340dk_nrf5340_cpuapp.overlay in the \board folder and added there:

&i2c0 {
    max30101 @ 57 {
        compatible = "max, max30101";
        reg = <0x57>;
        label = "MAX30101";
    };
};
& gpioa {
status = "okay";
};

Building the example code I am getting macro error in devicetree.h file as mentioned below

#define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))

with following message in output

error: 'DT_N_INST_0_max_max30101_P_label' undeclared (first use in this function)

Please suggest appropriate solution for the above problem.

Thanks.

Parents Reply Children
No Data
Related