-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Consider using the circuitpython/lib/libm math library instead of -libm to save space #325
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
Comments
!!!! lets try libm for gemma/trinket/non-exp for now since its the most useful! |
Gemma build using internal We could enable other stuff that might be useful even in small builds: #193 ( |
#1 most useful thing in small builds would be pwm/timer support. |
Turning on pulseio takes uses 7168 bytes, bringing free bytes down to 1092. Substantial, but it fits! I'll turn that on and add it to the pull request or make a separate one. |
its worth it for sure, we can work around SLICE or reversed(), but if we dont have pwm support, we can't do servos, LED dimming, and a bunch of other things! |
(if ya toss me a uf2 i will do a bunch of testing!) |
gemma and trinket uf2's attached in a zip |
… On Sun, Oct 15, 2017 at 6:34 PM Dan Halbert ***@***.***> wrote:
Limor suggested
<#325 (comment)>
just the smaller builds, but happy to be consistent. Might be easier to
support and test. I'll try to fix #331
<#331> before the merge
anyway.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#325 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADNqcopkAeeQfFpEQOaT2l0DOSRooXbks5ssrKvgaJpZM4P5O25>
.
|
Accomplished by #329. |
The
atmel-samd
boards currently use-libm
. This is supplied as part ofglibc
in thearm-none-eabi
toolchain. Various functions there such aspowf
andsqrtf
end up using the double-precision float arithmetic routines (__aeabi_dadd
,dsub
, etc.), which occupy a few thousand bytes.There is an alternate simpler
libm
which is in our source tree which does not use doubles and is simpler in other ways. It's used for some other ports, including esp8266. I assume it might be numerically different as well, probably less precise.When I tested switching
atmel-samd
to use thelibm
in our tree instead of-libm
, the Gemma M0 firmware got smaller by 8780 bytes (!). This would give us the freedom to add a lot more stuff to the non-Express boards, and completely solves the current space squeeze (e.g., #322).@tannewt @ladyada Do you have an opinion on this? Should we try to use the same
libm
across allatmel-samd
boards (the size matters less for Express and M4).The internal
libm
needs some work to remove compile warnings. Our-Werror
errors out on all warnings.The text was updated successfully, but these errors were encountered: