-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nRF UART nrfx drivers (nRF UARTE 0) won't build #11928
Comments
This is philosophical problem, what shall be done in DT and what in Kconfig. We agreed that Zephyr will be Linux-like so in Kconfig you set a driver to be compiled and in DT peripheral to be used. Please refer to issue: #11792 To fix it simply edit file: |
@jarz-nordic could #11932, #11792 or this one please stay open? I think this is a real problem, especially keeping newbies in mind. I always wonder why there aren't more hints in code. In this case, for example, it could be something like
in uart_nrfx_uarte.c Again, this is just an example and I think that it's not good to place it there because it statically checks for UARTE0 (instead of being generic like UART_NRF_UARTE_DEVICE(idx)) Should I create an Improvement issue for "Help newbies with compiler macros"? Eg, what about adding an extra build step which calls a "config_check.h" afterwards and everyone who wants to add checks could just include for example "config_check_nrfx_uarte.h" there and define checks in that header file? |
@derchrismakaio : I am not an expert to say if this is good idea or not. |
I am a newbie here and have to agree @chris-makaio. |
Describe the bug
Can't build project for
set(BOARD nrf52840_pca10056)
withCONFIG_UART_0_NRF_UARTE=y
. Build process fails on undeclared symbol.[build] ../zephyr/drivers/serial/uart_nrfx_uarte.c:581:5: error: DT_NORDIC_NRF_UARTE_UART_0_CURRENT_SPEED' undeclared here (not in a function); did you mean 'DT_NORDIC_NRF_UART_UART_0_CURRENT_SPEED'?
[build] DT_NORDIC_NRF_UARTE_UART_##idx##_CURRENT_SPEED,\
[build] ^
[build] ../zephyr/drivers/serial/uart_nrfx_uarte.c:689:2: note: in expansion of macro
'UART_NRF_UARTE_DEVICE'
[build] UART_NRF_UARTE_DEVICE(0);
[build] ^~~~~~~~~~~~~~~~~~~~~
[build] ../zephyr/drivers/serial/uart_nrfx_uarte.c:597:4: error:
'DT_NORDIC_NRF_UARTE_UART_0_BASE_ADDRESS' undeclared here (not in a function); did you
mean 'DT_NORDIC_NRF_UART_UART_0_BASE_ADDRESS'?
[build] DT_NORDIC_NRF_UARTE_UART_##idx##_BASE_ADDRESS, \
[build] ^
[build] ../zephyr/drivers/serial/uart_nrfx_uarte.c:689:2: note: in expansion of macro
'UART_NRF_UARTE_DEVICE'
[build] UART_NRF_UARTE_DEVICE(0);
[build] ^~~~~~~~~~~~~~~~~~~~~
etc.
To Reproduce
Steps to reproduce the behavior:
CONFIG_UART_0_NRF_UARTE=y
in prj.confAdditional context
Symbols are generated to
./build/zephyr/include/generated/generated_dts_board.conf
(DT_NORDIC_NRF_UART_UART_0_CURRENT_SPEED=115200)but for UART and not for UARTE even if UARTE is selected.
Impact
Can't use nRF UARTE instead of nRF UART
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: