Made a change to overlay in project, now nothing will build.

I had a project working using nRFConnect, with VSCode. I then made the mistake of removing a peripheral I don't need (this is a custom board using the nRF52840) Removed the UART0 and a button and builds now fail with errors like: 

devicetree error: 'gpios' is marked as required in 'properties:' in C:/ncs/v2.4.2/zephyr/dts/bindings\input\gpio-keys.yaml, but does not appear in <Node /buttons/button_2 in 'C:/ncs/v2.4.2/zephyr/misc/empty_file.c'>

I have no idea what this means - I'm a programmer, and it seems like most Nordic/zephyr development is just creating config files all over the place and having the code magically auto-generated and hidden away. This is in stark contrast with every other architecture I use where I write C/C++ code and compile it normally. I find myself having to rely on git to roll back changes that cause the build system to break for unknown reasons with cryptic errors related to macros inside macros relying upon parsing all kinds of config files. I prefer working with C/C++ and debugger to this fragile auto-generated nightmare :) 

I've tried adding the button back, but the build still crashes out with the same error. So once again I have to roll back the project. Is it possible to develop for the nRF52 series without Zephyr and auto-generated code?

Parents
  • Hi Scott

    Hieu is out of office for the time being, so I've been assigned to this case in his absence. The GUI tool you're referring to here I assume is the nRF DeviceTree and nRF KConfig extensions in Visual Studio Code, correct? 

    It's perfectly possible to edit the .conf and .dts file manually, but that requires some knowledge beforehand on how to do it, so we made this GUIs to make it easier to use the Zephyr RTOS and nRF Connect SDK. 

    If you need a peripheral "sometimes" in your peripheral you will indeed need to enable it in the configs and set it up in your devicetree, but it isn't used until you call it from your application code, and as such the application can still run without using the UART with the option for UART when needed enabled for instance. For your example we have made the Low Power UART to show how something like this could be done for instance. It should also be similar for other peripherals in NCS.

    Best regards,

    Simon

Reply
  • Hi Scott

    Hieu is out of office for the time being, so I've been assigned to this case in his absence. The GUI tool you're referring to here I assume is the nRF DeviceTree and nRF KConfig extensions in Visual Studio Code, correct? 

    It's perfectly possible to edit the .conf and .dts file manually, but that requires some knowledge beforehand on how to do it, so we made this GUIs to make it easier to use the Zephyr RTOS and nRF Connect SDK. 

    If you need a peripheral "sometimes" in your peripheral you will indeed need to enable it in the configs and set it up in your devicetree, but it isn't used until you call it from your application code, and as such the application can still run without using the UART with the option for UART when needed enabled for instance. For your example we have made the Low Power UART to show how something like this could be done for instance. It should also be similar for other peripherals in NCS.

    Best regards,

    Simon

Children
No Data
Related