invalid suffix "_FULL_NAME" on integer constant

I'm trying to implement my own driver for our custm made board based onnRF5340-QKAA. Driver is for NCT218 I2C temperature sensor.

I'm implementing it based on the samples in the Zephyr project. I described api and trying to compile but during building it shows me error like below.

/Users/el314biig/biig-fw-ws/biig-fw/NCT218-driver/tmp_nct218.c: At top level:
/Users/el314biig/biig-fw-ws/biig-fw/build/zephyr/include/generated/devicetree_generated.h:15994:49: error: invalid suffix "_FULL_NAME" on integer constant
15994 | #define DT_FOREACH_OKAY_INST_onnn_nct218(fn) fn(0)

I am super newbie in programming especially Zephyr. I don't understand where to dig in. Can anybody help me? I can send any part  of code or even the whole project.

Parents Reply
  • If you're able to build it and your sensor appears in your devicetree it should be good.

    You can check that you're able to access it from the devicetree by running your nct218_init function.

    elektron314 said:
    Does it mean that If I exclude this #define my driver will be ignored?

    I don't think you necessarily have to include it, but if you want to use the driver in the same way as the drivers you've copied you'll have to include it.

    There's also option 2 in the documentation I linked.

    elektron314 said:
    Can you explain the difference between those two and why it doesn't point to any special error in the building?

    Hard to say without more context.

    Are you sure there aren't any more specific errors in your build log?

    -Einar

Children
Related