Problem compiling example: Remote IPC shell

Hi,

I'm trying to test the example Remote IPC shell as described here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf5340/remote_shell/README.html 

I got this compiling error:

pp.dir/src/shell_ipc_host.c.obj.d -o CMakeFiles/app.dir/src/shell_ipc_host.c.obj -c ../src/shell_ipc_host.c
In file included from /home/jose/ncs/v2.4.0/zephyr/include/zephyr/toolchain/gcc.h:92,
from /home/jose/ncs/v2.4.0/zephyr/include/zephyr/toolchain.h:50,
from /home/jose/ncs/v2.4.0/zephyr/include/zephyr/kernel_includes.h:19,
from /home/jose/ncs/v2.4.0/zephyr/include/zephyr/kernel.h:17,
from /home/jose/Projectos/standalone/sandbox/nordic/remote_shell/src/shell_ipc_host.c:7:
../src/shell_ipc_host.c: In function 'ipc_init':
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:84:41: error: '__device_dts_ord_DT_CHOSEN_zephyr_shell_ipc_ORD' undeclared (first use in this function)
84 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
132 | #define _DO_CONCAT(x, y) x ## y
| ^
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:84:33: note: in expansion of macro '_CONCAT'
84 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:210:37: note: in expansion of macro 'DEVICE_NAME_GET'
210 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:227:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
227 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/home/jose/Projectos/standalone/sandbox/nordic/remote_shell/src/shell_ipc_host.c:46:36: note: in expansion of macro 'DEVICE_DT_GET'
46 | const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_ipc));
| ^~~~~~~~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:84:41: note: each undeclared identifier is reported only once for each function it appears in
84 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
132 | #define _DO_CONCAT(x, y) x ## y
| ^
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:84:33: note: in expansion of macro '_CONCAT'
84 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:210:37: note: in expansion of macro 'DEVICE_NAME_GET'
210 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:227:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
227 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/home/jose/Projectos/standalone/sandbox/nordic/remote_shell/src/shell_ipc_host.c:46:36: note: in expansion of macro 'DEVICE_DT_GET'
46 | const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_ipc));
| ^~~~~~~~~~~~~
[187/303] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrtf.c.obj
[188/303] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrt.c.obj
[189/303] Building C object zephyr/drivers/hwinfo/CMakeFiles/drivers__hwinfo.dir/hwinfo_weak_impl.c.obj
[190/303] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj
[191/303] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj
[192/303] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_nrfx.c.obj
[193/303] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj
[194/303] Building C object zephyr/drivers/hwinfo/CMakeFiles/drivers__hwinfo.dir/hwinfo_nrf.c.obj
[195/303] Building C object CMakeFiles/app.dir/src/main.c.obj
FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/jose/ncs/toolchains/1f9b40e71a/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_USER_CONFIG_FILE=\"nrf-config-user.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DNRF_TRUSTZONE_NONSECURE -DTFM_PSA_API -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/jose/ncs/v2.4.0/zephyr/include -Izephyr/include/generated -I/home/jose/ncs/v2.4.0/zephyr/soc/arm/nordic_nrf/nrf53 -I/home/jose/ncs/v2.4.0/zephyr/soc/arm/nordic_nrf/common/. -I/home/jose/ncs/v2.4.0/zephyr/subsys/usb/device -I/home/jose/ncs/v2.4.0/nrf/include -I/home/jose/ncs/v2.4.0/nrf/include/tfm -I/home/jose/ncs/v2.4.0/nrf/tests/include -Itfm/generated/interface/include -I/home/jose/ncs/v2.4.0/modules/hal/cmsis/CMSIS/Core/Include -I/home/jose/ncs/v2.4.0/modules/hal/nordic/nrfx -I/home/jose/ncs/v2.4.0/modules/hal/nordic/nrfx/drivers/include -I/home/jose/ncs/v2.4.0/modules/hal/nordic/nrfx/mdk -I/home/jose/ncs/v2.4.0/zephyr/modules/hal_nordic/nrfx/. -Imodules/libmetal/libmetal/lib/include -I/home/jose/ncs/v2.4.0/modules/lib/open-amp/open-amp/lib/include -Itfm/install/interface/include -Imodules/nrfxlib/nrfxlib/nrf_security/src/include/generated -I/home/jose/ncs/v2.4.0/nrfxlib/nrf_security/include -I/home/jose/ncs/v2.4.0/nrfxlib/nrf_security/../crypto/nrf_oberon/core/include -I/home/jose/ncs/v2.4.0/nrfxlib/nrf_security/../crypto/nrf_oberon/core/library -I/home/jose/ncs/v2.4.0/modules/crypto/mbedtls/include -I/home/jose/ncs/v2.4.0/modules/crypto/mbedtls/library -I/home/jose/ncs/v2.4.0/nrfxlib/crypto/nrf_oberon/include/mbedtls -I/home/jose/ncs/v2.4.0/nrfxlib/crypto/nrf_oberon/include -isystem /home/jose/ncs/v2.4.0/zephyr/lib/libc/minimal/include -isystem /home/jose/ncs/toolchains/1f9b40e71a/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem /home/jose/ncs/toolchains/1f9b40e71a/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -fno-strict-aliasing -Os -imacros /home/jose/Projectos/standalone/sandbox/nordic/remote_shell/build_remote_shell/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs --sysroot=/home/jose/ncs/toolchains/1f9b40e71a/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /home/jose/ncs/v2.4.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/home/jose/Projectos/standalone/sandbox/nordic/remote_shell=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/jose/ncs/v2.4.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/jose/ncs/v2.4.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/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 /home/jose/ncs/v2.4.0/zephyr/include/zephyr/toolchain/gcc.h:92,
from /home/jose/ncs/v2.4.0/zephyr/include/zephyr/toolchain.h:50,
from /home/jose/ncs/v2.4.0/zephyr/lib/libc/minimal/include/stdio.h:12,
from /home/jose/Projectos/standalone/sandbox/nordic/remote_shell/src/main.c:7:
../src/main.c: In function 'main':
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:84:41: error: '__device_dts_ord_DT_CHOSEN_ncs_remote_shell_uart_ORD' undeclared (first use in this function)
84 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:210:37: note: in expansion of macro 'DEVICE_NAME_GET'
210 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:227:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
227 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/home/jose/Projectos/standalone/sandbox/nordic/remote_shell/src/main.c:134:36: note: in expansion of macro 'DEVICE_DT_GET'
134 | const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(ncs_remote_shell_uart));
| ^~~~~~~~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:84:41: note: each undeclared identifier is reported only once for each function it appears in
84 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:210:37: note: in expansion of macro 'DEVICE_NAME_GET'
210 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
/home/jose/ncs/v2.4.0/zephyr/include/zephyr/device.h:227:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
227 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/home/jose/Projectos/standalone/sandbox/nordic/remote_shell/src/main.c:134:36: note: in expansion of macro 'DEVICE_DT_GET'
134 | const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(ncs_remote_shell_uart));
| ^~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/jose/ncs/toolchains/1f9b40e71a/usr/local/bin/cmake --build /home/jose/Projectos/standalone/sandbox/nordic/remote_shell/build_remote_shell

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

I haven't changed anything from the example source code and/or configuration. I just create a new project based on the Remote IPC Shell, choose the nrf5340_nrf5340_cpuapp_ns ang then build (I already tested with nrf5340_nrf5340_cpuapp with the same result).

Is there any missing configuration I need to modified somewhere?

Thanks and Best Regards,

JP

Related