-
Notifications
You must be signed in to change notification settings - Fork 229
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
Support for hardware divider and firmware float support #21
Comments
I'm not 100% sure, but I believe that this is an issue for https://compiler-rt.llvm.org/ and not this project. |
I think supporting the hardware divider is a good goal that deserves a tracking issue. As far as the other questions / thoughts go, I have some opinions. I haven't looked at the soft-float library that is shipped with the C SDK, but I do not want to embed a C floating point library into our HAL. End-users can choose to do that if they like, but we are not going to impose that on everyone. As for the hardware divider: As a user, I would not expect our implementation to override operator div(/) and operator mod(%) for i32/u32 (it would need to be part of the core lib to do this) In a C/C++ embedded it's fairly common for the vendor to ship toolchain with a custom version of libc. |
Closing this out as we now have basic support for the hardware divider |
The floating point library is in ROM. The C SDK just has some assembly stubs to make use of it. |
Remove redundant variable in pico uart examples
Thinking about the benefits of switching to rust from c/c++ for the pico, a few basic things stand out as downsides to rust. The C/C++ SDK links the standard / and % operators to the onboard hardware divider. Im not 100% sure on the internals of the rust arm compiler and the HAL/PAC for the rp2040 but assumedly, unless manually implemented, the rust compiler will not be able to correctly use the hardware divider. This is most definitely the same with the firmware float implementations. Both of these additions would let rust programs be able to fully take over the full power of the rp2040 chip that currently is exclusive to the standard C/C++ SDK and Micropython implementation.
The text was updated successfully, but these errors were encountered: