Skip to content
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

Enable RPi Pico's optimized ROM floating point routines #202

Merged
merged 2 commits into from Jan 6, 2024

Conversation

multiplemonomials
Copy link
Collaborator

Summary of changes

I was looking in to adding better PWM support on RPi Pico, but discovered that it needs floating point math, and the pico doesn't have a floating point processor in the core, so this would be slow. Then, I discovered that RPi included optimized floating point routines in ROM, but that Mbed currently isn't using them. This means that Mbed will score worse than the Pico SDK on floating point benchmarks, and that won't do!

In this PR, I added the needed SDK files and updated CMake to use them. Note: Everything under pico-sdk/ is copied straight from the Pico SDK and does not need to be reviewed.

Impact of changes

Mbed now enables the floating point wrappers needed for optimized floating point support on RPi Pico. This should make floating point operations run on the order of 2-5x faster.

Migration actions required

Documentation

None


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@multiplemonomials multiplemonomials merged commit c1effb1 into master Jan 6, 2024
9 checks passed
@multiplemonomials multiplemonomials deleted the dev/rpi-pico-optimized-float branch January 6, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants