Hi,
I have removed UART from my custom board dts file as in my current application, I am not using UART for any transfer.
But due to this, I am unable to compile code as some internal logging/Device_DT is using UART.
I am getting the following error:
/zephyr/include/net/net_l2.h:164:22: note: expected 'struct net_pkt *' but argument is of type 'struct net_pkt *'
[656/817] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/shell/shell_uart.c.obj
FAILED: zephyr/CMakeFiles/zephyr.dir/subsys/shell/shell_uart.c.obj
ccache /opt/nordic/ncs/v1.8.0/toolchain/bin/arm-none-eabi-gcc -DBUILD_VERSION=v2.7.0-ncs1 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DNRF52840_XXAA -DNRF_802154_ACK_TIMEOUT_ENABLED=1 -DNRF_802154_CCA_CORR_LIMIT_DEFAULT=2 -DNRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_ED_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED -DNRF_802154_CSMA_CA_ENABLED=1 -DNRF_802154_ECB_PRIORITY=0 -DNRF_802154_ENCRYPTION_ENABLED=0 -DNRF_802154_IE_WRITER_ENABLED=0 -DNRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0 -DNRF_802154_PENDING_EXTENDED_ADDRESSES=16 -DNRF_802154_PENDING_SHORT_ADDRESSES=16 -DNRF_802154_RX_BUFFERS=16 -DNRF_802154_SECURITY_WRITER_ENABLED=0 -DNRF_802154_SWI_PRIORITY=1 -DNRF_802154_TX_STARTED_NOTIFY_ENABLED=1 -DNRF_802154_USE_RAW_API=1 -DPSA_CRYPTO_SECURE -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/Users/bhumika/Pr/zephyr/kernel/include -I/zephyr/arch/arm/include -I/nrf/drivers/mpsl/clock_control -I/zephyr/include -I/app/sed/build/zephyr/include/generated -I/zephyr/soc/arm/nordic_nrf/nrf52 -I/zephyr/lib/libc/newlib/include -I/zephyr/lib/util/fnmatch/. -I/zephyr/subsys/net/lib/coap/. -I/zephyr/subsys/net/lib/sockets/. -I/zephyr/subsys/net/lib/conn_mgr/. -I/zephyr/subsys/net/lib/openthread/platform/. -I/zephyr/subsys/settings/include -I/nrf/include -I/nrf/lib/multithreading_lock/. -I/nrf/subsys/net/lib/coap_utils/. -I/zephyr/drivers/flash -I/modules/hal/cmsis/CMSIS/Core/Include -I/modules/hal/nordic/nrfx -I/modules/hal/nordic/nrfx/drivers/include -I/modules/hal/nordic/nrfx/mdk -I/zephyr/modules/hal_nordic/nrfx/. -I/modules/debug/segger/SEGGER -I/modules/debug/segger/Config -I/zephyr/modules/segger/. -I/nrfxlib/mpsl/include -I/nrfxlib/mpsl/include/protocol -I/nrfxlib/nrf_802154/driver/include -I/nrfxlib/nrf_802154/sl/include -I/app/sed/build/modules/openthread/build/etc/cmake -I/modules/lib/openthread/etc/cmake -I/modules/lib/openthread/include -I/app/sed/build/modules/nrfxlib/nrfxlib/nrf_security/include/mbedtls_generated/mbedtl /app/sed/build/modules/nrfxlib/nrfxlib/nrf_security/include/mbedtls_generated -I/app/sed/build/modules/nrfxlib/nrfxlib/nrf_security/include -I/nrfxlib/nrf_security/include -I/mbedtls/library -I/Users/bhumika/Project/Zipnet_Zephyr/mbedtls/include -I/Users/bhumika/Project/Zipnet_Zephyr/mbedtls/include/mbedtls -I/Users/bhumika/Project/Zipnet_Zephyr/mbedtls/include/psa -I/Users/bhumika/Project/Zipnet_Zephyr/nrfxlib/nrf_security/include/mbedcrypto_glue/mbedtls/threading -isystem /Users/bhumika/Project/Zipnet_Zephyr/zephyr/subsys/cpp/include -isystem /Users/bhumika/Project/Zipnet_Zephyr/modules/lib/openthread/zephyr/../include -isystem /Users/bhumika/Project/Zipnet_Zephyr/modules/lib/openthread/zephyr/../examples/platforms -isystem /Users/bhumika/Project/Zipnet_Zephyr/nrfxlib/crypto/nrf_cc310_platform/include -Os -imacros /Users/bhumika/Project/Zipnet_Zephyr/app/sed/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -imacros /Users/bhumika/Project/Zipnet_Zephyr/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/Users/bhumika/Project/Zipnet_Zephyr/app/sed=CMAKE_SOURCE_DIR -fmacro-prefix-map=/Users/bhumika/Project/Zipnet_Zephyr/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/Users/bhumika/Project/Zipnet_Zephyr=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/CMakeFiles/zephyr.dir/subsys/shell/shell_uart.c.obj -MF zephyr/CMakeFiles/zephyr.dir/subsys/shell/shell_uart.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/subsys/shell/shell_uart.c.obj -c /Users/bhumika/Project/Zipnet_Zephyr/zephyr/subsys/shell/shell_uart.c
In file included from /zephyr/include/toolchain/gcc.h:66,
from /zephyr/include/toolchain.h:50,
from /zephyr/include/kernel_includes.h:19,
from /zephyr/include/kernel.h:17,
from /zephyr/include/zephyr.h:18,
from /zephyr/include/shell/shell.h:10,
from /zephyr/include/shell/shell_uart.h:10,
from /zephyr/subsys/shell/shell_uart.c:7:
/zephyr/subsys/shell/shell_uart.c: In function 'enable_shell_uart':
/zephyr/include/device.h:81:39: error: '__device_dts_ord_DT_CHOSEN_zephyr_shell_uart_ORD' undeclared (first use in this function)
81 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
| ^~~~~~~~~
/zephyr/include/toolchain/common.h:124:26: note: in definition of macro '_DO_CONCAT'
124 | #define _DO_CONCAT(x, y) x ## y
| ^
/zephyr/include/device.h:81:31: note: in expansion of macro '_CONCAT'
81 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
| ^~~~~~~
/zephyr/include/device.h:233:37: note: in expansion of macro 'DEVICE_NAME_GET'
233 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~
/zephyr/include/device.h:247:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
247 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/zephyr/subsys/shell/shell_uart.c:317:29: note: in expansion of macro 'DEVICE_DT_GET'
317 | const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart));
| ^~~~~~~~~~~~~
/zephyr/include/device.h:81:39: note: each undeclared identifier is reported only once for each function it appears in
81 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
| ^~~~~~~~~
/zephyr/include/toolchain/common.h:124:26: note: in definition of macro '_DO_CONCAT'
124 | #define _DO_CONCAT(x, y) x ## y
| ^
/zephyr/include/device.h:81:31: note: in expansion of macro '_CONCAT'
81 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
| ^~~~~~~
/zephyr/include/device.h:233:37: note: in expansion of macro 'DEVICE_NAME_GET'
233 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~
/zephyr/include/device.h:247:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
247 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/zephyr/subsys/shell/shell_uart.c:317:29: note: in expansion of macro 'DEVICE_DT_GET'
317 | const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart));
| ^~~~~~~~~~~~~
[661/817] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/net/lib/sockets/sockets.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /app/sed/build
➜ sed git:(master) ✗
Can you tell me which file by default uses shell_uart.c?
How can I remove this error?