Not sure how to set up a project.

I'm using the visual studio code extension and things work well. I am now trying to test a more complex project found here but when pressing build I get some very long errors that I think mainly have to do with `my_pwm0` not being found in the device tree. I can see that something with that name exists in `boards/arm/twv_pcb_0_6/twv_pcb_0_6.dts` and in other places but I'm not sure I know which one to select and where to place it during the build configuration. Does anyone know on how to test this project using the 52833 DK?

Parents Reply Children
  • I see. I didn't do the Intermediate course yet. I wanted to jump to this project because it's very similar to what I wanted to do for my garden. But I want to use the DK instead of some custom board.

    I clicked "Add Build Configuration" just as in the tutorial of the beginner course. Selected the board, and left all the rest as default. That's why I was wondering if my mistake was maybe not setting up the "Extra Kconfig"!

    What errors did you have? For me the errors are really long, but sifting through them I think the underlying reason is the device tree. Maybe I was mistaken. I get:

    pwm.c:36:63: note: in expansion of macro 'NSLEEP'
       36 | static const struct gpio_dt_spec nsleep_io = GPIO_DT_SPEC_GET(NSLEEP, gpios);
       
       ...
       
    pwm.c:25:16: note: in expansion of macro 'DT_ALIAS'
       25 | #define NSLEEP DT_ALIAS(nsleep)
       
       ...
       
    pwm.c:36:46: note: in expansion of macro 'GPIO_DT_SPEC_GET'
       36 | static const struct gpio_dt_spec nsleep_io = GPIO_DT_SPEC_GET(NSLEEP, gpios);

    Even the `#error` in `adc.c` throws an error, even though using the same thing inside `main.c` causes no issue at all.

  • greenleaf said:
    What errors did you have?

    I'm building it for 2.6.1 here, but I don't think it should make too much of a difference. It seems I am getting this issue for some reason, not sure why.

    greenleaf said:
    I clicked "Add Build Configuration" just as in the tutorial of the beginner course. Selected the board, and left all the rest as default. That's why I was wondering if my mistake was maybe not setting up the "Extra Kconfig"!

    Could be. I see that it has a preset that comes with many configurations being set, I used those for my build. 

    Interestingly, when just building a default PWM sample for the board it works well. I would try contacting the guys who made this project, and otherwise try to build something from scratch with NCS.

    Regards,

    Elfving

  • Yes, I'll probably have to explore more on my own until I figure this out.

Related