Topics

Require Help NRF52840 PCA 10059


Muhammad Muh <muhammad.muh83@...>
 

Dear All,

It has been quite long that i emailed to this group. Hope everybody is fine and in good health. Coming towards the issue i am using nrf52840_PCA10059 Dongle. I am trying to do the example available in
Zephyr----> Sample------->Boards------>nrf52---------->onoff-app and onoff_level_lighting_vnd_app. When i use the WEST command by using board PCA 10056 they run fine and give no error. Moreover, when i run the following command with PCA 10059 i get the following error with both the examples. 

Command:  west build -b nrf52840_pca10059 .
Error: I am showing the last part of error
../src/mesh/publisher.c: In function 'publish':
../src/mesh/publisher.c:61:43: error: 'DT_ALIAS_SW1_GPIOS_PIN' undeclared (first use in this function); did you mean 'DT_ALIAS_SW0_GPIOS_PIN'?
  } else if (button_read(button_device[1], DT_ALIAS_SW1_GPIOS_PIN) == 0U) {
                                           ^~~~~~~~~~~~~~~~~~~~~~
                                           DT_ALIAS_SW0_GPIOS_PIN
../src/mesh/publisher.c:61:43: note: each undeclared identifier is reported only once for each function it appears in
../src/mesh/publisher.c:83:43: error: 'DT_ALIAS_SW2_GPIOS_PIN' undeclared (first use in this function); did you mean 'DT_ALIAS_SW0_GPIOS_PIN'?
  } else if (button_read(button_device[2], DT_ALIAS_SW2_GPIOS_PIN) == 0U) {
                                           ^~~~~~~~~~~~~~~~~~~~~~
                                           DT_ALIAS_SW0_GPIOS_PIN
../src/mesh/publisher.c:153:43: error: 'DT_ALIAS_SW3_GPIOS_PIN' undeclared (first use in this function); did you mean 'DT_ALIAS_SW0_GPIOS_PIN'?
  } else if (button_read(button_device[3], DT_ALIAS_SW3_GPIOS_PIN) == 0U) {
                                           ^~~~~~~~~~~~~~~~~~~~~~
                                           DT_ALIAS_SW0_GPIOS_PIN
ninja: build stopped: subcommand failed.
ERROR: command exited with status 1: /home/rg/cmake-3.13.1-Linux-x86_64/bin/cmake --build /home/rg/zephyrproject/zephyr/samples/boards/nrf52/mesh/onoff_level_lighting_vnd_app/build

It is requested to kindly advise on the aforementioned.

Best Regards


Bolivar, Marti
 

Hi,

"Muhammad Muh via Lists.Zephyrproject.Org"
<muhammad.muh83=outlook.com@...> writes:

Dear All,

It has been quite long that i emailed to this group. Hope everybody is fine and in good health. Coming towards the issue i am using nrf52840_PCA10059 Dongle. I am trying to do the example available in
Zephyr----> Sample------->Boards------>nrf52---------->onoff-app and
onoff_level_lighting_vnd_app.
I get what you mean, but we usually identify files using their paths.

Example: zephyr/samples/boards/nrf52/mesh/onoff-app

When i use the WEST command by using board PCA 10056 they run fine and give no error. Moreover, when i run the following command with PCA 10059 i get the following error with both the examples.

Command: west build -b nrf52840_pca10059 .
Error: I am showing the last part of error
../src/mesh/publisher.c: In function 'publish':
../src/mesh/publisher.c:61:43: error: 'DT_ALIAS_SW1_GPIOS_PIN' undeclared (first use in this function); did you mean 'DT_ALIAS_SW0_GPIOS_PIN'?
} else if (button_read(button_device[1], DT_ALIAS_SW1_GPIOS_PIN) == 0U) {
^~~~~~~~~~~~~~~~~~~~~~
DT_ALIAS_SW0_GPIOS_PIN
../src/mesh/publisher.c:61:43: note: each undeclared identifier is reported only once for each function it appears in
../src/mesh/publisher.c:83:43: error: 'DT_ALIAS_SW2_GPIOS_PIN' undeclared (first use in this function); did you mean 'DT_ALIAS_SW0_GPIOS_PIN'?
} else if (button_read(button_device[2], DT_ALIAS_SW2_GPIOS_PIN) == 0U) {
^~~~~~~~~~~~~~~~~~~~~~
DT_ALIAS_SW0_GPIOS_PIN
../src/mesh/publisher.c:153:43: error: 'DT_ALIAS_SW3_GPIOS_PIN' undeclared (first use in this function); did you mean 'DT_ALIAS_SW0_GPIOS_PIN'?
} else if (button_read(button_device[3], DT_ALIAS_SW3_GPIOS_PIN) == 0U) {
^~~~~~~~~~~~~~~~~~~~~~
DT_ALIAS_SW0_GPIOS_PIN
ninja: build stopped: subcommand failed.
ERROR: command exited with status 1: /home/rg/cmake-3.13.1-Linux-x86_64/bin/cmake --build /home/rg/zephyrproject/zephyr/samples/boards/nrf52/mesh/onoff_level_lighting_vnd_app/build

It is requested to kindly advise on the aforementioned.
The PCA10059 board only has one button, so its devicetree (dts file)
only defines a sw0 alias. The on-off sample seems to require additional
buttons since it's using macros generated from the sw1, sw2, and sw3
aliases, so I doubt it will work with that board.

Please see the devicetree documentation for more details:

https://docs.zephyrproject.org/latest/guides/dts/index.html

Thanks,
Marti


Best Regards