-
Notifications
You must be signed in to change notification settings - Fork 1.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
[BUG] CONFIG_DEBUG_UORB
should enable CONFIG_LIBC_FLOATINGPOINT
#15599
Comments
@linguini1 since uORB needs float, maybe when some uORB sensor is enabled it should enable CONFIG_LIBC_FLOATINGPOINT by default. What do you think @xiaoxiang781216 ? |
only
|
@raiden00pl good point! But the sensors are using float by default, so soon or later user will want to printf the result and that will create frustration for them and support for us. I think CONFIG_LIBC_FLOATINGPOINT is something that should be enabled by default always, execpt maybe for MCUs that doesn't have FPU or SMALL is enabled. |
I can't agree with that. You print sensors values only when debugging or developing your app. In real life applications printing the sensor value is probably not what you want to achieve, but process the value in a different way.
That's exactly how it is:
|
@
Ouch! So it is already fine! My fault, I should have double checked before adding my statement. @linguini1 I think just including the #error "You need to enable CONFIG_LIBC_FLOATINGPOINT to get UORB DEBUG working" is enough in this case. |
@acassis if I remember correctly @linguini1 works with rp2040, which is Cortex M0+ and has no FPU support ( |
That's right, I'm mostly working with RP2040 based boards but I will be working with the STM32H7 shortly once InSpace's flight computer is built. I agree with the stance that floats in printf only need to be enabled when debugging UORB, not for regular use. I was hoping that there would be some way to enable both when |
Yes, in this case is better to just advice the user to enable support in menuconfig, because float support will be implemented by software (from toolchain libc) |
Do you enable DEBUG_UORB, which auto select LIBC_FLOATINGPOINT? |
Yes, that is what I'm enabling. Although it doesn't enable printing floating points, I guess |
Yes, we need select LIBC_FLOATINGPOINT too. |
@xiaoxiang781216 why we should use |
It's OK to change to dependence. I mention select just because I find many place use "select LIBC_FLOATINGPOINT". |
It would be good if we stick to one version for all new changes, otherwise it gets confusing. Currently we have |
My concern with |
Yes, that's a problem. But I see this more like Kconfig limitation, where there really is no perfect solution. In such a case we have to choose the least harmful solution, which in this case is to avoid If you want see all available options, I recommend to use |
That makes sense. I am surprised that something as widely used as Kconfig does not have the ability to recursively select dependencies. The "toggle all" is a good solution in the interim! |
@raiden00pl I think kconfig-frontends also support to see all the entries, but I think it is the [Z] instead of [A]. Unfortunately these tools are diverging (extend and kill approach?), kconfiglib added features that are missing on kconfig-frontend: |
@acassis that's funny, never saw this option in kconfig-frontend :) |
Description / Steps to reproduce the issue
When enabling the UORB debug output, I believe that printing floating point numbers in
printf
should also be selected and enabled.Reasoning: All (or the vast majority) of UORB data types are float based. If someone is enabling UORB debugging, they most likely want to see these measurements printed. It's very easy to forget that printing floats isn't enabled by default and requires rebuilding and re-flashing to correct. This can get tedious, even if only selecting the option in
menuconfig
.Having this be auto-selected brings NuttX debugging a step closer to "just working", or being less tedious anyways.
Steps to reproduce:
DEBUG_UORB
in menuconfiguorb_listener
in NSHCaveats:
I know there is some finickiness with the Kconfig
select
keyword, if there are suggestions to do this without breaking dependency structuring that might be good. I thinkdepends on
is not the correct approach because I believe it will hide theDEBUG_UORB
option untilLIBC_FLOATING_POINT
is enabled first.On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Arch Linux
NuttX Version
12.8.0
Issue Architecture
[Arch: all]
Issue Area
[Area: Configuring]
Verification
The text was updated successfully, but these errors were encountered: