-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
atof() function does not compile #1299
Comments
This seems to be caused by the
|
Did you compare the size of the resulting image? I think not using stdlib can save both flash and potentially improve the runtime due to better optimizations. I am also surprised that there is even a use-case for converting a string to a float number. |
Yes, and the results are (drum roll..): With Without So the cost is 5-6k of flash and 960 bytes of RAM
I could imagine using it in a configuration file, like the SD card config for instance, but I don't think it is that common :-) |
This reverts commit af0cbe5. `-nostdlib` was added to LDFLAGS when we converted to kbuild. PR #1310 removed -nostdlib in order to make it impossible to use the `atof()` function. However, this now causes similar linker warnings to those it was trying to solve (discussion 784). 420 days later, `atof()` is not being used anywhere internally. Discussion in #1299 is not very conclusive on why this is needed. The arguing mostly relies that the cost in flash and RAM is so low that there is no good reason not to do it. There is now!
This reverts commit af0cbe5. `-nostdlib` was added to LDFLAGS when we converted to kbuild. PR #1310 removed -nostdlib in order to make it possible to use the `atof()` function. However, this now causes similar linker warnings to those it was trying to solve (discussion 784). 420 days later, `atof()` is not being used anywhere internally. Discussion in #1299 is not very conclusive on why this is needed. The arguing mostly relies that the cost in flash and RAM is so low that there is no good reason not to do it. There is now!
This reverts commit af0cbe5. `-nostdlib` was added to LDFLAGS when we converted to kbuild. PR bitcraze#1310 removed -nostdlib in order to make it possible to use the `atof()` function. However, this now causes similar linker warnings to those it was trying to solve (discussion 784). 420 days later, `atof()` is not being used anywhere internally. Discussion in bitcraze#1299 is not very conclusive on why this is needed. The arguing mostly relies that the cost in flash and RAM is so low that there is no good reason not to do it. There is now!
This reverts commit af0cbe5. `-nostdlib` was added to LDFLAGS when we converted to kbuild. PR bitcraze#1310 removed -nostdlib in order to make it possible to use the `atof()` function. However, this now causes similar linker warnings to those it was trying to solve (discussion 784). 420 days later, `atof()` is not being used anywhere internally. Discussion in bitcraze#1299 is not very conclusive on why this is needed. The arguing mostly relies that the cost in flash and RAM is so low that there is no good reason not to do it. There is now!
This reverts commit af0cbe5. `-nostdlib` was added to LDFLAGS when we converted to kbuild. PR #1310 removed -nostdlib in order to make it possible to use the `atof()` function. However, this now causes similar linker warnings to those it was trying to solve (discussion 784). 420 days later, `atof()` is not being used anywhere internally. Discussion in #1299 is not very conclusive on why this is needed. The arguing mostly relies that the cost in flash and RAM is so low that there is no good reason not to do it. There is now!
Converting strings to floats using the
atof()
function does not work, some libraries seems to be missing.It has been confirmed to work in 2022.01 and my guess is that it got lost in the introduction of kbuild.
Also see https://github.com/orgs/bitcraze/discussions/784
The text was updated successfully, but these errors were encountered: