I have a custom board based on the nRF52810. I have LEDs wired to GPIOs 12 and 13. I want to modify the blinky example to use the custom board.
I used the "Create new board wizard" to make a new build configuration based on the 52810 SoC and added the following app.overlay file to my project folder:
/ {
gpiocustom {
compatible = "gpio-keys";
gpioled1: gpiocus_1 {
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
label = "Custom gpio 12";
};
gpioled2: gpiocus_2 {
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
label = "Custom gpio 13";
};
};
aliases {
gpioled1 = &gpioled1;
gpioled2 = &gpioled2;
};
};
I also changed line 14 in blinky to read:
/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c
In file included from C:\ncs\v2.2.0-rc1\zephyr\include\zephyr\toolchain\gcc.h:88,
from C:\ncs\v2.2.0-rc1\zephyr\include\zephyr\toolchain.h:50,
from C:\ncs\v2.2.0-rc1\zephyr\include\zephyr\kernel_includes.h:19,
from C:\ncs\v2.2.0-rc1\zephyr\include\zephyr\kernel.h:17,
from c:\Nordic\VS_Code\blinky\src\main.c:7:
C:\ncs\v2.2.0-rc1\zephyr\include\zephyr\device.h:83:41: error: '__device_dts_ord_13' undeclared here (not in a function); did you mean '__device_dts_ord_15'?
83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)