This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF SDK 1.7 + Actinius Icarus (nRF9160)

Hi,
I cannot compile the sample of VL53L0X with VSC.
I have the following error: 'DT_N_INST_0_st_vl53l0x_P_label' undeclared (first use in this function)
Do I need to add specific information related to my Icarus card?
By reworking the sample with other examples, I passed this error but I'm stuck on another point:
In the file /opt/nordic/ncs/v1.7.0/zephyr/drivers/sensor/vl53l0x/vl53l0x.c DEVICE_INST_DEFINE (0, vl53l0x_init, NULL, & vl53l0x_driver, NULL, POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, & vl53l0x_api_funcs);
give me this first error (then others same style): error: expected declaration specifiers or '...' before numeric constant

Does somebody have an idea ?


Thanks for help
Parents
  • Hi,

     

    You'll need to add the vl53l0x to your device tree overlay.

    That is usually done by adding a board specific overlay, in my_application/boards/$board.overlay.

    Here's what I added to the board overlay file:

    &i2c2 {
            status = "okay";
            vl53l0x@29 {
                    compatible = "st,vl53l0x";
                    reg = <0x29>;
                    label = "VL53L0X";
            };
    };

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    You'll need to add the vl53l0x to your device tree overlay.

    That is usually done by adding a board specific overlay, in my_application/boards/$board.overlay.

    Here's what I added to the board overlay file:

    &i2c2 {
            status = "okay";
            vl53l0x@29 {
                    compatible = "st,vl53l0x";
                    reg = <0x29>;
                    label = "VL53L0X";
            };
    };

     

    Kind regards,

    Håkon

Children
Related