-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
boards: kconfig: Fix enabling USE_SEGGER_RTT for various boards #21860
boards: kconfig: Fix enabling USE_SEGGER_RTT for various boards #21860
Conversation
@@ -6,8 +6,5 @@ CONFIG_BOARD_HOLYIOT_YJ16019=y | |||
# Enable MPU | |||
CONFIG_ARM_MPU=y | |||
|
|||
# Enable RTT | |||
CONFIG_HAS_SEGGER_RTT=y | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probable be CONFIG_USE_SEGGER_RTT=y
since this board has no physical pins for a UART for console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. See new PR comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not look like accidental enabling of prompt-less symbols; seems there has been a confusion among the board contributors regarding which symbol actually enables RTT.
Removing these is of course a no-op; i wonder, though, if we could replace these with the correct _USE_RTT symbol.
And since you're touching the documentation, I'd suggest to add like saying that HAS_RTT denotes platform capabilities, while _USE_RTT is the user option to use the feature..
ce0f06b
to
a4c8ee8
Compare
Yeah... I wasn't sure Turns out it is, because these are all Did a proper fix that switches the boards that only assigned See updated commit message. |
a4c8ee8
to
ce905ae
Compare
One thing is to clean up the assignment of |
Yup... we're assuming people wanted to enable it, but assigned the wrong symbol. Could be wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not quite convinced by this, because Segger RTT support is determined at the board level, not at the SoC level, since RTT is a mechanism that is implemented in the debugger chip that sits on the board, not in the SoC itself. The original idea with this was to set HAS_SEGGER_RTT
at the board level to indicate which boards support this, but it might now have gone out of date. Perhaps @anangl or @nordic-krch could comment as well.
Personally, I'd leave the default setting. Plus I agree with what @carlescufi said, |
I am fine with any solution you pick, I would only like to see us having 2 Kconfig options - one _HAS_RTT to signify RTT capabilities (at SoC or Board level), and a user option (depending on that) for enabling the feature. |
So do you think Note that assigning it is currently a no-op, because it isn't user-configurable (since it has no prompt). One icky thing about having it user-configurable is that you could go into the menuconfig and toggle it, even though it's a fixed hardware thing (afaik). |
Could Maybe we could just go with something that works as intended here. |
ce905ae
to
654706b
Compare
RTT_CONSOLE depends on CONSOLE, but SEGGER_SYSTEMVIEW and SHELL_BACKEND_RTT select RTT_CONSOLE without also selecting CONSOLE. This leads to a build failure in drivers/console/rtt_console.c (compiled if RTT_CONSOLE is enabled) unless CONSOLE is enabled some other way. Symbols like CONFIG_RTT_RETRY_DELAY_MS won't be defined, because they depend on CONSOLE. Came up in zephyrproject-rtos#21860. This fix was verified there. (Would be nice to get rid of some 'select's in the console subsystem at some point. This is a quick fix.) Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
654706b
to
2330239
Compare
Depends on #21961. |
I don't think |
RTT_CONSOLE depends on CONSOLE, but SEGGER_SYSTEMVIEW and SHELL_BACKEND_RTT select RTT_CONSOLE without also selecting CONSOLE. This leads to a build failure in drivers/console/rtt_console.c (compiled if RTT_CONSOLE is enabled) unless CONSOLE is enabled some other way. Symbols like CONFIG_RTT_RETRY_DELAY_MS won't be defined, because they depend on CONSOLE. Came up in #21860. This fix was verified there. (Would be nice to get rid of some 'select's in the console subsystem at some point. This is a quick fix.) Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
HAS_SEGGER_RTT is assigned by various Nordic boards, but assignments have no effect on promptless symbols. This symbol is enabled through being select'ed by SOC_SERIES_NRF52X. Holyiot, nRF52833-PCA10100, nRF52840-PCA10056, and nRF52-PCA10040 only assign HAS_SEGGER_RTT without assigning USE_SEGGER_RTT. They probably meant to enable USE_SEGGER_RTT, so do that instead. Also add a help text to HAS_SEGGER_RTT and a warning re. HAS_SEGGER_RTT vs. USE_SEGGER_RTT to the documentation. Flagged by zephyrproject-rtos#20742. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2330239
to
41c6a1e
Compare
#21961 is in now, so removing DNM.
Question is if the configuration files that enabled Maybe I'm missing something. Will look more tomorrow. |
As in just removing the (no-op) Note that all the |
boards: kconfig: Fix enabling USE_SEGGER_RTT for various boards
HAS_SEGGER_RTT is assigned by various Nordic boards, but assignments
have no effect on promptless symbols. This symbol is enabled through
being select'ed by SOC_SERIES_NRF52X.
Holyiot, nRF52833-PCA10100, nRF52840-PCA10056, and nRF52-PCA10040 only
assign HAS_SEGGER_RTT without assigning USE_SEGGER_RTT. They probably
meant to enable USE_SEGGER_RTT, so do that instead.
Also add a help text to HAS_SEGGER_RTT and a warning re. HAS_SEGGER_RTT
vs. USE_SEGGER_RTT to the documentation.
Flagged by #20742.