This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to build nrf9160 bluetooth sample code

I didn't change the sample code. Why does the build fail?

1> Compiling ‘main.c’
1> ../src/main.c:60:28: error: 'DT_ALIAS_LED0_GPIOS_PIN' undeclared here (not in a function); did you mean 'DT_GPIO_LEDS_LED0_GPIO_PIN'?
1> ../src/main.c:61:7: error: 'DT_ALIAS_LED1_GPIOS_PIN' undeclared here (not in a function); did you mean 'DT_ALIAS_LED0_GPIOS_PIN'?
1> ../src/main.c:62:7: error: 'DT_ALIAS_LED2_GPIOS_PIN' undeclared here (not in a function); did you mean 'DT_ALIAS_LED1_GPIOS_PIN'?
1> ../src/main.c:63:7: error: 'DT_ALIAS_LED3_GPIOS_PIN' undeclared here (not in a function); did you mean 'DT_ALIAS_LED2_GPIOS_PIN'?
1> ../src/main.c:42:33: warning: passing argument 1 of 'set_led_state' makes integer from pointer without a cast [-Wint-conversion]
1> ../src/main.c:189:16: note: in expansion of macro 'CON_STATUS_LED'
1> ../src/main.c:83:13: note: expected 'int' but argument is of type 'u32_t * {aka unsigned int *}'
1> ../src/main.c:42:33: warning: passing argument 1 of 'set_led_state' makes integer from pointer without a cast [-Wint-conversion]
1> ../src/main.c:204:17: note: in expansion of macro 'CON_STATUS_LED'
1> ../src/main.c:83:13: note: expected 'int' but argument is of type 'u32_t * {aka unsigned int *}'
1> ../src/main.c:37:33: error: 'DT_ALIAS_LED0_GPIOS_CONTROLLER' undeclared (first use in this function); did you mean 'DT_GPIO_LEDS_LED0_GPIO_CONTROLLER'?
1> ../src/main.c:366:32: note: in expansion of macro 'LED_PORT'
1> ../src/main.c:37:33: note: each undeclared identifier is reported only once for each function it appears in
1> ../src/main.c:366:32: note: in expansion of macro 'LED_PORT'
1> ../src/main.c:37:33: warning: passing argument 1 of 'device_get_binding' from incompatible pointer type [-Wincompatible-pointer-types]
1> ../src/main.c:366:32: note: in expansion of macro 'LED_PORT'
1> In file included from C:/nordic/ncs/zephyr/include/syscall.h:17:0,
1> from C:/nordic/ncs/zephyr/include/kernel_includes.h:32,
1> from C:/nordic/ncs/zephyr/include/kernel.h:17,
1> from C:/nordic/ncs/zephyr/include/zephyr.h:18,
1> from ../src/main.c:12:
1> zephyr/include/generated/syscalls/device.h:13:50: note: expected 'const char *' but argument is of type 'u32_t * {aka unsigned int *}'
1> zephyr/include/generated/syscall_macros.h:103:20: note: in definition of macro 'K_SYSCALL_DECLARE1'
1> ../src/main.c:39:33: warning: passing argument 2 of 'gpio_pin_configure' makes integer from pointer without a cast [-Wint-conversion]
1> ../src/main.c:373:37: note: in expansion of macro 'RUN_STATUS_LED'
1> In file included from ../src/main.c:17:0:
1> C:/nordic/ncs/zephyr/include/gpio.h:201:19: note: expected 'u32_t {aka unsigned int}' but argument is of type 'u32_t * {aka unsigned int *}'
1> ../src/main.c:42:33: warning: passing argument 2 of 'gpio_pin_configure' makes integer from pointer without a cast [-Wint-conversion]
1> ../src/main.c:376:38: note: in expansion of macro 'CON_STATUS_LED'
1> In file included from ../src/main.c:17:0:
1> C:/nordic/ncs/zephyr/include/gpio.h:201:19: note: expected 'u32_t {aka unsigned int}' but argument is of type 'u32_t * {aka unsigned int *}'
1> ../src/main.c:39:33: warning: passing argument 2 of 'gpio_pin_write' makes integer from pointer without a cast [-Wint-conversion]
1> ../src/main.c:381:34: note: in expansion of macro 'RUN_STATUS_LED'
1> In file included from ../src/main.c:17:0:
1> C:/nordic/ncs/zephyr/include/gpio.h:214:19: note: expected 'u32_t {aka unsigned int}' but argument is of type 'u32_t * {aka unsigned int *}'
1> ../src/main.c:42:33: warning: passing argument 2 of 'gpio_pin_write' makes integer from pointer without a cast [-Wint-conversion]
1> ../src/main.c:385:34: note: in expansion of macro 'CON_STATUS_LED'
1> In file included from ../src/main.c:17:0:
1> C:/nordic/ncs/zephyr/include/gpio.h:214:19: note: expected 'u32_t {aka unsigned int}' but argument is of type 'u32_t * {aka unsigned int *}'
1> ../src/main.c:37:33: error: 'DT_ALIAS_LED0_GPIOS_CONTROLLER' undeclared (first use in this function); did you mean 'DT_GPIO_LEDS_LED0_GPIO_CONTROLLER'?
1> ../src/main.c:401:32: note: in expansion of macro 'LED_PORT'
1> ../src/main.c:37:33: warning: passing argument 1 of 'device_get_binding' from incompatible pointer type [-Wincompatible-pointer-types]
1> ../src/main.c:401:32: note: in expansion of macro 'LED_PORT'
1> In file included from C:/nordic/ncs/zephyr/include/syscall.h:17:0,
1> from C:/nordic/ncs/zephyr/include/kernel_includes.h:32,
1> from C:/nordic/ncs/zephyr/include/kernel.h:17,
1> from C:/nordic/ncs/zephyr/include/zephyr.h:18,
1> from ../src/main.c:12:
1> zephyr/include/generated/syscalls/device.h:13:50: note: expected 'const char *' but argument is of type 'u32_t * {aka unsigned int *}'
1> zephyr/include/generated/syscall_macros.h:103:20: note: in definition of macro 'K_SYSCALL_DECLARE1'
1> ../src/main.c:39:33: warning: passing argument 1 of 'set_led_state' makes integer from pointer without a cast [-Wint-conversion]
1> ../src/main.c:503:17: note: in expansion of macro 'RUN_STATUS_LED'
1> ../src/main.c:83:13: note: expected 'int' but argument is of type 'u32_t * {aka unsigned int *}'
Build failed

Parents Reply Children
No Data
Related