Switching to a custom nRF52840 board for nRF Desktop App

I'm trying to configure the nRF Desktop Application for an Adafruit nRF52840 Feather that's plugged into a custom FeatherWing. The nRF52840 Feather is a supported board so I just used that in the configuration page of the VS Code extension. I copied the nrf52840dk_nrf52840 prf.conf file over to a ./configuration/adafruit_feather_nrf52840/ folder.

The build fails because there are two warnings:



If I set CONFIG_LED_PWM=n then the first warning goes away but that doesn't seem like a proper solution.
USB_HID_PROTOCOL_CODE should be set because DESKTOP_HID_BOOT_INTERFACE_MOUSE is set to y.


Is there something obvious that I'm missing? Is nRF Desktop not supposed to be altered? Is it better to start a from scratch project and pull in modules and drivers where I need them?

  • I've updated the toolchain and SDK but now it appears that the nRF Desktop app is referencing older include headers such as 'event_manager.h' appearing to become 'app_event_manager.h', and others. Maybe some renames in Zephyr itself? How well maintained is the nRF Desktop app?

  • I've found that the nRF Desktop application builds fine in-tree, and mostly fine except for some devicetree issues when I target the Adafruit Feather nRF52840 board. Why would 'create new application from sample' break the build?

  • Hi,

    Phyllostachys said:
    I've updated the toolchain and SDK
    Phyllostachys said:
    I've found that the nRF Desktop application builds fine in-tree

    Did you create a new application from the nRF Desktop application after updating the SDK, or are you using the one you created from an older version of the SDK? If you are using an application from an older version there might be issues with it working out-of-tree due to changes in path etc. between the SDK versions.

    Phyllostachys said:
    some devicetree issues when I target the Adafruit Feather nRF52840 board

    Please upload the complete build log, as well as which changes you have made to the application for the adafruit_feather_nrf52840.

    Best regards,
    Marte

  • Hello,

    For the first part, I wiped away the older folders I had and created a new application via the VS Code NCS extension dialog, having it copy the nRF Desktop 'sample'.

    Trying it again this morning and it seems to build the same as the in-tree version for both nRF52840dk and the Adafruit Feather. So I must have had stale SDK settings somewhere that broke things.

    For the second part, I created a new configuration folder called "adafruit_feather_nrf52840" to match the naming convention in the 'create new build configuration' dialog. With that, I copied everything over from the nrf52840dk_nrf52840 configuration folder since I want to start by matching that. I then commented out everything in the app.overlay file. Here is the build log where I build the in-tree nRF Desktop with the DK configuration then with the Adafruit Feather configuration:
    https://gist.github.com/Phyllostachys/6736041c84da1237bbb96f764d0a1886
    (I couldn't insert it in here for some reason).

    I think it might be failing because I haven't set up the buttons and those are setup in header files.

  • Hi,

    Most of the errors in the build log come from missing devicetree configurations, i.e. things that should be defined in app.overlay. However, the configuration files for the nRF52840 DK cannot be directly used for the Adafruit Feather nRF52840, since they are not compatible. For example, the Adafruit Feather only has the reset button compared to the DK's four user buttons, and it only has 2 user LEDs while the nRF52840 has 4. You will have to change the configuration files, and possibly also the nRF Desktop application itself, to correspond with what is supported by the Adafruit Feather. It might be a good starting point to look at the configuration files for the nRF52840 Dongle instead, as that would be more similar to the Adafruit Feather than the DK.

    Best regards,
    Marte

Related